This page provides information on the Displacement control attribute set that can be added to meshes.
Displacement mapping is a technique for adding detail to your scene geometry without having to model it first. The concept is very similar to bump mapping. However, bump mapping is a shading effect that only changes the appearance of a surface, while displacement mapping actually modifies the surface.
The attributes in this section affect V-Ray displacement and can be added to any polygonal mesh object.
For a guide to using displacement control with a vector displacement map created in Autodesk Mudbox, see the Rendering Mudbox Vector Displacement with V-Ray tutorial.
||Select mesh|| > Attribute Editor > Attributes menu > VRay > Displacement control
Example: Displacement vs Bump Mapping
This example shows the difference between bump mapping and displacement mapping. Notice the round outline of the sphere and its shadow in the case of bump mapping, and the deformed outline produced by the displacement:
None – When enabled, turns off displacement.
Geometry generation – Determines when the geometry is compiled during rendering.
On the Fly – The subdivision geometry dynamically goes into the dynamic memory pool during rendering from which it can later be removed if needed. This process is at the expense of some speed but potentially saves memory.
This option is not supported when rendering is done on the GPU.
When rendering to the GPU with displacement, all geometry is pre-tessellated.
Pre-tessellated – The subdivision geometry is pre-compiled into an acceleration structure at the beginning of the rendering and remains there until the end of the frame. This can speed up the rendering and increase memory usage.
Displacement type – Specifies the mode in which the displacement is rendered.
2D Displacement – Bases the displacement on a texture map that is known in advance. The displaced surface is rendered as a warped height-field based on that texture map. The actual raytracing of the displaced surface is done in texture space, and the result is mapped back into 3D space. The advantage of this method is that it preserves all the details in the displacement map. However, it requires that the object has valid texture coordinates. You cannot use this method for 3D procedural textures or other textures that use object or world coordinates. The displacement map can take any values.
This mode is not supported in GPU rendering.
Normal Displacement – Takes the original surface geometry and subdivides its triangles into smaller sub-triangles which are then displaced. It can be applied for arbitrary displacement maps with any kind of mapping.
Vector Displacement – If using a displacement texture that is not grayscale, V-Ray converts it to grayscale before rendering the displaced geometry. This mode allows V-Ray to use the Red, Green, and Blue channels of the displacement texture to displace the geometry in the U and V directions in addition to the direction of the face normal.
Vector Displacement (absolute) – A vector-type displacement mode in which the texture is interpreted as 0.5-based tangent space displacement map.
Vector Displacement (object) – The texture values represent 0-based displacement in object space. Recommended when a VRayPtex texture is used for displacement. If mesh information is stored in the Ptex file, V-Ray can also displace correctly mesh deformations.
Displacement Amount – The amount of displacement. A value of 0.0 means the object appears unchanged. Higher values produce a greater displacement effect. This can also be negative, in which case the displacement pushes geometry inside the object.
Displacement Shift – Specifies a constant which is added to the displacement map values, effectively shifting the displaced surface up and down along the normals. This can either be positive or negative. For more information, see the Displacement Shift example below.
Keep Continuity – When enabled, V-Ray tries to produce a connected surface. Use it when you get splits (usually around sharp edges) in the displaced geometry. For more information, see the Keep Continuity example below.
Enable Water Level – When enabled, this clips the surface geometry in places where the displacement map value is below the threshold specified by the Water Level field. This can be used for clip mapping a displacement map value below which geometry is clipped. For more information, see the Clip Mapping example below.
Cache Normals – When enabled, V-Ray generates and saves information about the normal of each newly generated vertex. This requires additional memory but speeds up the shading calculations during rendering. Please see the Displacement Render Settings to improve output result.
This option is always On when rendering on the GPU. This is not recommended for low displacement settings.
Texture resolution – Determines the resolution of the displacement texture used by V-Ray. If the texture map is a bitmap, it would be best to match this resolution to the size of the bitmap. For procedural 2d maps, the resolution is determined by the desired quality and detail in the displacement. Note that V-Ray also automatically generates a normals map based on the displacement map, to compensate for details not captured by the actual displaced surface.
Precision – Related to the curvature of the displaced surface; flat surfaces can do with a lower precision (for a perfectly flat plane you can use 1), more curved surfaces require higher values. If the precision is not high enough you can get dark spots ("surface acne") on the displacement. Lower values compute faster.
Tight bounds – Causes V-Ray to compute more precise bounding volumes for the displaced triangles, leading to slightly better rendering times.
Multi tile – When enabled, 2D Displacement can work with <UVTILE>/<UDIM> textures.
Filter texture – When enabled, the texture map is filtered before the actual displacement takes place.
Filter blur – Specifies the amount of blur that is applied to the texture before the displacement takes place.
Displacement bounds – Controls how the minimum and maximum allowable values of the displacement texture are determined. For more information, see the Texture Boundaries example below.
Automatic – V-Ray automatically determines the minimum and maximum values allowed for the displacement texture.
Explicit – Allows you to set the minimum and maximum values manually.
When using image sequences and/or images with tiles (e.g. UDIM/UVTILE) for displacement, use Explicit displacement bounds and set the range of positive and negative values manually. If Automatic is used instead, negative values are clipped and the displacement does not work as expected.
Min/Max value – These two options allow you to specify custom boundaries for the displaced geometry. By default is limited to values between 0 and 1.
Example: Displacement Shift
Note that the Displacement Shift parameter is an absolute value in world units. If you change the Displacement Amount, you will probably need to adjust the Displacement Shift too.
Example: Keep Continuity
The Keep Continuity option is useful for objects with disjoint normals on neighboring triangles, usually because of different smoothing groups. In the middle image below you can see the edge splits produced by disjoint normals. Using the Keep Continuity option avoids this problem. This option will also help to produce a smoother result across material ID boundaries for objects with multiple materials.
Example: Clip Mapping
Note: The Water Level parameter is also absolute in world units. If you change the Displacement Amount and/or Displacement Shift, you will probably need to adjust the Water Level to get the same effect. For this example, the Displacement Amount parameter is set to 5.0 and the Displacement Shift parameter is set to 0.0.
Example: Texture Boundaries
This example shows a plane mapped with a displacement map that has negative values. With the default boundaries for the displacement (from 0 to 1) we are unable to see the geometry displaced in the negative direction. However, once we set Displacement bounds to Explicit and set Min value and Max value to -1 and 1 respectively, we can see the displaced geometry in both the positive and negative direction.
Add to node:
vray addAttributesFromGroup "pSphereShape1" "vray_displacement" 1;