Manual/PartIV/Displacement Maps
Wikipedia,自由的百科全书
Displacement mapping is a powerful technique that allows a texture input, either procedural, or image, to manipulate the position of rendered faces. Unlike Normal or Bump mapping, where the normals are skewed to give an illusion of a bump, this creates real bumps. They cast shadows, occlude other objects, and do everything real geometry can do.
They come in handy essentially in two cases:
- As Hight Fields to generate Landscapes or visualise measured Values in 3D.
- To create complex materials.
In order to manipulate the positions of renderfaces smoothly, they have to be very small. This eats memory and CPU time.
Contents |
Usage
Displacement mapping is set up to behave as a texture chanel. Simply click the Disp Button in the Map To Panel. The strenght of the displacement is controlled with the Num-Buttons Disp and Nor (Settings for a Displacement Map).
There are currently two modes in which displacement works in:
- If a texture provides only Normal information (e.g. Stucci), Verts move acording to texture's input. The Normal displacement is controlled by the Nor slider.
- If a texture provides only Intensity information (e.g. Magic, derived from color), verts move along vertex normals (a Vertex has no Normal itself, it's the resulting vector of the adjacent faces). White pixels move in the direction of the normal, black pixels move in the opposite direction. The intensity displacement is controled with the Disp slider.
The two modes are not exclusive. Many textures 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 surfce, since the vertexes are displaced only outward. Normal displace gives a more agregated surface, since the verts 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.
Where to use displacement
From best to worst, displacement works the following object types using the method listed to control the renderface size.
- Subsurf Meshes. Renderface size is controled with render subsurf level. Displacement really likes smooth normals.
- Simple Subsurf meshes. Control renderfaces with render subsurf level. There is a pitfall at sharp edges however if the texture there is not neutral gray.
- Manualy (editmode) subdivided meshes. Control renderfaces 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).
- Metaballs. Control renderfaces with render wiresize. Small wire == more faces.
The following are available, but currently don't work well. It is recomended that you convert the following to meshes before applying displacement.
- Open Nurbs surfaces. Control renderfaces 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 impicit seam shows).
- Curves and Text. Control with DefResolu control. Higher gives more renderfaces. (Note that the large flat surfaces have few renderfaces to displace).
Examples
At first a not so well working example (Texture and Displacement Map):
The sharp contrasting transitions from black to white yield to 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 displacment 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
When making custom displace maps, start with a flood of 50% gray. This color does not make any displacement. Some adjustment can be done using the Colors Panel Bright and Contr sliders, but it is best to start off right.
Sharp lines in Displacement Maps can cause normal problems, since a renderface can be requested to move only one of it's 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.
| OSA: Texture OSA is not currently working for images mapped to displacement. |
|






