Jump to content

Tutorial: Converting a DEM to a heightmap


TrickyVein

Recommended Posts

Alright. I just went through the whole process again last night using a 1/3 arcsec swath of terrain from N. CA.

 

It is essential that you enable 'dithering' when you apply the gradient map. I am updating the tutorial with this information.

 

Here's why: Even though your image may be 16 bit, the filters Photoshop applies are only 8 bit; the gradient photoshop applies across your image is only 8 bit. Dithering allows interpolation between pixel values to take advantage of the greater resolution 16 bit has to offer.

 

I used a gradient map between 10% and 35% gray, then a guassian blur filter with a 1.0 pixel radius, and generated terrain textures (and chunks). No snow caps or anything else. 336 Terrain chunks.

 

Jeux, I suspect there are some default settings that you have applied to your images in photoshop that end up creating an artificial 'border' around your images when you go to export them or edit them. The images are importing, and it's an all-or-nothing process, so my only guess is that some wizardy is happening in photoshop before import that's causing border misalignment and an odd number of terrain chunks. In other words, your RAW images actually look that way.

Edited by TrickyVein
Link to comment
Share on other sites

  • Replies 101
  • Created
  • Last Reply

Top Posters In This Topic

Jeux,

 

Here is a copy of the template I use to get the 4 different 1024x1024 images. See if maybe it works for you. I just select hide/display each grey tile and select it with the magic wand then switch to the main image and copy from it and then paste into the 1024 window, rinse and repeat with all four squares. (It's 11 Mb so may take a little to DL)

 

http://www.thegeekenders.com/resources/FO2161/2048.psd

 

Tickey one thing to clarify in the tutorial is when you apply the gradient do you put the lower value as the darker shade or the lighter shade of grey? Because based off the way it reads I would think you would put the first button on the bottom (lighter) to the lower value and the second button on the bottom (darker) to the higher value, but from my testing it is the other way around otherwise your Highs would be Lows and vice verse.

Link to comment
Share on other sites

Oh. Yeah. The same principle applies. 'Higher' values are white, 'lower' are black. It's how DEMs work, and it's how the GECK's heightmap editor works too.

 

Also, @ Jeux: how many DEMs are you working across? If it's more than one, then the relative heights of the DEMs are going to be exported differently from VTP. You're going to need to stitch them together in VTP before exporting as one BMP, if that's what you're doing.

Edited by TrickyVein
Link to comment
Share on other sites

Apologies for the brief absence. You could say I was on a mini vacation.

 

6th attempt. Some county in Wyoming. 1 arc DEM.

 

This time around....folllowing every step carefully and analyzing Dakcenturi generous psd (thank you!), I seem to have solved two of my previous problems. To some degree. First off, no more borders! I guess it was the way I was transferring the quads while splitting them up. But no clipping, no messy borders...

 

Second, the terrain was not noisy at all when importing! It IS, however, still out of sync with the DEM. So much quality is still lost. I am left with very ugly lumps in the terrain, as if I used the GECK landscape tool itself.

 

DEM

 

BMP, Gradient and Gaussian Blur applied

 

Imported

 

Preview

 

Rendered

 

I know that this can be solved by finally cracking down on the Gradient Map procedure, so I am happy! Almost there! Seeing your terrain here, Tricky, I get even more excited about perfecting this haha

 

 

Also, @ Jeux: how many DEMs are you working across? If it's more than one, then the relative heights of the DEMs are going to be exported differently from VTP. You're going to need to stitch them together in VTP before exporting as one BMP, if that's what you're doing.

 

Just one :happy:

 

Ok, first off. it seems as though the land is inverted in relation to elevation . Or perhaps I'm not looking close enough....but if so, then that means the stopper to the far right has the HIGHER value then? Or no? In fact, let me just put all my "???" areas in a photo:

 

http://i1238.photobucket.com/albums/ff500/jeux793/Radiant%20Flux%20Screens/Questionongradientmap.jpg

 

Apparently, I am photoshop dumb :sweat:

Link to comment
Share on other sites

Excellent. That's how it works. You've got the process down. :thumbsup:

 

Here's the thing. You can do anything you want to the BMP after exporting from VTP. I like using the gradient filter because it makes things smoother and look prettier.

 

Σ = Select your lowest and highest values using the color boxes on the toolbar. These will become the 'endmembers' of your gradient map. Then apply the gradient map, checking 'reverse' and 'dither.'

 

But note: VTP flips the BMP vertically when you export it. I don't know why. It just does, so in pshop, go to 'edit' 'transform' and 'flip canvas vertically.' I guess I'll state that explicitly in the tutorial. And yes, the gradient filter should be reversed such that 'whiter' values correspond to areas of greater elevation on the DEM. Right now, your heightmap in the GECK is like an anti-DEM. Positive space is negative space. :)

 

Wyoming? Really? :biggrin:

Edited by TrickyVein
Link to comment
Share on other sites

Don't ask why I used Wyoming. A random draw.

 

What resolution are your DEMs? 1/3 arc sec? Or just 1? I went with the lowest because of file size, but perhaps I should start using 1/3 for more detail? (Or maybe it doesn't matter...? You mentioned worldspace size varying based on resolution choice)

 

And yeah! I've been really confused on the vertical flipping upon export thing with VTP. Strange. But at least I know I was not doing anything wrong. I poked around in the settings, and I could not find anything in particular to prevent it.

Link to comment
Share on other sites

  • 2 weeks later...

This an example worldspace, my end results of your lovely tutorial. I am working on others with much more "character" and "structure". I can't thank you enough Tricky. Thanks for providing this information with the community!

 

**NO statics, weather/climate, land textures, or optimization of any kind applied**

 

http://i1238.photobucket.com/albums/ff500/jeux793/Radiant%20Flux%20Screens/2012-05-27_00001.jpg

http://i1238.photobucket.com/albums/ff500/jeux793/Radiant%20Flux%20Screens/2012-05-27_00002.jpg

http://i1238.photobucket.com/albums/ff500/jeux793/Radiant%20Flux%20Screens/2012-05-27_00003.jpg

http://i1238.photobucket.com/albums/ff500/jeux793/Radiant%20Flux%20Screens/2012-05-27_00007.jpg

http://i1238.photobucket.com/albums/ff500/jeux793/Radiant%20Flux%20Screens/2012-05-27_00008.jpg

http://i1238.photobucket.com/albums/ff500/jeux793/Radiant%20Flux%20Screens/2012-05-27_00009.jpg

Link to comment
Share on other sites

  • 1 month later...
Hey I'm trying to get San Diego county in a heightmap, but can't it into GECK using the tutorial. Can you help me out? I'm using Microdem and Photoshop. I can get it into a raw file that's 16 bit grayscale and 1024x1024.
Link to comment
Share on other sites

Ok. I can view it in Geck, but in the render window, it's all distorted. I'm using photoshop cs5. VTB. Microdem. Why is the render all distorted?
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...