• Mods are now organized as resources. Use the Mods link above to browse for or submit a mod, tool, or prefab.

    The TFP Official Modding Forum Policy establishes the rules and guidelines for mod creators and mod users.

Editing Height Maps

@brycie if you get holes in your map, 1 use solid brush, better to use solid pencil, 2 use only exact color, any other coloreven if off by 1 is considered invisible to game. After edit zoom to 500+% and look for any off colors. Most of the issues happen at borders between two biomes. If you zoom in you see a blended color, but eyedropper will say 0 65 0 instead of 0 64 0. that 1 dot is a 3 meterblock in game or equal to bad chunk load

 
However, I've ran into a problem with the splat3 png, I can't seem to erase roads. The game still generates roads even if they aren't drawn in the file. The ones I do draw show up, but the ones I delete remain.

I am editing a random gen file though, so maybe it has something to do with that? Anyone else having this issue?
I've been doing all of my world edits in paint.net and had a similar issue with the splat3.png

I had added a whole bunch of roads and paths without issue, my problem came when I wanted to delete some and using the eraser in paint.net. Basically after loading up the world I found i had some huge roads where I had deleted small ones and it was not until I seen the in-game height map (world editor) and actually noticed i had what appeared to be white gaps mirroring exactly where I had deleted stuff from the splat3.png

I was able to revert the changes and get rid of the issue by merging an old backup with the edited one full of holes and have tried sampling an empty area on the image and painting over the stuff I want rid off (same problem). Deleting from the layer just seems to punch a hole through it and leaves asphalt where ever these holes are.

I'm sure this is fixable and it's just me doing something wrong, if anyone knows how to remove/erase from a layer without totally sabotaging the image, that information might just get you a Christmas card!.

 
Hi guys for some reason, im not generating the dtm.tga file in my worlds folder, just the raw file. Im running single player local install, same directory as the video, even searched the whole directory and couldnt find it. Any ideas?

 
There's something terribly wrong with the current build; I'm hoping it's temporary, but yeh, it's not doing what it's supposed to be doing at the moment.

 
@Gipothegip If you are deleting roads and the road is returning then, you need to check the setting in the app you are using, you are not deleting the layers. Easiest way to verify is , create a png same size as the splat 3 with "transparency background" save and put it in your folder. no roads, but your edited one has them. means you didnt edit the correct layer. second way, save your png as a tga, edit te 3 rgb layers save open that file then save it as png.
What do you mean by "layers"? Are you talking about channels?

I do see that something is still there looking at the rgb/a channels. I'll have to figure out how to delete those, clearly they aren't being erased.

Hi guys for some reason, im not generating the dtm.tga file in my worlds folder, just the raw file. Im running single player local install, same directory as the video, even searched the whole directory and couldnt find it. Any ideas?
I've noticed that too, it must be a change to one of the recent builds, as when I was first fiddling with it the game did generate a TGA file.

 
I have a few bits of info. i have created a height map myself. and used the water.xml from a generated world of the same size. it works for the most part. here is what i have found out so far.

in the water.xml there is a lot of listings for water. so it tells me its not just one level of water at -1 like it used to be. its broken up into sections. each one seems to be about 20 blocks a long the z axis. the x axis seams to be infinite.

Don't quote me on this info, as i was sick when i did the science. so given the correct info, we could create a water.xml that could work for most custom worlds, given that the y value of the water was the same for all water entries. if you need like a small lake at the top of the mountain, that would require its own special water entry. but for the most part, sea level will all be the same y value.

so in conclusion, if you created a water entry for every 20 z blocks, for the full length of the map, say 8192 that would be 410 entries. and they should allow for water at any area that is below the specified z value. i actually had towns and stuff at the bottom of the ocean during one render, and with a proper scuba mod, that would be fun to explore a water world. (<- all credit to McTaco if someone uses that idea.)

also one time i messed up my height map and the land was like 20 blocks above each poi, so i had to dig down to reach any poi it was... interesting. (<- again, credit to McTaco if someone uses this idea )

As far as roads, i was made to believe it was a simple as editing the splat3.png

problem is, its just not a black background it is transparent. and when i edited it, putting transparent as the background, the entire world was a road lol.

so until someone finds out more info in regards to that, perhaps I'm missing something and there is a layer order or something, i can only suggest using a splat 3 from a different render

 
Last edited by a moderator:
Hi guys for some reason, im not generating the dtm.tga file in my worlds folder, just the raw file. Im running single player local install, same directory as the video, even searched the whole directory and couldnt find it. Any ideas?
I'm guessing you're on a Mac.

The .tga does not appear to be generated on my Mac either.

Presumably, we should still be able to edit the .raw file... but I'm still coming up with a workflow for this.

 
I have a few bits of info. i have created a height map myself. and used the water.xml from a generated world of the same size. it works for the most part. here is what i have found out so far.in the water.xml there is a lot of listings for water. so it tells me its not just one level of water at -1 like it used to be. its broken up into sections. each one seems to be about 20 blocks a long the z axis. the x axis seams to be infinite.

Don't quote me on this info, as i was sick when i did the science. so given the correct info, we could create a water.xml that could work for most custom worlds, given that the y value of the water was the same for all water entries. if you need like a small lake at the top of the mountain, that would require its own special water entry. but for the most part, sea level will all be the same y value.

so in conclusion, if you created a water entry for every 20 z blocks, for the full length of the map, say 8192 that would be 410 entries. and they should allow for water at any area that is below the specified z value. i actually had towns and stuff at the bottom of the ocean during one render, and with a proper scuba mod, that would be fun to explore a water world. (<- all credit to McTaco if someone uses that idea.)

