The main goal of this tutorial is to get displacement maps from 3D models, so the method I’m going to explain may not be the best way but it fits with my needs. First of all, I should say this post is based on a tutorial posted by David Hier (thanks!) at his website about how to create normal maps from a 3D model.

(Displacement maps) SketchUp and Thea

By the way, you can download the 3D model I’ve used for this tutorial from 3D Warehouse. This one is really simple just because we want it for testing purposes. Looks like this:
(Displacement maps) 3D model

Part 1. Creating the maps

  1. Open the model (or just create a new one) and turn off the perspective.
    Turn off perspective
  2. Go to the Top view (and use Zoom Extents)
    Top View
  3. Go to Look Around and set the Eye Height (for example, 10 meters).
  4. Go to the Thea Tool Window. Use 1:1 as Aspect ratio and set any resolution size you want.
  5. Go to the Thea Rendering Window. At the Rendering tab, select the IR-Presto (AO) mode and uncheck Interactive render.
    Thea Config 1
  6. Go to the Channels tab and mark at least Normals and Depth. You can also mark Alpha, just to get an easy way to trim the geometry without the background. Then start the render (by the way, those channels aren’t afected by sun/lights positions, so you can use the default values).
    (Displacement maps) Thea presets 4
  7. Once the render is going on, select the Depth channel and introduce the proper values for Alpha Min Z and Alpha Max Z (if the render isn’t running, you won’t be able to introduce/change them). If you don’t know what those values are, it’s explained at the end of the post.
    Thea config 3
  8. Save the channels you’ve chosen once the render is done (maybe is a good idea to name them by its channel, something like “001_normal”, “001_depth”, “001_alpha”, etc.).
    Trim the channels pics using some software like Photoshop or Gimp in order to avoid black borders (this process is also explained at the end of the post) and you’ll get something like that:
    rendernormal mapdisplacement map

Part 2: Creating the material

  1. In order to test the materials, first we’re going to draw a square (1m x 1m) with a diagonal line. Then select all and use the Add Detail button from the Sandbox tool.
  2. Select all again and repeat the Add Detail process three times or so. You’ll get something like this:
  3. Select all and push right click > Soften/Smooth Edges, select “Soften coplanar” (any number above 1) to smooth all inner lines and to get a softened surface.
  4. Now we have to create a SketchUp material to paint the surface, so we will use the main .jpg render saved at the end of Part 1. The size should be something like 1m x 1m. Turn off hidden geometry to see a single face and paint it with newly created texture.
    (Displacement maps) SketchUp material
  5. Once we’ve created the SketchUp material (and applied it to the soften surface), we’re going to set it up using the Thea Render material editor. Click on the Thea tool and double click the texture to begin editing in Thea Material Lab.
    5a) Go to Displacement, check “Enable” and use the Depth map as “Texture”. 4 subdivisions and 10-15 cm height should be more than enough.
    5b) Go to Structure, use the Normal map as “Bump Texture” and check “Normal Mapping”.
    (Displacement maps) Thea presets 1(Displacement maps) Thea presets 2
  6. Render the scene using any hdri/skies/lights you like. That’s all!
    (Displacement maps) Before/After rendering

Setting up Alpha Min Z and Alpha Max Z

About Alpha Z values, a picture is worth a thousand words so I’ve made a diagram to understand how to calculate their values (click to enlarge).


So Alpha Max Z is the the farthest distance you can find between a point of the 3D model and the camera (along its projection in z-axis), and Alpha Min Z is the shortest one.

Triming using Alpha Channel

  1. Once we’ve rendered the channels (part 1, between steps 6 and 7), we get something like that:
  2. If we’ve also rendered the alpha channel, we can use it to get an easy way to trim those black borders.
  3. At Photoshop (or your preffered photo-editing software) drag one by one all the channels into the same file. You’ll see something like this at the layers panel if everything is ok.
  4. With the alpha layer selected, use the Magic Wand and click at some point on the white part, so all the white area will be selected.
  5. With the white area selected, push over the Crop Tool and press Enter twice, so your trim is done.
  6. Save each layer one by one and you’ll have all the rendered channels without that ugly black border.
    rendernormal mapdisplacement map

What is it good for?

Keep this in mind: if you have to deal with a model made of a large number of faces you are doomed to confront with long save times, load times, refresh times, etc. Using displacement maps is a nice way to save faces in a 3D model without compromising accuracy and/or detail level.

PS. A big thanks to David Hier and Duane Kemp for their kind help and advising.

(Visited 1,808 times, 1 visits today)