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.
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.
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.
Get the Creative Bloq Newsletter
Daily design news, reviews, how-tos and more, as picked by the editors.
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.
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.
Thank you for reading 5 articles this month* Join now for unlimited access
Enjoy your first month for just £1 / $1 / €1
*Read 5 free articles per month without a subscription
Join now for unlimited access
Try first month for just £1 / $1 / €1
The Creative Bloq team is made up of a group of design fans, and has changed and evolved since Creative Bloq began back in 2012. The current website team consists of eight full-time members of staff: Editor Georgia Coggan, Deputy Editor Rosie Hilder, Ecommerce Editor Beren Neale, Senior News Editor Daniel Piper, Editor, Digital Art and 3D Ian Dean, Tech Reviews Editor Erlingur Einarsson and Ecommerce Writer Beth Nicholls and Staff Writer Natalie Fear, as well as a roster of freelancers from around the world. The 3D World and ImagineFX magazine teams also pitch in, ensuring that content from 3D World and ImagineFX is represented on Creative Bloq.