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

In this tutorial you will learn how to create the image seen below using displacement in Mental Ray for Maya.

click for larger version
Mt. Rainier

To follow along with this tutorial you will need the following software installed on your machine:

* Note: You can use an older version of Photoshop, but you will be limited to 8-bit TIFF file output. With Photoshop CS you can export 16-bit TIFF files for finer displacement.

We are going to be building a digital version of Mount Rainier using satellite digital elevation maps (DEM) and displacement inside of Maya with the Mental Ray plug-in. One key factor to remember while following this tutorial is ORGANIZATION! There will be a LOT of information covered here and you can get lost really quickly. Keeping things like file names and subfolders organized will help you keep things manageable along the way.

DEMs are greyscale photographs taken by satellites in orbit of the Earth capturing terrain elevation values. These DEMs are broken down into approximately 6.5 mile by 7.5 mile sections called quads.

Before we get started you will need to create two (free) accounts to gather the images needed for this project. One account will be at the USGS Quads site which will be used to determine what quads make up the area we will be building. The other account will be at the Geocomm website which is where we will be downloading the quads from. You have the option of setting up a pay account at Geocomm. When you pay for a premium account you get a faster connection speed for downloading. Or you can just use a free account and the downloads will take longer. The typical connection speed is limited to 3-5 KB/sec for the free account. I am not 100% sure if the download speed is based on IP address or your log on account. When I download with several machines, that are behind a single IP address router, the total speed is spread over each download and you can achieve blazing speeds of 0.2 KB/sec. So, I just find it better to let one download have all the bandwidth and find something else to do while you are downloading. The average file size is 2-4 MB usually resulting in around 10 min to download each quad. The other option would be to have Geocomm burn the DEM data to a CD and mail it to you for a fee.

The quads are sorted by county on the Geocomm site so you will also need to locate the county names for your target location. I usually do a search on Google for " county map" and within the first few hits I can find a good image to go with. This is the county map image I found for Washington State.

click for larger version

Sometimes, as with this project, your quads may span two or more counties depending on their location. This is where it's helpful to have a map of what counties butt up next to each other.

After you have your counties image, go to the USGS Quad finder site and under the "1:24k Search" navigate down to Washington in the list and click it.

click for larger version

This is where you will need to have an account created. When you locate the section of quads we will be needing you will find that some of our quads are located in Pierce County and some are in Lewis County.

click for larger version

I've added the red line and county names to our map for illustration. This is where your research skills come into play in determining county lines.


  • BDUwearinmonkey

    BDUwearinmonkey said about 8 years ago:

    Hey Im getting an error when I try to load the DEM to get the grayscale image. In the PullSDTS command prompt it says, "AttributeError: 'unicode' object has no attribute 'open'" Do you have any suggestions to get past this?
  • abraxas79713

    abraxas79713 said about 8 years ago:

    Same problem here as well..Have tried for quite sometime now to get it to work. Would like some input on how to solve this error. Thanks :)
  • graham bond

    graham bond said almost 8 years ago:

    Im having the same problem here. Here is the Python Report Exception in Tkinter callback Traceback : File "C:\Python26\lib\lib-tk\", line 1410, in __call__ return self.func File "C:\Users\Horza\Downloads\pullsdts\, line 395, in demview xfer.getSpecial File "C:\Users\Horza\Downloads\pullsdts\, line 1419, in get Special retval = demSpeedReader \fast kludge File "C:\Users\Horza\Downloads\pullsdts\, line 354, in demSpeedReader AttributeErroe 'unicode' object has no attribute 'open' Ive never used python before and I downloaded it for this tutorial. I also went about the hard way of finding out the Ne Sw statistics as I wanted to learn how to do this the real way instead of using the stats you provided. Suffice to say, I was a little disappointed when I failed at the next stage : ( Any help greatly received. : )
  • morph106

    morph106 said over 7 years ago:

    Can anyone enlighten me as to why my nurbs plane comes out looking like a staccato mess of a mesh?
  • Thom Falter

    Thom Falter said over 7 years ago:

    I had the same problem with pullSDTS, but got it working by opening the tarball (gz) files in it instead of unpacking them with another program. See the documentation for pullSDTS.
  • Stefano Cieri

    Stefano Cieri said almost 7 years ago:

    I bounced into a couple of the above problems, too. For those who still didn't find a solution: when the error you get is in loading the DEM infos (from the tar.gz file), my workaround was to pre-unpack the files with 7zip (I'm not sure if it's what Thom Falter suggested, or the opposite; in my case it worked, anyway) I then filtered the .ddf files with pullSDTS's option "SDTS transfer *iden.ddf" and selected the only available one. when the error is in loading the DEM image, instead, and you get the message some reported above: AttributeError: 'unicode' object has no attribute 'open' what I did to solve (no idea how clean the trick is) is changing line 350 in from: if type(celFile) == type('string'): to: if isinstance(celFile, (str, unicode)): Hope that helps, s
  • rcamp004

    rcamp004 said over 6 years ago:

    @Stefano Cieri You Brilliant SOB! It worked! I can't thank you enough. Also, the sole reason I opened an account here was so I could thank you. Thanks again!
  • rcamp004

    rcamp004 said over 6 years ago:

    Does any one know if it's possible to get the nurbs mesh to match the displacement map?
  • rcamp004

    rcamp004 said over 6 years ago:

    So, I came across a way to generate a mesh of the surface using photoshop. Once you have the image in photoshop go to 3D> mesh> plane. scale the y accordingly. Then go to 3d> export> obj. Import the Obj in Maya and you'll have a surface.

Please sign up or sign in to post a comment.