This page provides information on the V-Ray GeomDisplacedMesh node, which controls displacement on 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.
There are two ways to add displacement to an object with V-Ray Displacement. One is through material assignment and the other - directly to the geometry. For detailed information, visit the Displacement Tutorial page.
Assigning Object Properties SOP and/or Displacement materials works with packed geometry. It is not expected to work with packed fragments. See the V-Ray Object Properties SOP page.
On the right is an example of the same object rendered with bump mapping and with 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. The displacement map in this case is a 3D Gradient Ramp (procedural) map; the 3D mapping method was used.
In the case of displacement mapping, the surface is actually modified, which leads to correct outline, shadow, and GI. In the case of bump mapping, although the surface appears modified, the outline and the shadow are the same as the original object's outline and shadow.
Displacement is different from other kinds of shading in that it modifies the actual object surface. While other shading activities (such as bump mapping) take place at render time, displacement takes place before rendering.
||mat Network|| > V-Ray > Geometry > V-Ray Displacement
||Select object|| > V-Ray Shelf > Subdiv Props
V-Ray menu > Object Properties > Displacement
Render Displacement – Turns on/off displacement effect.
Generate – Specifies how the resulting triangles of the displacement algorithm are inserted into the rayserver.
On the Fly – Dynamic
Pre-Tesselated – Static (default)
Texture – Specifies a displacement texture.
Type – Specifies the mode in which the displacement is rendered.
Default – 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.
2D – 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 have 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.
Vector – 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 (Absolute) – A vector-type displacement mode in which the texture is interpreted as 0.5-based tangent space displacement map.
Vector (Object) – Only meaningful when a V-Ray Ptex is used for displacement, where the texture values represent 0-based displacement in object space. If mesh information is stored in the Ptex file, V-Ray can also displace correctly mesh deformations.
Flip Green / Blue Channels – When enabled, the Green and Blue channels of the supplied texture map are swapped.
Amount – The amount of displacement for white areas of the displacement map. If Use Global Settings is enabled, this value is multiplied by the global displacement Amount option. 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.
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 be either 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.
Water Level – Geometry below this displacement level threshold is clipped away. 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 rollout of the Options Tab to improve output result.
This option is always On when rendering on the GPU. This is not recommended with low displacement settings.
Object Space – When enabled, the parent transformation affects the amount of displacement. Use this option for 3D displacement.
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 a value of 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.
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.
Multi-Tile – Enables or disables support for tiled textures (UDIM/UVTILE) when generating 2d displacement.
Use Bounds – When enabled, sets the minimum and maximum values for the displacement texture. For more information, see the Texture Boundaries example below.
Min/Max Bound – Specifies custom boundaries for the displaced geometry when Use Bounds is enabled. By default is limited to values between 0 and 1.
When using image sequences and/or images with tiles (e.g. UDIM/UVTILE) for displacement, enable Use Bounds and set the range of positive and negative values manually. If Use Bounds is disabled, negative values are clipped and the displacement does not work as expected.
View Dependent – Determines if view-dependent tessellation is used. When enabled, Edge Length determines the maximum length of a subtriangle edge, in pixels. A value of 1.0 means that the longest edge of each subtriangle is about one pixel long when projected on the screen. When View Dependent is off, Edge Length is the maximum subtriangle edge length in world units.
Edge Length – The maximum length of a subtriangle edge after subdivision. This affects the degree of subdivision before displacement, which in turn affects the quality of the displacement itself. Each triangle of the original mesh is subdivided into a number of subtriangles. More subtriangles mean more detail in the displacement, slower rendering times and more memory usage. Less subtriangles mean less detail, faster rendering and less memory used. Units used for this parameter depend on the View Dependent parameter. For more information, see the Edge Length example below.
Max Subdivisions – Controls the maximum number of subtriangles generated from any one triangle of the original mesh. The square of this value is used. For example, a value of 256 means that at most 256 x 256 = 65536 subtriangles are generated for any given original triangle. It is recommended not to increase this value a great deal over the default value of 256. If you need to use higher values, it is better to first tessellate the original mesh itself into smaller triangles before starting the displacement process.
In GPU mode where Cache Normals is always enabled, lowering the Edge Length or increasing the Max Subdivisions will help to achieve results more closely in line to CPU mode.
Render As Subdivision – When enabled, the object is subdivided during rendering.
Preserve Geometry Borders – When enabled, edges on the geometry borders are not subdivided.
Preserve Map Borders – Specifies how to handle subdivisions of UV coordinates at UV seams. The possible values are:
None – UVs are always subdivided regardless of whether they are on a UV seam or not;
Internal – Only preserves UVs if they are on an internal UV seam;
All – Does not subdivide UVs on UV seams.
Classic Catmull-Clark – When enabled, V-Ray uses the Classic Catmull-Clark method for subdividing the mesh instead of the hybrid one used by default. This option should be enabled only if the mesh is composed entirely of rectangular faces or it does not work.
Example: Vector Displacement
This example shows the effect of the Vector (vector displacement) option in more detail.
The first image shows complex geometry on the left. This geometry was used to create a vector displacement map. The second image shows the resulting displacement map, where the red, green and blue components define displacement vectors in the texture UVW space. The final image shows the vector displacement map applied on another object through the Displacement material node.
A piece of complex geometry, and a simple version
with a VRayVectorDisplBake material.
The displacement map, computed by texture baking.
The result is saved into an .exr file (a .png file is shown here).
The displacement map applied on a different geometry through
the Displacement node with vector displacement.
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: Edge Length
This example shows the effects of increasing the Edge Length parameter. In this example View Dependent is enabled, so Edge Length is expressed in pixels. In the examples, the closeup view is a blow-up rather than a zoomed view. This means that Edge Length in the closeup view refers to pixels in the original image, not the blow-up rendering.
The image below was rendered with a V-Ray Edges map in the Diffuse slot of the material to show the original triangles of the mesh. V-Ray not only smooths the surface normals, but also automatically applies a normals map that represents the normal of the perfect displaced surface, which makes the surface look a lot more detailed than it actually is.
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 also helps to produce a smoother result across material ID boundaries for objects with multiple materials.
Example: Clip Mapping
The Water Level parameter is absolute in world units. For this example, Amount is set to 5.0 and Shift is set to 0.0. Note that when Water Level reaches Amount + Shift, all geometry is clipped.
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 Min Bounds and Max Bounds to -1 and 1 respectively, we can see the displaced geometry in both the positive and negative direction.