Rendering Opacity Maps with Paint Effects

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.

Leaves with alpha map connected to standard_surface.opacity

Ray Switch

One way to speed up the 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:

ray_switch: 1 min 3 secs Without ray_switch: 1 min 48 secs
Without ray_switch: 15 mins 47 secs ray_switch: 6 mins 40 secs

Leaf Width Scale

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.