This tutorial aims to demonstrate some of the workflows used to reduce render times when rendering tree leaves with Arnold. In this example, we are using a Maya Paint Effects scene that has been converted to polygons. However, these techniques can also be applied to other types of geometry that involve opacity maps.
|The scene can be downloaded here.|
The typical workflow for Opacity is to connect an alpha mask to the opacity attribute of a Standard Surface shader (remembering to switch off 'Opaque' in the Arnold attributes for the leaf geometry.
Leaves with alpha map connected to Opacity attribute of Standard Surface shader
One way to speed up rendering of the leaves is to use the Ray Switch node. The Ray Switch gives us greater flexibility for including and excluding only the rays that we want to render. In this situation we do not need to include every shading aspect for each leaf. One workflow method would be to:
This way, only the Camera and Diffuse rays (using a simple Diffuse Standard Surface shader) are calculated which will speed up render times:
There is a workaround within Paint Effects that can avoid the issue of opacity altogether. Since the idea is to not have any texture-based transparency, the Width Scale will determine the shape of the leaf. The way to think about the texture is kind of a reverse envelope or lattice deformation of the Width Scale shape (which is half the shape of the leaf / half of the texture).
Below is an example of the workflow involved:
Modified leaf texture assigned to leaf geometry with modified leaf width scale
Many thanks to Jonathan Richter for his assistance with this tutorial.