Panel: Material buttons → Map To
Displacement mapping allows a texture input to manipulate the position of vertices on rendered geometry. Unlike Normal or Bump mapping, where the shading is distorted to give an illusion of a bump (discussed on the previous page), Displacement Maps create real bumps, creases, ridges, etc in the actual mesh. Thus, the mesh deformations can cast shadows, occlude other objects, and do everything that changes in real geometry can do.
OptionsDisp and Nor.
- If a texture provides only normal information (e.g. Stucci), vertices move according to the texture's normal data. The normal displacement is controlled by the Nor slider.
- If a texture provides only intensity information (e.g. Magic, derived from color), vertices move along the directions of their normals (a vertex has no normal itself, it's the resulting vector of the adjacent faces). White pixels move outward in the direction of the normal, black pixels move in the opposite direction. The amount of displacement is controlled with the Disp slider.
The two modes are not exclusive. Many texture types provide both information (Cloud, Wood, Marble, Image). The amount of each type can be mixed using the respective sliders. Intensity displacement gives a smoother, more continuous surface, since the vertices are displaced only outward. Normal displacement gives a more aggregated surface, since the vertices are displaced in multiple directions.
The depth of the displacement is scaled with an object's scale, but not with the relative size of the data. This means if you double the size of an object in object mode, the depth of the displacement is also doubled, so the relative displacement appears the same. If you scale inside editmode, the displacement depth is not changed, and thus the relative depth appears smaller.
Displacement maps move the render faces, not the physical mesh faces. So, in 3D View the surface may appear smooth, but render bumpy. To give a detailed surface, there has to be faces to displace and have to be very small. This creates the tradeoff between using memory and CPU time versus render quality.
From best to worst, displacement works with these object types using the methods listed to control the render face size:
- SubSurfaced Meshes
- Render face size is controlled with render subsurf level. Displacement really likes smooth normals.
- Manually (editmode) subdivided meshes
- Control render faces with number of subdivides. (This can be combined with the above methods.) Displaces exactly the same Simple Subsurf, but slows editing down because of the OpenGL overhead of drawing the extra faces. (You can't turn the edit subdivide level down this way).
- Control render faces with render wiresize. Small wire == more faces.
The following are available, but currently don't work well. It is recomended that you convert these to meshes before rendering.
- Open NURBS Surfaces
- Control render faces with U/V DefResolu. Higher numbers give more faces. (Note normal errors).
- Closed NURBS Surfaces
- Control with DefResolu control. (Note the normal errors, and how implicit seam shows).
- Control with DefResolu control. Higher gives more render faces. (Note that the large flat surfaces have few renderfaces to displace).
Using the Displace Modifier
If you want more control over your displacement, you'll probably want to use the Displace Modifier. This feature has lots of different options so that you can customize the displacement exactly to your liking.
At first a not-so-well working example (Texture and Displacement Map).
The sharp contrasting transitions from black to white yield problems. To correct this, use a little bit of gaussian blur on the texture (A blurred Texture).
If you use a Texture (like Marble) with no sharp transitions, the displacement works quite well (A Displacement Map to create a landscape).
Advanced Materials often use Displacement Maps. Here a Marble Texture was applied to various Map To values, including Disp. The brink of the "comet" would be flat otherwise (A Displacement Map for advanced materials). The sphere has 1024 faces.
How to create a Displacement Map
If you are using procedural textures, start with a flood of 50% gray as this neutral color will make a good base for your texture, as it does not cause any displacement. Some adjustment can be done using the Colors Panel Bright and Contr sliders if you desire. Continue shaping your map with blacks and whites with the Bright and Contr sliders. Done? Then back to the "Map To" panel (if you are not using a displace modifier) and check "Disp" and tweak the amount.
Sharp lines in Displacement Maps can cause normal problems, since a renderface can be requested to move only one of its verts a great distance relative to the other 2-3. You tend to get better results if a small gaussian blur is run on the image first.