Polymesh objects can be rendered as volumes. This gives many creative opportunities for rendering solid objects in varied and interesting ways. This short 'making of' tutorial shows how to combine a polymesh with a volume by combining their shading using the displacement attribute of a standard_volume shader.
An example of a free-to-use head scan model can be found here.
A video tutorial can be found here.
The polymesh should be closed and not have anything self-intersecting, otherwise, the volume may not render correctly.
- First of all, we need to convert the head mesh to a volume. Select the mesh and under its Arnold attributes, increase the step_size to 0.1. When the step_size is positive, it turns a polymesh into a volume and its value is used as the base step for raymarching the volume.
More information about volume step_size can be found here.
- Assign a standard_volume shader to the polymesh and increase the density to around 20. This will ensure that the displacement texturing looks more defined later.
Polymesh rendered as a volume
You must add a step_size value and assign a standard_volume shader for the mesh to render as a volume.
The next step is to enlarge the volume by using padding. This will be useful when we want to displace the volume with a texture. Note that this slack applies not only to the bounding box but also to the voxels used for ray extents inside the bounding box. In this case, a small amount of 0.05 was used.
For best performance, this should be set as low as possible, while still covering the maximum displacement amount.
- Next, place an Arnold Volume at the rear of the head and assign the same standard_volume shader to it. In this case, a smoke .vdb file was used.
Alternatively, you could use a different mesh and apply the same shader as the head to it. The aim is to have something that looks complex for the displacement texturing process.
Volume rendered with same standard_volume shader
Displacement Texture (Standard Volume Shader)
- Connect a file texture to the displacement attribute of the standard_volume shader. In this case, a camera projection has been used. We can see the effect of the texture (mostly on the head), however, we need to make the effect more prominent.
Displacement texture is faintly visible
- We can use a range shader to remap the input values of the file texture to exaggerate the effect. Connect the file texture to the Input of the Range shader and connect the range shader to the displacement of the standard_volume shader. Increase the output_max value of the range shader to around 8. You should now start to really see the effect that the file texture has on the volume displacement.
Displacement texture is more obvious due to Range shader
- Finally, to add some color, you could try connecting the same file texture to the scatter_color or transparent_weight attributes of the standard_volume shader.