Using Displacement Mapping with Surface Properties
 
 
 

In this lesson, you make a moon with a detailed surface using displacement mapping combined with Surface properties.

Create a moon:

  1. Reset 3ds Max.
  2. In the Perspective viewport, create a sphere that fills the viewport.
  3. On the Create panel, set the Radius to 100. Name the sphere Earth’s Moon.
  4. Click Zoom Extents All to zoom out in all four viewports.

Set up lights and cameras:

  1. Activate the Perspective viewport, if necessary, then press Ctrl+C. This creates a Target camera, matches the camera to the Perspective viewport, and switches the viewport to the camera view.
  2. Click Zoom Extents All. In the Top viewport, you see the camera is facing the moon at about a 45 degree angle.
    NoteYour sphere might be a different color than the one shown here.

  3. On the Create panel, open the Lights sub-panel and click Omni.
  4. In the Top viewport, create an omni light by clicking at the bottom of the viewport. Name this light main light.

  5. On the Modify panel, turn on Shadows and set Multiplier to 1.2.
  6. In the Top viewport, create another omni light by clicking near the top left of the viewport. Name this light fill light.

  7. On the Modify panel, turn on Shadows and set Multiplier to 1.5. Then change the color of the fill light to orange. This adds some warmth to the image.
  8. Right-click in the Camera viewport to activate it. Then press F9 to render the scene.

    In the rendered image, the highlights on the moon appear very bright, and the edges of the moon need more detail. You will fix both problems using mapping.

Map the moon:

  1. Press M to open the Material Editor.
  2. Click a material sample slot. Name the material Earth's Moon.
  3. Choose the Oren-Nayar-Blinn shader from the drop-down list on the Shader Basic Parameters rollout. The highlights of the material darken, giving the sample sphere a softer look.

    Comparing the Blinn (l) and Oren-Nayar-Blinn (r) shaders

  4. Click the Diffuse map button; it's the blank gray button to the right of the Diffuse color swatch. In the Material/Map Browser, choose Bitmap and click OK.
  5. Use the Select Bitmap Image File dialog to open moon.jpg. The moon map appears on the sample sphere.
  6. Click Show Map In Viewport, then drag the material onto the sphere.
  7. Press F9 to do a test render.

  8. In the Material Editor, click Go To Parent.
  9. Drag from the Diffuse map button to the Diffuse Level map button, in the Advanced Diffuse group. Choose Instance and click OK.
  10. Press F9 to see the result.

    The dark areas of the map look even darker.

Displace the surface with a map:

Displacement mapping uses an image or algorithm to alter the geometry of an object. Unlike bump mapping, it actually changes the mesh, so you can see the texture on the edges of an object. Ordinarily this isn't visible until you render, although you can see it in the viewports with the Disp Approx modifier. This modifier is not covered in this tutorial.

  1. Open the Maps rollout. Pull down the bottom edge of the Material Editor so that you can see the entire rollout, if necessary.
  2. Drag the moon.jpg map from the Diffuse Level map component to the Displacement map component. Choose Copy and click OK.

    The button next to Displacement is now labeled "Map#2 (Moon.jpg)."

  3. Set Displacement amount to -20.
  4. Select the sphere. Right-click the sphere and choose Convert To Editable Poly.
  5. On the Modify panel, scroll down to the Subdivision Displacement rollout and open it.
  6. In the Subdivision Displacement rollout, turn on Subdivision Displacement and click Low. This prevents the surface mesh from becoming too complex.

  7. Press F9 to render. The surface of the moon appears bumpy.

  8. On Material Editor > Maps rollout, increase the Displacement amount to –50.
  9. Press F9 to render. The surface of the moon appears even bumpier.

    Displacing the surface of the moon

Control the areas of displacement:

This procedure shows you how to control the surface displacement so that it accentuates the areas of moderate displacement.

  1. On the Maps rollout of the Material Editor, click the Displacement map button labeled "Map#2 (moon.jpg)."
  2. On the Bitmap Parameters rollout, click View Image. The close grayscale values that you see in the map limit the amount of surface variation.
  3. Close the viewer window and scroll down to the Output rollout.
  4. Open the Output rollout and turn on Enable Color Map. Scroll to the bottom so you can see both the graph and the gradient bar.

  5. Drag the point on the right downward so the line is horizontal.

    The gradient bar and the sample slot turn black.

  6. Click Add Point. Then click to add two points to the curve at about one-third intervals along its length.
  7. Click Move. Select the two points that you just created and move them upward to form a trapezoidal graph.

  8. Press F9. The bumpiness increases across the middle values of the map.

    The moon with mountains

  9. Click Go to Parent. Change the Displacement to 20 and press F9. You now have a moon with craters.

    Craters on the moon

  10. Save your file as mymoon.max.

Next

Adding Stars to the Sky