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,685 views  Rating:
(5 ratings)
Page 5 of 5

Now you can render your image to see how things look.

click for larger version

You will see a small amount of displacement in the image, but not quite what we are going for. Open the Attribute Editor for our file node and expand the Color Balance folder.



This is where you dial-in your displacement height. Enter a value of 10 for "Alpha Gain" and then select your NURBS plane. In the Attribute Editor for your plane, expand the Tessellation folder and check the box for "Display Render Tessellation".




Check the box for "Enable Advanced Tessellation" and change the Number U and V to a value of 5. What this will do is increase the number of faces your NURBS plane has based on its spanU and spanV values that we earlier set to 25. The Attribute Editor says that the "Triangle Count" will be 31250 for our plane, but that is WAY off. With your NURBS plane selected use the pull down "Modify > Convert > Displacement to Polygons".



This could take a very long time depending on your machine. If your machine crashes, change the Number U and V to a lower value in the "Advanced Tessellation" section we set to 5 earlier. These numbers control how many polys Maya generates when converting the displacement to polys. Lower numbers = less polygons = less memory intensive on your machine.

This is still not enough detail for what we are going for, but it's required to get the scale proper. Next you want to create two locators and snap them to the lower left and lower right corners of the polygon displacement.

click for larger version

Then using the measure tool (Create > Measure Tools > Distance Tool) you want to measure the distance between these two locators.

click for larger version

The resulting value is 479.26 units. Back in the rangeStatistics rangeStatistics.zip we noted that the total width of our range is 48,378.5 Meters and the Max elevation is 4393 Meters. Well, the "Alpha Gain" that we set to 10 before means that our displacement is currently 10 units high. Therefore we can calculate out how much we need to set this alpha gain to get a true scale for our scene.

The formula is:
scene distance / desired distance = alpha gain / max elevation
Thus:
479.26 / 48,378.5 = X / 4393
X = 43.5
We now need to increase our Alpha Gain for the displacement file node to 43.5. Since our original "Displacement to Polygon" conversion was done with Alpha Gain set to 10, we need to delete that poly surface and run the conversion again. This polygonal surface will never be rendered, but it is needed to have something physical in the scene to align our camera to.

click for larger version

You will also note that if you used the original numbers of 5 for Number U and V in the tessellation settings, your poly count for the surface is roughly 1.1 million polygons. A far cry from the 31250 that Maya estimated. But even with the high poly count, Maya still has decent performance when tumbling your camera into position.

Now it's just a matter of selecting a nice view poit for your camera and firing off a final render.

click for larger version