Digital Elevation Model (DEM) Terrain Displacement

119,053

Feb 25, 2006

6.x, 7.x

windows

Language:

English

Now you will need to zoom into the streets between your quads and move them all together.

When you get in closer you will note the edges of each quad have a stair step pattern to them. These "steps" mate together and form a seamless image.

After you have butted your quads together, you want to merge all of your layers into one for our final output.

You will also note that we are now using less than our image size of 8100 x 8100. You always want to keep your image square and a power of 2x. So, you can crop the image size down to 6k (6144 x 6144). I find it easier to start large and then crop it down later. Save the image as a TIFF file format.

The output file will be fairly large. This one should be about 215 MB which is average for a 6k, RGB16-bit TIFF file.

OK, you are finally at the point where you are ready to launch Maya and start displacing. Open Maya and create a NURBS plane with these settings:
• * scaleX = 614.4
• * scaleY = 614.4
• * scaleZ = 614.4
• * patchesU = 25
• * patchesV = 25
• * degree = Cubic

This is why we need to make sure the Photoshop image we are using for displacement remains square.

You will notice that we scaled the flat NURBS plane in all 3 axis. (X, Y, and Z) The reason for this is because Maya calculates displacement as if it were a volume. If you have a flat plane and you leave it's scaleY value at 1, it will not displace properly because it only has 1 unit of volume to work with. You need to scale your plane in Y to a value at least that of your target displacement. Since we do not know that number yet, I just scale all 3 values the same amount. The reason for 614.4 is because I prefer to work in 1/10th scale. This eliminates all the potential problems Maya has when dealing with larger scaled scenes. So, since our TIFF image is 6k (6144 x 6144) it's a straight conversion to 614.4 x 614.4. The patches 25 and cubic are going to come into play when we convert the displacement to polygons later.

With your plane selected use the pull down: "Window > Rendering Editors > mental ray > Approximation Editor..."

In the Approximation Editor you want to click the [Create] button next to "Displace Approx."

Next click the  button and change the Presets to Fine View High Quality.

This is just a default preset for the Displacement Approximation and works well for our purposes.

Next:

• * Create a new Lambert shader and click the "Output Connection" button located at the top of the Attribute Editor.

• * Then click the map button next to "Displacement Mat."

• * Then click the "File" button in the Create Render Node window.

• * Click the file tab and then map our TIFF image to the "Image Name" field.

Jan 26, 2010
Post id: 9959

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?

Feb 18, 2010
Post id: 10195

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 :)

Apr 06, 2010
Post id: 10730

Im having the same problem here.

Here is the Python Report

Exception in Tkinter callback
Traceback <most last call recent>:
File "C:\Python26\lib\lib-tk\Tlinter.py", line 1410, in __call__
return self.func<*args>
xfer.getSpecial<'CEL0',w>
f.open<'r'>
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. : )

Jun 08, 2010
Post id: 11430

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

Sep 14, 2010
Post id: 12444

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.

Mar 21, 2011
Post id: 14110

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 sdts.py from:
if type(celFile) == type('string'):
to:
if isinstance(celFile, (str, unicode)):

Hope that helps,
s

Oct 25, 2011
Post id: 15409

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

Oct 27, 2011
Post id: 15417

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

Nov 13, 2011
Post id: 15486

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.