This page provides information on the Displacement Node in V-Ray for Blender.

 

Overview


 
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.

UI Path


 

||Node Editor|| > Add > Geometry > Displacement

 

Node


Mode – The method used to apply displacement mapping:

Normal – This is a general method which takes the original surface geometry and subdivides its triangles into smaller subtriangles which are then displaced. It can be applied for arbitrary displacement maps with any kind of mapping. This method can also use the displacement map specified in the object's material. Note that with 3d mapping the displacement map's range of values must be within the 0.0-1.0 range (black to white). Values outside of this range are clipped.
2D
 – This method 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 (as opposed to 3D mapping, which ignores values outside the 0.0-1.0 or black to white range).
Vector
If you have 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 normal of the face.

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.

Color/Float - An input slot for the displacement texture.

 

 

Parameters


 

Mode – The method used to apply displacement mapping:

Normal – This is a general method which takes the original surface geometry and subdivides its triangles into smaller subtriangles which are then displaced. It can be applied for arbitrary displacement maps with any kind of mapping. This method can also use the displacement map specified in the object's material. Note that with 3d mapping the displacement map's range of values must be within the 0.0-1.0 range (black to white). Values outside of this range are clipped.
2D
 – This method 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 (as opposed to 3D mapping, which ignores values outside the 0.0-1.0 or black to white range).
Vector
If you have 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 normal of the face.

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.

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.

Water level – Clips the surface geometry in places where the displacement map value is below the specified threshold. This can be used for clip mapping a displacement map value below which geometry is clipped.

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 – This parameter is 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.

Keep Continuity – When enabled, V-Ray produces a connected surface, without splits, when you have faces from different smoothing groups and/or material IDs. Note that using material IDs is not a very good way to combine displacement maps since V-Ray cannot always guarantee the surface continuity. Use other methods (vertex colors, masks etc) to blend different displacement maps.

Use global settings – When enabled, the Edge length and Max subdivisions parameters are determined by the settings in the Globals rollout in V-Ray's Globals Render Settings menu.

Edge length – Determines the quality of the displacement. 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 RAM usage. Less subtriangles mean less detail, faster rendering and less RAM. The meaning of Edge length depends on the View dependent parameter below.

Max subdivisions – Sets a maximum limit for subtriangles generated from any triangle of the original mesh. The value is the square root of the maximum number of subtriangles. For example, a value of 256 means that at most 256 x 256 = 65536 subtriangles are generated for any given original triangle. It is not a good idea to keep this value very high. If you need to use higher values, it is better to tessellate the original mesh itself into smaller triangles instead. From build 1.45.20 onward, the actual subdivisions for a triangle are rounded up to the nearest power of two (this makes it easier to avoid gaps because of different tessellation on neighboring triangles).

View dependent When this is on, 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 are 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.

Tight Bounds – When this is on, V-Ray computes the exact bounding volume of the displaced triangles from the original mesh. This requires pre-sampling of the displacement texture, but the rendering is faster, if the texture has large black or white areas. However, if the displacement texture is slow to evaluate and varies a lot between full black and white, it may be faster to turn this option off. When it is off, V-Ray assumes worst-case bounding volumes, and does not presample the texture. Note that this affects only the 2d mapping and 3d mapping modes. With the Subdivision method V-Ray always computes the exact bounding volume and this parameter is ignored.

Use Bounds – Enables the Min Bound and Max Bound to manually specify the boundaries for the displacement geometry.

Min/Max Bounds – These two options allow you to specify custom boundaries for the displaced geometry. By default, limited to values between 0 and 1.  

Static Displacement – When enabled, the displacement geometry is pre-compiled into an acceleration structure at the beginning of the rendering and remains there until the end of the frame. This may speed up the rendering but increases memory usage.

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.  

Filter Texture – If this is on the texture map is filtered. 

Filter Blur – The strength of the filter applied to the map.

 

 



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:

 

 
Bump
Displacement

 


 



 Example: Basic node graph for Displacement


This example shows the basic node graph necessary to displace an object: