How to generate complex geometry with V-Ray

CG artist James Cutler explains how to use the displacement modifier in V-Ray to generate complex geometry.

The V-Ray displacement modifier is a tool that generates additional geometry that would otherwise need to be modelled. Patterns, such as the ones commonly seen on a car tyre, use complex geometric shapes, which can be time-consuming to model.

This same 3D pattern can be generated from a texture map with the ability to control the overall height and mesh quality. The disadvantage of using this method, however, is that it can be slow to render due to the calculations required at render time.

The V-Ray displacement modifier has three types of mapping: 2D, 3D and subdivision. 2D displacement will only work with texture maps and requires UVW coordinates. Also it doesn't support procedural maps such as noise, cellular and smoke. This method is fast because all calculations are carried out in the texture space prior to generating 3D geometry. This requires a large amount of RAM as the displacement is first stored and then mapped onto the 3D object.

The V-Ray displacement modifier has three types of mapping: 2D, 3D and subdivision

3D displacement works with both texture and procedural maps. The displacement is calculated and applied in 3D space by subdividing the original geometry into smaller triangles. The amount of subdivision is controlled via the edge length parameter in the displacement modifier.

Smaller edge length values generate more sub triangles, but take longer to calculate. To speed up this process, add more detail to the mesh using the mesh smooth, tessellate or subdivide modifier. This will enable you to keep the edge length parameter as high as possible.

Subdivision displacement divides the mesh using the max subdivisions parameter. Similar to how the mesh smooth modifier works, it will generate a smooth result, but whilst using less memory. You can also use the displacement modifier as a mesh smooth by setting the displacement amount to 0 and adjusting the maximum subdivisions.

Jagged edges in the texture will produce an untidy edge in the displacement. To avoid this, blur the edges slightly in Photoshop to create a softer edge

Add a V-Ray displacement modifier to your object and make sure it is on top of any UVW mapping. Use the 2D mapping type as it offers both speed and quality, providing the texture map used for the displacement is of a high standard. The amount parameter controls the height and this is set up in accordance with your system unit setup.

For the texture map, it's usually best to use an uncompressed image file format such as .tif and save out as 16-bit to retain as much colour information as possible.

If your texture has a white edge, the geometry you wish to displace will end up moving away from the original position thereby creating a gap. To move the geometry back adjust the Shift parameter. Alternatively, give your texture a black border around it so that the displacement is at 0 on the edge.

Increase the amount of dynamic RAM to avoide crashes at render time

The VRayHDRI bitmap loader can be used to load in regular textures. By using this instead of the 3ds Max standard bitmap loader, you will notice a small performance increase and improved filtering that will result in a much cleaner edge on the displacement.

James Cutler runs MintViz Workshop, a resource for any CG artist, designer or generalist looking to develop their technical skills. This article originally appeared in 3D World issue 178.

Topics

3D