Jump to content

Editing Height Maps


Recommended Posts

@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.

Link to post
Share on other sites

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

Edited by backdownhipi
1st edit, spelling. 2nd edit, additional info (see edit history)
Link to post
Share on other sites
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.

Link to post
Share on other sites
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

Link to post
Share on other sites
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.

Link to post
Share on other sites
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.

Link to post
Share on other sites
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

Link to post
Share on other sites

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?

Link to post
Share on other sites
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.

Link to post
Share on other sites

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.

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

looks like a consle command aka swa in f1. It sounds better than what ive been doing. op 1 editing in b131 till error is rectified.

op2 replaced 240 dll with 231 dll but renders the jagged minecraft hills but can paint general terrain. op 3 edited the gernationrules class to

remove the line for rgb32, then replace biome mapper in rwg, again partial results. op 4 havenot tried yet , trying to refrain from hacking too much, but will parse the dll and nuke biomeidmapper references in world generation and worldgenerationinput, then edit the rwg putting back biome gen at bottom. so if there is an easier way im all for it.but if it continues same direction, im going to remove all infinging classes, and import legacy ones.

Link to post
Share on other sites

I am in the process of putting together a tutorial for taking this image and converting it to a heightmap and using that start-to-finish into a world. I expect to finish today or tomorrow. I will also include the modified DLLs necessary and a fully realized world (one town, one trader).

 

NOTE: The method I am using requires hand painting biomes and roads as well as manual placement of water and POIs.

Edited by Red Eagle LXIX (see edit history)
Link to post
Share on other sites

Here are the patched DLLs (till the fixed version comes from TFP).

https://www.dropbox.com/s/ofenxy18fm8t9cm/swa_smoothworldall_patched_DLL_files.zip

 

Basically there is a bug where smoothworldall (swa) when used with noregion flag, assumes the world is 4096x4096.

I've hacked versions of the DLL for alternate world sizes.

A more improved fix would be to first check the world size is square (since the math for smoothing requires that), then set the array, loop, and writing sizes based on the actual world.

Code Compare of Stock and modified for 8192x8192:

CodeCompare_Stock_vs_8192.gif

 

This allows the 'swa <numpasses> noregion' command to be used from the console to smooth the world and make it look not so minecrafty. Just pick the DLL for the sized world you've got.

'swa 5 noregion' being a nice value.

Edited by Red Eagle LXIX (see edit history)
  • Like 1
Link to post
Share on other sites

FWIW, the demo world is ready to have a trader, town full of POIs, water, and connecting roads added. I don't intend to do a whole maps worth, just a small area to well, demo.

Current state:

heightmap from custom image: done

terrain smoothed: done

custom biome layout: done

initial road demo: done

No mistaking the radzone on this map checkerboard biomes surrounded by road.

?interpolation=lanczos-none&output-format=jpeg&output-quality=95&fit=inside|1440:810

Edited by Red Eagle LXIX (see edit history)
Link to post
Share on other sites
OK, so is this something that is going to get passed on to them, or I should expect to always use a custom DLL to generate maps with smoothing?

I thought it was implied that I told TFP by the fact that I said "Here are the patched DLLs (till the fixed version comes from TFP)."

 

Yes, I reported the issue to the right people and it will be fixed. I don't have the details as to when and which build.

Link to post
Share on other sites
I thought it was implied that I told TFP by the fact that I said "Here are the patched DLLs (till the fixed version comes from TFP)."

 

Yes, I reported the issue to the right people and it will be fixed. I don't have the details as to when and which build.

 

Thanks very much.

 

Edit: BTW, I did read that, but I guess I should have worded my question better in some way. I basically just wanted to know if they were aware and will fix it, or if we just had to sit it out and hope for them to catch it... which you've just answered. Thanks again.

Edited by AtomicUs5000 (see edit history)
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...