Jump to content

Editing Height Maps


Recommended Posts

I'm having that issue currently. Care to explain how you worked it out? :)

 

Mate, I was loading the map through New Game or Continue Game. Instead of through Editing Tools -> World Editor. You basically have to copy the generated map from the %appdata% path to the "...\steam\steamApps\common\7 Days To Die\Data\Worlds" path under a subfolder named for your world.

Then you can do smoothworldall from inside the world editor (using the console).

 

Having said all that, I did find that it didn't work on one of the heightmaps I was using, but I'm not sure if that was because the heightmap itself was jagged. I'll need to do more testing.

Link to post
Share on other sites

Hey GuppyCur,

 

So I've got to the point now with my app I'm writing that it will reconfigure the prefabs to the correct height (haven't tested it yet) and there is still more to do as I'd need to smooth the terrain for the prefab to sit on etc, etc. But for now I'm leaving that and moving on.

 

So my next proof of concept is to generate my own noise, instead of relying on 3rd party tools (I'll be relying on 3rd party libraries instead ). But the issue is I'm struggling to work with tga format in code, it seems to be a very old format and not a lot of documentation out there. Do you think it would be safe enough just to output PNG? The only thing I'm concerned about is that isn't the PNG upside-down whereas the tga isn't?

Link to post
Share on other sites
That, I wouldn't know.

 

Ok, so I've gone with the PNG format and it's been working well. Now the only issue I have is that even though I'm writing 16bit png files, it's still stepped. Guppycur, are you saying that when you do a hand drawn PNG, with enough blur, it doesn't generate a stepped map? If that is the case it would indicate that I'm some how outputing the wrong kind of PNG file.

 

FYI : Created a thread for my progress in Tools : https://7daystodie.com/forums/showthread.php?112889-Squishy-s-Random-Gen-App

Link to post
Share on other sites

I can't speak for png, those are compressed, but for .raw files, yes. I think it's the compression that kills it, either going from 16 to 8 bit, or straight up using a compressed file like a .png.

 

The game supports/supported .tga's, which had an option to NOT be compressed, but I don't know crap about file formats but I don't think .png is lossless.

 

- - - Updated - - -

 

Looking at your pics, you're doing biomes, which CAN be compressed, so the "steps" should have nothing to do with that. Only the dtm.raw (the actual height map) would cause that as far as I know.

 

- - - Updated - - -

 

You're in uncharted territory, my friend; I think you're on your own. =)

Link to post
Share on other sites

i really just want to make the entire game flat except a bounding box of steep mountains that keep the player from getting into the rad zone. so that the tops of these mountains are the snow biome, the outside is wasteland and the inside is forest and the forest extends into a mottled plains and the plains into desert, and then there is this oasis of meadows around a giant lake in the center with a smattering of birch and maple trees.

Link to post
Share on other sites
I can't speak for png, those are compressed, but for .raw files, yes. I think it's the compression that kills it, either going from 16 to 8 bit, or straight up using a compressed file like a .png.

 

The game supports/supported .tga's, which had an option to NOT be compressed, but I don't know crap about file formats but I don't think .png is lossless.

 

- - - Updated - - -

 

Looking at your pics, you're doing biomes, which CAN be compressed, so the "steps" should have nothing to do with that. Only the dtm.raw (the actual height map) would cause that as far as I know.

 

 

Ok, so I've found out the PNG isn't lossy. I've also found out the that my app was generating 8bit colored PNGs for the dta.png. 8bit is fine for the Biome.png as you say. I found this out by opening in Krita. I ended up having to throw out the code I was using to write the png file, and find a better way (not so easy), but I think I've done it. Krita is now detecting the dta.png as a greyscale 16bit PNG. Hopefully I'll get a chance to test it out tonight in game. Fingers crossed it works.

 

If this does work I wouldn't be surprised if TFP aren't using the dta.tga anymore, it's not exported anymore and it's a difficult format to write to (little support).

 

 

- - - Updated - - -

 

You're in uncharted territory, my friend; I think you're on your own. =)

 

Awesome! That didn't take long :smile-new: . With my generator, I'm aiming to create some truely interesting "biomes". And I mean that in a sense that is seperate to TFP "Biomes". The first one is the DesertCanyon one that I posted a pic of, then a more flat desert one. Each of my "Biomes" will have it's own Biome.png that can contain multiple TFP biomes, in the case of the Desert ones, I intend on adding some green oasis. Each of my biomes will have it's own dta.png, splat and prefab.xml.

 

Right at the end of the generation process, all the biomes will be mixed and blended together. (That is going to be tricky).

 

I figure this process will take ages to generate, but if your a dedicated server hoster, or someone that just likes a good seed, then you wouldn't mind generating overnight.

Link to post
Share on other sites
I'm nearly a photoshop wiz... I've been trying out Krita this past week as per your suggestion on another thread and i hate it because it keeps crashing.

 

So for a 4k world, make a 4096x4096 .raw file that's a medium to dark grey, then gradients up to a white on the borders. Start a 4k world, exit the game, delete the region files you were just in, copy the dtm.raw file you just made to the worlds folder of the world you just made, and voila. Flat world with slopes at the borders.

 

Kritta is old news, for back when we didn't know why biomes.png was crashing (we now do). BeatKidz has a .PSD file with the biome and road presets already set up, available for download.

