Adverti horiz upsell
Digital Elevation Model (DEM) Terrain Displacement
Digital Elevation Model (DEM) Terrain Displacement
DezFX, updated 2006-02-25 10:23:33 UTC 146,676 views  Rating:
(5 ratings)
Page 3 of 5

Digital Elevation Model (DEM) Terrain Displacement

In the save options window you want to set:
  • * Units = Feet
  • * Byte Order = "PC" (Intel)
  • * Header = None
  • * Grays = Equalize to Range*
  • * Bit Depth = 16
  • * Fill = Black


*Note: In the "Range" you need to enter your "Min Elevation" and "Max Elevation" from the rangeStatistics created on the previous page. This will equalize all of the greyscale images to the same black-to-white elevation ratios. That way they match up seamlessly when stitching them together. If you did not do it this way, the images would have drastic variances when stitched together and the displacement would have holes in it where neighboring images met. Being that we set the Units to Feet, you must enter the feet values for the elevation. If you need a calculator to convert meters to feet, you can download my script

Click the [SAVE] button and accept the default name for the file. It will look something like:

* "GoldenLakes_971x1401_PC.raw"

The 971x1401 is the image size. You will need these numbers when reading the file into Photoshop later, so I just find it easier to leave them as part of the *.raw file name for reference. Go ahead and repeat this process to convert the rest of our 15 quads.

Here comes the fun part! Once you have all of your quads converted to *.raw files crack open Adobe Photoshop. Currently in Maya v. 6.5, Mental Ray has a texture limitation of 8k (8192 x 8192). Even though Mental Ray says it can handle 8k textures, I've had problems when using exactly 8k images, so I would just go a little smaller like around 8100 x 8100 resolution. Create a new document in Photoshop and set:
  • * Width = 8100
  • * Height = 8100
  • * Color = RGB 16 bit
  • * Background color = Black
If you are using different DEMs than we are downloading for this project you may need to have a larger image. Just make sure it is square so when we reduce it later it will fit evenly on your NURBS displacement plane, which will be square. Remember the final image has a max of 8k for Mental Ray.

Now you want to open all of the *.raw files you created with PullSDTS. When you select a *.raw file to open you are greeted with an options box.



For the "Dimensions" you need to enter the Width and Height values from the quad names we saved while exporting from PullSDTS. (...971x1401...) Then you want to set:

* Depth = 16 Bits
* Byte Order = IBM PC

Repeat this process opening all 15 *.raw files into Photoshop. Next you need to drag the "Background" layers for each of these files into our 8100 x 8100 image we created earlier. Lay the images out so that they match the quad layout from our USGS Quad diagram. As you are dragging them over you may want to name each new layer apropriatly.

click for larger version

I also drag them in order from the top left quad across to the bottom right quad. This way it keeps the layers neatly in order inside the new image. You will need to set the "blending mode" to Lighten for each layer. This is so that when you start butting the images the black border will disappear leaving you with only the greyscale image. This is also why we set the background color of the new image to Black.