also one time i messed up my height map and the land was like 20 blocks above each poi, so i had to dig down to reach any poi it was... interesting. (<- again, credit to McTaco if someone uses this idea )

As far as roads, i was made to believe it was a simple as editing the splat3.png

problem is, its just not a black background it is transparent. and when i edited it, putting transparent as the background, the entire world was a road lol.

so until someone finds out more info in regards to that, perhaps I'm missing something and there is a layer order or something, i can only suggest using a splat 3 from a different render

Thanks for the info, i will test it, The spalt3 are so confused to me, i did the same, put all transparent, but i get the same roadmap LOL it never generate a empty roadmap

 
I started with a brand new blank splat3.png. Added some roads. Showed up fine. deleted some, no luck. If I restore the starting completely blank splat3.png I return to a world with no roads.

 
I started with a brand new blank splat3.png. Added some roads. Showed up fine. deleted some, no luck. If I restore the starting completely blank splat3.png I return to a world with no roads.
Solved:

ignore the transparency. Created a new all black, no transparency splat3.png. Painted some roads, deleted regions, load game, roads there. Painted black over roads, deleted regions, load game, roads GONE!!!! Yes.

 
Solved:ignore the transparency. Created a new all black, no transparency splat3.png. Painted some roads, deleted regions, load game, roads there. Painted black over roads, deleted regions, load game, roads GONE!!!! Yes.
So it sounds like transparency is what was causing my map to be filled with road texture when editing an existing splat3.png? I did notice that the road texture was filling area just up to the bounds of the existing roads.

 
So it sounds like transparency is what was causing my map to be filled with road texture when editing an existing splat3.png? I did notice that the road texture was filling area just up to the bounds of the existing roads.
transparent area is just to show us the biome/height map overlay when debug is active on map, its not necessary, you can just make a little pixel with the color RED in the splat3 and let it transparent. i am doing it to test my new maps

 
I've been playing around with the dtm.tga file. For the most part, it works very well. However, I am having a problem and I am not sure exactly how to fix it.

Basically, I cannot seem to get the same smooth ground on inclines as you would normally get in random gen. For each step in rgb value, there is a step in the terrain instead of a slope. The result is a very minecraft-looking world.

Does anybody know how smoother terrain is accomplished?

I suspect a couple things are possible.

One is that perhaps the dimensions of the dtm.tga image is different than the map size, and maybe the raw file is generated with floating point values in between each rgb integer value. I have no idea if this is the case because the game no longer provides this file.

Another possibility is that the tga is in a specific format that allows for floating point values, say in between rgb(100, 100, 100) and rgb(101, 101, 101).

Any clues?

 
I've been playing around with the dtm.tga file. For the most part, it works very well. However, I am having a problem and I am not sure exactly how to fix it.Basically, I cannot seem to get the same smooth ground on inclines as you would normally get in random gen. For each step in rgb value, there is a step in the terrain instead of a slope. The result is a very minecraft-looking world.

Does anybody know how smoother terrain is accomplished?

I suspect a couple things are possible.

One is that perhaps the dimensions of the dtm.tga image is different than the map size, and maybe the raw file is generated with floating point values in between each rgb integer value. I have no idea if this is the case because the game no longer provides this file.

Another possibility is that the tga is in a specific format that allows for floating point values, say in between rgb(100, 100, 100) and rgb(101, 101, 101).

Any clues?
I've been trying to figure this out as well. On the Mac, we don't get dtm.tga files at all. Only .raw files are generated... so I'm trying to recreate the .tga from the raw file.

If I open the raw file in photoshop, I'm presented with this dialog:

FSoWxDp.png


If I open the file with these default settings, I get a 2 channel file. One channel appears to be the tga heightmap, the other seems to be the channel that is used/generated for the smoothing pass:

Navezgane channel 1:

11QMUqK.png


If I take only the "tga" channel, which is 8-bit grayscale, save it as a tga, the game will not create the world because it expects a higher bit depth. At least 16/32 I think the error says.

So I changed the tga to RGB at 8bit/channel, which creates a 24bit tga.

Using this file, and after deleting the raw file and regions, the game WILL generate a new raw file, but I end up with the pixellation/stairstepping that you mention.

If I open this generated raw file as above, the "tga" channel looks fine, but the second "smoothing" channel is solid black.

Now, if I open a game created raw file, and change it to 16 bit single channel file in the open dialog (above image), and save that as a tga...

I get the same pixellated result (solid black second channel is generated).

So it think what you are seeing might be related to bit depth, or the generation of that "smoothing" channel. I may be out of luck on the Mac, but from what I'm reading on the forums, normally on the PC, the generation of raw from tga seems to be working correctly.

If someone could post a game generated .tga file that works (Navezgane dtm.tga?) so that I could see what the game expects, that would be helpful.

I CAN edit the raw file "tga channel" just resave the file, and the changes show up in the world without pixellation, but I have a feeling this would cause problems if I make edits close to POIs.

 
Its because of the addition of biomeidmapper in the Rwgmixer.xml its also in the dll. The off switch is a line that says do not recognize rgb32 files. That would be your tga or a Png there is an obsure reference to using pngs also tga.png Until the worldgeneration\generationrules class is rewritten to allow both inputs or reverted like in a17b197-b131. you will only get the black layer. plus no smoothing it will look like alpha 1 or minecraft going up a hill.

```this.TerrainMap = new Texture2D(this.WorldSize, this.WorldSize, TextureFormat.RGBA32, false);```

TextureFormat.RGBA32, false wasnt there before b140, its some where else in the dll or another dll. but basically turns off manual terrain, or hoops it, and open up the random call from rwg again temporarily.

 
Last edited by a moderator:
Back
Top