dalves69 Posted June 6, 2019 Share Posted June 6, 2019 (edited) 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.) Edited June 7, 2019 by dalves69 (see edit history) Link to comment Share on other sites More sharing options...
AV7daystodie Posted August 9, 2019 Share Posted August 9, 2019 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. Link to comment Share on other sites More sharing options...
Khurune Posted July 22, 2020 Share Posted July 22, 2020 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. Link to comment Share on other sites More sharing options...
KingSlayerGM Posted February 14, 2021 Share Posted February 14, 2021 (edited) 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? Edited February 15, 2021 by KingSlayerGM (see edit history) Link to comment Share on other sites More sharing options...
KingSlayerGM Posted February 15, 2021 Share Posted February 15, 2021 I tried both grayscale 8 bit tga and RGB 24 bit tga and both do not work 😕 Link to comment Share on other sites More sharing options...
7d2dMP Posted February 16, 2021 Share Posted February 16, 2021 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. Link to comment Share on other sites More sharing options...
KingSlayerGM Posted February 16, 2021 Share Posted February 16, 2021 (edited) 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 Edited February 16, 2021 by KingSlayerGM (see edit history) Link to comment Share on other sites More sharing options...
7d2dMP Posted February 16, 2021 Share Posted February 16, 2021 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". 1 Link to comment Share on other sites More sharing options...
KingSlayerGM Posted February 16, 2021 Share Posted February 16, 2021 Yes, I just tried and this happened: So how did you managed to get it to work in your map generator? Link to comment Share on other sites More sharing options...
7d2dMP Posted February 16, 2021 Share Posted February 16, 2021 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. 1 Link to comment Share on other sites More sharing options...
KingSlayerGM Posted February 16, 2021 Share Posted February 16, 2021 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. Link to comment Share on other sites More sharing options...
KingSlayerGM Posted February 16, 2021 Share Posted February 16, 2021 Also, what I don't understand is, why does the distant terrain look smooth, but the actual terrain has those ugly small steps? Link to comment Share on other sites More sharing options...
7d2dMP Posted February 16, 2021 Share Posted February 16, 2021 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) Link to comment Share on other sites More sharing options...
KingSlayerGM Posted February 17, 2021 Share Posted February 17, 2021 (edited) 11 hours ago, 7d2dMP said: 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? Edited February 17, 2021 by KingSlayerGM (see edit history) Link to comment Share on other sites More sharing options...
7d2dMP Posted February 17, 2021 Share Posted February 17, 2021 Send me your dtm.png or even better all your folder map. Link to comment Share on other sites More sharing options...
KingSlayerGM Posted February 17, 2021 Share Posted February 17, 2021 (edited) 11 minutes ago, 7d2dMP said: Send me your dtm.png or even better all your folder map. Thank you so much for your help Here it is: https://we.tl/t-1vAFRaitXm Edited February 17, 2021 by KingSlayerGM (see edit history) Link to comment Share on other sites More sharing options...
KingSlayerGM Posted February 17, 2021 Share Posted February 17, 2021 (edited) CONCLUSION: If anybody is interested here is what we found: using a grayscale 16 bit dtm.png works, however the game will convert it to 8 bit, so the world will look blocky imagemagick works fine to convert a 16bit grayscale png to raw and the world will be smooth if you are using python to generate the world: you can use numpy to save a uint16 2D array to raw image using ndarray.tofile('dtm.raw') and the world will be smooth i couldn't get any dtm.tga file to work I hope this will help others too Special thanks to 7d2dMP for his patience Edited February 18, 2021 by KingSlayerGM (see edit history) 2 Link to comment Share on other sites More sharing options...
Guppycur Posted March 22, 2021 Author Share Posted March 22, 2021 Wow so okay this is an old ass tutorial for back when TFP used a different method. My current work flow is to work directly with the .raw file in Photoshop CS6, which reads it just fine. NitroGen has a nice .raw to .png converter for when you want to use NitroGen on your height map... Once TFP settles on a method, I'll do another tutorial, but in the meantime, I recommend finding CptKrunch's discord link on here, as he has a discord dedicated specifically to map creation. @Cpt Krunch 's discord is https://discord.gg/YrC7bAzh9J 1 Link to comment Share on other sites More sharing options...
Father Posted May 6, 2021 Share Posted May 6, 2021 could someone possibly help me figure out why my towns and cites are not getting spawned on the actual map https://imgshare.io/images/2021/05/06/oie_713840C4aTXMbw.jpg the nitrogen is generating new pieces of land to place towns... this is the height map i'm using https://imgshare.io/image/pyem8K have tried several settings but it never spawns anything on main part of the map Link to comment Share on other sites More sharing options...
warmer Posted May 29, 2021 Share Posted May 29, 2021 On 2/17/2021 at 7:09 AM, KingSlayerGM said: imagemagick works fine to convert a 16bit grayscale png to raw and the world will be smooth THANK YOU for the note on converting 16bit greyscale to raw to get a smooth world. I spent 5 hrs trying to figure out what the heck was going on. Link to comment Share on other sites More sharing options...
ExeBT Posted December 28, 2021 Share Posted December 28, 2021 Any knowledge about A20 Stamps? I took a look and its look very different than normal HeightMaps Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now