• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

Editing Height Maps

I've recently got into modding existing worlds in 7DTD. Editing the biomes, is very easy, but my attempts at editing the height maps have not worked. In the original video posted it mentioned editing the TGA file, but I'm running A17.3 and it only exports the main DTM file (Which I haven't been able to edit). I was wondering if there is a different way to edit the height maps without the TGA file?

My apologies if it was posted somewhere on this thread earlier, but I hadn't found any information yet.

 
Last edited by a moderator:
I know I've tried using Gimp and some other editors. I thought I tried using Photoshop yesterday, but I may be wrong... By default, all of the computers that I've tried this on see the DTM.raw file as a sound file.

I didn't know if it was possible to create a new DTM.raw file from the existing genHM.png or poiHM.png files I currently have.

 
at the launch of a17, it was possible, albeit schetchy, they have since removed that, and reported rwg broken, but will fix in a18. nitro does have an option to import the genhm.png and poigm.png and will generate you a raw file

 
I tried opening the DTM.raw file in Photoshop and really wasn't sure what I was looking at. I was expecting something like the POI Height Map, but it looked like there was much more information in there.

I have been using NitroGen and love it. Are there any links or information showing how to import the genhm.png and poihm.png to export the DTM.raw file?

(Actually I'm doing some testing with NitroGen now and may have figured out how to do this.)

 
Last edited by a moderator:
I want to share a way to edit dtm.raw without Photoshop, since I didn't want to pirate or buy it. It is definitely a clumsy way, so If someone knows easier way to do it with free software, I would be very glad to know!

Working with dtm.tga not allowing to edit already generated map + integrated smoothworldall command not always work nicely for roads.

I do it with GIMP + Rawtherapee plugin.

So when you are opening dtm.raw / dtm_processed.raw in GIMP you should check "show all files" and in "select file type" choose "Raw image data". In the next window these parameters:

Image Type: Grayunsigned 16 bit Little Endian

Width & Height according to your world size (let's take for example 8192 & 8192)

By default map is vertically flipped, so you shoud flip it before & after the editing (Image - Transform - Flip Vertically) and also set up grayscale mode: "Image - Mode - Grayscale". If you want to create heightmap from scratch, you should also check "Image - Precision - 16 bit integer".

Then save as .tiff:

Export As: Select File Type - TIFF image (uncheck everything in Advanced window). In the end .tif file should be the same size as .raw file (134.2 MB for 8192x8192 world)

Next process is basically converting this .tiff to .raw file:

Open .tiff the same way you open .raw (show all files & select file type - raw image data), but with these parameters:

Image Type: Indexed

Offset: 8

Width is double from the original (in this case 16384), Height as it is (8192).

And then export that as "raw image data" with .raw prefix.

 
Thanks for this Guppycur, I had to do a biome repair for someone earlier and it worked a treat, then I thought why not learn how to do height maps to, and here I am. Now to find one that allows me to draw rivers. XD

Much thanks again.

 
Hello everyone, Guppycur thanks for the nice tutorial!

I cannot make it work though... I generated a 4k world, I created my own dtm.tga file and put it in the world. I also removed the .raw file. But the game doesn't load the world at all. It gives me the exception "Array out of bounds"  :(

Also it seems that generating a world through the game only generated the .raw file, not the .tga, wth?

If anybody can help me it would be very appreciated :)

Bonus question: if I generate a 16K heightmap, or maybe even a 32K one, would the game be able to handle it correclty or is it limited to the vanilla sizes?

 
Last edited by a moderator:
Hello KingSlayer,

The DTM.RAW is a grayscale 16 bits little endian binary file.

I don't know about TGA file, but you can use a DTM.PNG file (gray scale: red=green=blue)

And i think that the dtm picture should have the same size than the map.

Look into the "Tools" section, there is a software to check your files.

 
Thank you for your answer! So can I just use a png file?

If  not, I guess I will just discard the TGA file then and just try to generate a raw file. I think I found the software that you mentioned, is it this one?





I will let you know if I get it to work :)

 
Last edited by a moderator:
Yes you can use a PNG (i use it in my map generator). But a grayscale PNG is 8 bits (0-255) and the raw dtm is 16 bits (0-65535), so i suppose that the ground will be not so smoth.

For the software search for "World Checker".

 
Thanks for testing. I really supposed that TFP used all the values of the 16 bits pictures and your screenshot shows it.

For my map gen, i use a .... flat map ! (for now) so i don't have any problem (it is so nice to drive a car without problem all around the map)

For the generation of a dtm, read above. Some use the TIFF format and says that it works.

Also read this:

https://community.7daystodie.com/topic/17041-any-way-to-create-my-own-dtmraw/

https://chrani.net/blog/messing-with-the-world-of-7dtd-part-1-of-3/

Hope that this will help you.

And remember when you save the TGA or TIFF file, you need to specify 16 bits grayscale little endian.

If your graphic software doesn't permit to do this, try another one.

 
So I tried with 16 bit grayscale png, but the result is still the same... Thank you for linking those other forum posts, I am going to check them out.

 
If you can save a 16bits PNG i think that you should work on this.

Verify that the grayscale decrease/increase is smooth on screen, try a smooth function inside your graphic software (or blur)

 
If you can save a 16bits PNG i think that you should work on this.

Verify that the grayscale decrease/increase is smooth on screen, try a smooth function inside your graphic software (or blur)
Yes I am saving 16 bit grayscale png, however it still doesn't work.

I have a guess: maybe unity by default converts png to 8 bit?

 
Last edited by a moderator:
Back
Top