Author Topic: Customize default + testing maps! (IMAGE HEAVY)  (Read 390 times)

Kastilla

  • Newbie
  • *
  • Posts: 27
  • Paw-o-Points: 4
    • View Profile
Customize default + testing maps! (IMAGE HEAVY)
« on: February 23, 2021, 05:29:30 AM »
Ever want to make your default map less...defaulty? Look here for:

- Explaining WHAT the default map folder is
- How to edit the default map to look less plain
- ???


First things first, "What even is the default map?" you might ask. The default map is a map just like any other; be it the title screen's Watermill, the character screen Podium, or even Bonfire Island itself. FeralHeart's world is comprised of maps. There are two types of "default" maps we will be looking at.

Keep in mind:
Temp is the map of the Map Maker
Default is the map of the Object and Preset Maker

...so, adjust your files accordingly.

Like any map, their home lies within the "terrains" folder.


Anatomy of the default map
While the default map is like any other map, it has specificities that are important.

black.png (DO NOT delete or alter this! doesn't do anything, but who knows?)
defaultTerrain.cfg
defaultTerrain.material
defaultMask.png
defaultTerrain.png

WARNING: BEFORE YOU GO MESSING WITH FILES, MAKE SURE TO BACKUP EVERYTHING YOU ARE TAMPERING WITH. THIS CAN BE AS EASY AS FORGETTING A CHARACTER TO ACCIDENTLY REPLACING SOMETHING YOU SHOULDN'T HAVE. ALWAYS BE AWARE OF THIS WHEN DOING ANYTHING!



Upon first glance, you'll see that the default folder contains everything you need to make a map. It is the bare bones after all! Both the .cfg and .material file can be left alone right now. We will focus on the defaultMask.png and the defaultTerrain.png images.

Go ahead and open the defaultTerrain.png in GIMP (or whatever photo manip-software you have).

Everything's black!? That's because it is WATER LEVEL. If, in the map maker, you click the Ocean checkbox, it fills the entire space.
Let's say you want to see what your preset would look like in a hole? Easy! Just scribble over the blackness with grey or white until you have a hole (or canyon, whatever you want really). Export this to defaultTerrain.png and open up FeralHeart and go into your map maker (preset maker or object maker work too as they also use the default map!)

As you can see, it changed! That is now your default map to start with (or for your preset to play around in).

If this does not work, or your game crashes, step back and troubleshoot. Make sure these things are in order:
- Make sure the terrain is Grayscale, not just gray colored. The default terrain will already be grayscale.
- The canvas is 513x513. The default terrain is already this size.
- Make sure you saved it to the right extension (sometimes you can save GIMP as .xcf ? or something else; that's why in GIMP you export to .png). The default is already .png.
** - The name is defaultTerrain.png and not named something different or misspelled. Since this is the default map, your Preset, Map, and Object Maker will not work without it!
- If you're like me, you might have saved it to the wrong folder. Make sure it is in C:\FN FeralHeart\media\terrains\default .**

** Why is this important? The way FeralHeart is set up is through the resources.cfg file in the main folder. Opening this will greet you with a wall of text, filing everything where it belongs and where everything is coming from. Scrolling down, you will find where the default map hails from!

Code: [Select]
[Terrains/default]
FileSystem=media/terrains/default
That's its home, and it's best not to remove it from there. It's cozy.**


So, you might be thinking it looks really smooth? (at least, mine does) And you are correct. Not only did I blur the heck out of those edges, but I also used a warmer grey. Just like any heightMap, you can use white to BEEF up those ridges and mountains!

Now, onto the defaultMask.png, the bright red image. This is to edit the ground textures. If you just want a different color of grass (as it is just plain 'ol african grass, booooringggg, jk) you just open up the defaultTerrain.material file and edit what's in blue. You can find the different map textures in C:\FN FeralHeart\media\terrains\textures .
Quote
material Terrain/Default
{
   receive_shadows on
   technique
   {
      pass
      {
         lighting off
         texture_unit
         {
            texture african_grass.jpg
            scale 0.05 0.05
         }
      }
   }
}

Let's say I want my default to be Earthier. I'll just edit african_grass.jpg and change it to brownsand.jpg. And voila!


Hmmm, now that looks a bit blander yet! Maybe we can add some different sediment, to make it even EarthIEST. Gotta open up that defaultMask.png! So you can either go ham with green and blue and draw whatever you want, or you can overlay your Heightmap for accuracy. Simply copy and paste onto a new layer and drag the opacity down enough so you can still see some of the Heightmap. Basic map makin' stuff, again.


Now, when we open it up to view it, it will look like you did absolutely nothing!

Worry not. If you go into your Map Maker, to the second tab, you will see that there is a 1 with an arrow next to it. Click that arrow and it will allow you to select a second texture to fill in where you marked the green.

How do I make the default map have two textures in the preset or object maker?
Since this is considered an actual map, it's name is temp instead of default! You need not edit anything else in the default folder after this, only the temp in C:\FN FeralHeart\media\terrains\temp. Again, be very careful as one tiny thing can cause the game to crash! For example, if we take a glance at the WaterMillMaterial.cfg, we see this
Quote
AlphaMap1=watermillMask.png
AlphaMap2=
Splat1=greengrass.jpg
Splat2=brokensand.jpg
Splat3=seasand.jpg
Splat4=
Splat5=
Splat6=

What does all this mean?
AlphaMap1 - the Mask, the RGB, which defines the textures of the Heightmap.
AlphaMap2 - the remaining CMY (cyan, magenta, yellow) added to the Heightmap will make for even more texture fun!
Splat# - The texture images used.

Open up tempMaterial.cfg

And whichever textures you want for your R(splat 1), G(splat 2), B(splat 3), etc. Mine looks like:
Quote
AlphaMap1=defaultMask.png
AlphaMap2=
Splat1=brownsand.jpg
Splat2=seasand.jpg
Splat3=
Splat4=
Splat5=
Splat6=
Before you boot up FeralHeart and check if it worked, we have one more step to go. There is also a file that is .material. For this, we need to look into the temp folder instead of Watermill. Temp IS default as a map, which is where the preset test character pops up (or, to test your objects).

So, if we take a peek at tempTerrain.material, we see this (with what you need to change in blue.
Quote
import AlphaSplatTerrain1 from "terrain.material"
material Terrain/temp : AlphaSplatTerrain1
{
technique
{
pass
{
vertex_program_ref AlphaSplatTerrain/VP
{
param_named pageSize float 5000
param_named textureTileSize float 10
}
fragment_program_ref AlphaSplatTerrain1/FP
{
param_named alpha0Mask float4 1 0 0 0
}
}
}
set_texture_alias AlphaMap1 defaultMask.png
set_texture_alias Splat1 african_grass.jpg
}

** DO NOT USE WATERMILL'S .material file, it will crash your game because it has a different size than default! **
** YOU MUST CHANGE the line
Code: [Select]
param_named alpha0Mask float4 1 0 0 0 to
Code: [Select]
param_named alpha0Mask float4 1 1 0 0 or your second texture will not show up! it will just be black. **
Mine will look like this:
Code: [Select]
import AlphaSplatTerrain1 from "terrain.material"
material Terrain/temp : AlphaSplatTerrain1
{
technique
{
pass
{
vertex_program_ref AlphaSplatTerrain/VP
{
param_named pageSize float 5000
param_named textureTileSize float 10
}
fragment_program_ref AlphaSplatTerrain1/FP
{
param_named alpha0Mask float4 1 1 0 0
}
}
}
set_texture_alias AlphaMap1 defaultMask.png
set_texture_alias Splat1 brownsand.jpg
set_texture_alias Splat2 seasand.jpg
}

I added the line
Code: [Select]
set_texture_alias Splat2 seasand.jpg which comes from the .cfg file we just made!

'Tis the land of toasted marshmallows!



and I think that's it! I've been up waaaay too long to finish this, but I hope it will help! There are things I've yet to cover, but I shall cover them when I get my beauty sleep.
Thank you for reading!
~ Wolfie







Not possible for default, sadly! but possibly for temp (map maker)!
things to cover yet:
- water in default/temp maps
- object in default/temp maps

- anything else?[/i]

LOTS OF EDITS: for grammar, typo, etc.
« Last Edit: February 23, 2021, 08:18:19 PM by Kastilla »
Member of the FeralHeart community since 2011

Oddonelynx

  • Sr. Member
  • ****
  • Posts: 321
  • Paw-o-Points: 21
  • Big hyena lover here!
    • View Profile
Re: Customize default + testing maps! (IMAGE HEAVY)
« Reply #1 on: February 23, 2021, 02:43:15 PM »
I love it! I should try it out sometime.

It's not uncommon to see me posting around, but I'm not as active on here!
My presets

l3irdie

  • Old Windbag
  • Administrator
  • Hero Member
  • *****
  • Posts: 944
  • Paw-o-Points: 101
  • A Pisces.
    • View Profile
    • deviantArt
Re: Customize default + testing maps! (IMAGE HEAVY)
« Reply #2 on: February 23, 2021, 03:43:46 PM »
Ayyy, that's really cool!! I didn't know that you could even do this, thank you for showing us 👀

she/her | Lizz ⭐#0317 | muh bio | pfp by me / sig by ghostiesoot

Oddonelynx

  • Sr. Member
  • ****
  • Posts: 321
  • Paw-o-Points: 21
  • Big hyena lover here!
    • View Profile
Re: Customize default + testing maps! (IMAGE HEAVY)
« Reply #3 on: February 23, 2021, 05:40:14 PM »
I didn't know that you could even do this, thank you for showing us 👀
Yea me neither!

It's not uncommon to see me posting around, but I'm not as active on here!
My presets

Kastilla

  • Newbie
  • *
  • Posts: 27
  • Paw-o-Points: 4
    • View Profile
Re: Customize default + testing maps! (IMAGE HEAVY)
« Reply #4 on: February 23, 2021, 08:22:39 PM »
Thank you/you're welcome! It was a fun thing to discover, I'm surprised I didn't dabble with it sooner. Though, I have some sad news...

After testing, troubleshooting, blinking, and pausing to stare at the screen trying to remember what I was doing I have found that you are unable to translate the objects and water into the default map. This is because the default map does not have a .map file. Even if you create one, it will not read it. You also cannot make a map and name it default in the Map Maker because it just doesn't work. Even if you change the name afterwards, it will not register as the default map. This, however, could work for the temp map, which is the base for your map maker. Temp has a .map file! I have not tested it out, but I think I'm done spelunking Notepad for now.

If interested, I will put up the HeightMaps and Masks I have created along the way!

Member of the FeralHeart community since 2011