Link to post
Share on other sites
i really just want to make the entire game flat except a bounding box of steep mountains that keep the player from getting into the rad zone. so that the tops of these mountains are the snow biome, the outside is wasteland and the inside is forest and the forest extends into a mottled plains and the plains into desert, and then there is this oasis of meadows around a giant lake in the center with a smattering of birch and maple trees.

 

Hey SlicksGirl, I can make this for you pretty easily with my generator app. If you give me the world files you want to use, well actually, just give me the size and the prefabs.xml, and I'll generate you a flat map with cliffs and also adjust the prefabs to the correct height.

 

- - - Updated - - -

 

Hey Gummycur,

 

Yeah, so after my refactor to 16bit grey scale, it still didn't work. I still have stepping. So as you say I might need to work out how to write the raw files. Any clues?

 

Also, does PSP load and save the raw files ok? Because if so I might shell out for a copy.

 

Cheers,

 

Squishy.

Link to post
Share on other sites
So for a 4k world, make a 4096x4096 .raw file that's a medium to dark grey, then gradients up to a white on the borders. Start a 4k world, exit the game, delete the region files you were just in, copy the dtm.raw file you just made to the worlds folder of the world you just made, and voila. Flat world with slopes at the borders.

 

Kritta is old news, for back when we didn't know why biomes.png was crashing (we now do). BeatKidz has a .PSD file with the biome and road presets already set up, available for download.

 

thanks, I'll restart my map generation this next week.

 

- - - Updated - - -

 

Hey SlicksGirl, I can make this for you pretty easily with my generator app. If you give me the world files you want to use, well actually, just give me the size and the prefabs.xml, and I'll generate you a flat map with cliffs and also adjust the prefabs to the correct height.

 

 

 

thank you for the offer. I think i need he practice as I want to eventually develop video games.

Link to post
Share on other sites

thank you for the offer. I think i need he practice as I want to eventually develop video games.

 

Well if that is the case, and you know C#, the code for my app is on GitHub. You can grab it and generate stuff yourself. It's a bit messy atm, but all the pieces are there to hack what you want.

 

PM me and I'll send you a link.

Link to post
Share on other sites
  • 1 month later...
Yeah, it's good, but it could be better if it allowed us to mark places on the map to place cities and stuff like that. I want to recreate Fallout 4 map, just for fun.

 

I'm theory if you flatten the dtm in areas it should create towns there.

Link to post
Share on other sites
I'm theory if you flatten the dtm in areas it should create towns there.

 

I'm working on a Fallout 4 map and in the huge flat place where you would expect a city, Nitrogen didn't place anything except road. When I tried to generate again, it placed a city there but it was small one so the huge free space around it was still unused, but it's still pretty cool. It looks much more realistic than what we get in standard RWG.

Link to post
Share on other sites
I'm working on a Fallout 4 map and in the huge flat place where you would expect a city, Nitrogen didn't place anything except road. When I tried to generate again, it placed a city there but it was small one so the huge free space around it was still unused, but it's still pretty cool. It looks much more realistic than what we get in standard RWG.

 

Just added the option to NitroGen (v0.253) to set city and town spawners to the mask.

So you can define the preferred spawn locations (the center) for those settlements. (placing red or green pixels onto the mask image)

Link to post
Share on other sites
  • 2 weeks later...

Hello everyone, since Nitrogen first came up i play a lot with it especially with the custom heightmap cos' it's just brilliant!

So i begin with terrain party but quickly found that the heightmap were really innacurate and have to use too much gaussian blur for my tastes.

I decide to look for better sources and quickly find a really impressive Database with the entire world cover in a far better resolution.

It's a bit tricky at first but works really good and fast after some tries.

 

https://johnflower.org/tutorial/export-heightmaps-qgis-screenshot

https://johnflower.org/tutorial/export-heightmaps-qgis-print-layout

The guy explained everything on those tutorials for using QGIS (free software) with sets of DEM (Digital Elevation Model) from Nasa or else and create a really good Heightmap.

 

For sources you can look here http://viewfinderpanoramas.org/dem3.html

there are different sets of data available, The 3" are good enough for a Heightmap but some places even have there DEM in 1" (far more precise) that you can use at real scale without minecraft looking blocks even on default/rough smoothing.

 

Here you can see a 16k area first pic is from 1" DEM second from terrain party exact same spot https://imgur.com/a/vTL693b the most interesting is the possibility to resize the heightmap to be the size of upcoming map itself and not just a 1080 px square with low quality the first is a 6144px with better details when terrain party higher size image is just really bad let's be honest.

 

I'm using a lots of real elements within maps and it feels really good.

Here is my last map i'm now using nitrogen to create a first map in which i add real world elements

https://imgur.com/a/5eEyfnK . Some small editing for a badass looking volcano too :p

Just remember to edit colors for water (spawns below 34) i'm only using Gimp for editing and it works fine.

Have fun playing with nasa stuffs :p And thx again to Damocles for his amazing Tool ;)

Edited by Hell_Vice (see edit history)
  • Like 1
Link to post
Share on other sites
  • 3 weeks later...

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.

Edited by dalves69 (see edit history)
Link to post
Share on other sites

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.

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...