Creating a Displacement Map Object

Creating a Displacement Map Object

Maya 2012 Tutorial


How to Add a Displacement Object in Maya



Displacement objects are defined by a grayscale image. The dark portions of the image represent low areas and white specifies more displacement. You can apply grayscale maps to flat plane objects and other shapes as well. If you are creating a polygon displacement object make sure the base object has enough faces to create a smooth surface.

In this example we will add a bitmapped image from Photoshop to a NURBs plane.


Step One

Create a new project, set your project and save a new scene in the scenes folder. For more information, see topic, Starting a Project.

Step Two

In Photoshop, create a 512 pixel x 512 pixel document with a black background.

Step Three

Add a large white letter to the center of the document.

Step Four

Choose Layer > Flatten Image, then slightly blur the text by choosing Filter > Blur > Gaussian Blur.

Step Five

Save your image as a Targa (tga) file in your project's sourceimages folder. Name the file dispObj.tga.

Step Six

Returning to Maya, add a 6 unit by 6 unit NURBs plane to the workspace by choosing Create > NURBs Primitives > Plane (include options).

Step Seven

Select the plane, then right-click the plane and choose Assign New Material > Blinn.

Step Eight

Select the plane and open the Attribute Editor, blinn1SG tab.

Step Nine

In the Shading Group Attributes section, click the checkerbox to the right of Displacement Mat.

Step Ten

In the Create Render Node, 2D Textures section, right click the File icon and choose Create Texture.

Step Eleven

In the Attribute Editor, file1 tab, click the folder icon to connect to your texture in the sourceimages folder.

Step Twelve

Click the Render Current Frame icon to render your object.

Step Thirteen

The object should appear quite rough. To smooth the object, select the plane and open the Attribute Editor, nurbsPlaneShape tab. Open the Displacement Map section.

Step Fourteen

Click the Calculate Bounding Box Scale button and increase the Initial Sample Rate to 36. Re-render your scene, the object should look much better.

Step Fifteen

To control the displacement height, select the object and open the file1 tab in the Attribute Editor. A quick way to get there is to open the blinn tab, then press the lower connection icon next to the Presets button.

Step Sixteen

Open the Color Balance section and pull the Alpha Gain slider to the left. Re-render your scene to see the decreased displacement.

Displacement Terrain Objects

Displacement objects work great when simulate rolling hills or other landscapes. One limitation with displacement maps is overhangs and caves if the map is being projected from the top.