Transmission and Opacity are pretty similar in Arnold compared with other render engines. However, there are a few differences. The purpose of this document is to give users a better understanding of these differences as well as explaining when to use Opacity and when to use Transmission.
Arnold has two different ways of calculating Transmission and Opacity. They are different ray types and thus have different controls in the Standard Surface shader as well as in the render options.
These two ways of calculating Transmission have different purposes, they can be used together, but most of the time you'll want to use either one or the other.
- Glass, water or other refractive materials.
- Sprite type of effect, such as cutting out the shape of a leaf from a polygon card.
- Making the tips of hair strands transparent.
If you leave Index of Refraction (IOR) at 1.0 both methods can give similar results. However, Opacity renders faster for sprites. Opacity will also cut out the shape completely whereas Transmission will leave the speculars visible even on areas that are completely transparent. Here are two images to show the difference when rendering sprites:
This is the texture and mask used for the leaf:
Note how when using Transmission the speculars are still visible in the transparent areas. You can, of course, drive the Specular Weight using the same mask to fix the problem, but using Transmission for this purpose is simply wrong.
As explained earlier, it's usually best not to use Transmission and Opacity together in the same shader as it would cause unnecessary slowdowns in the render; however, there are a few situations where combining them can be useful. Below are some examples of a simple glass sphere being cut out using a stripe mask:
This is where Arnold differs from most other renderers. By default, all objects are flagged as Opaque, which allows Arnold to take some shortcuts while tracing rays, thus making rendering faster. If an object is flagged as Opaque, it means Arnold doesn't even need to access the parts of the shader that handle Opacity. The fact that this Opaque flag is on by default means two things:
- Opacity will not work at all.
- Transmission will work however any shadows cast by the object will always be solid and not pick up the Transparent Color or density of the shader.
Use the Attribute Spread Sheet to set aiOpaque for multiple objects. Remember to select the shape nodes (select the transforms, and then press the Down arrow).
In the following scene, you can see the Stanford dragon rendered with the Opaque switch enabled and disabled. Note that Opacity is not used at all in this example:
Below is another example with Opaque enabled and disabled. In this case, only Opacity is being used in the Standard Surface shader:
As mentioned earlier, using the right method for the right task will give you optimal rendering speed. However, there are some things which can further speed things up:
- When using opacity for sprites, make sure that your mask is pure black and white, for example in the black areas there shouldn't be any noise or other imperfections as that will have a negative effect on render times, in other words, it's not a good idea to use JPEG textures for masks as they often have compression artifacts.
- When combining Transmission and Specular, such as on the dragon above, it can speed things up a lot if you make sure that the transparent part of the shader doesn't pick up any reflections, in other words disabling internal reflections, you can do this using a Ray_Switch shader.
Bear in mind that Transmission Weight will not propagate through to the alpha channel. The examples below show the difference in the alpha when using Opacity (correct) rather than Transmission Weight (incorrect). Opaque has also been disabled for the polygon plane.
If you want to see the alpha channel, use Opacity instead of Transmission Weight (right image).
Transmission Weight (incorrect alpha)
Opacity (correct alpha)