Glass transmission fake caustic on floor plane (ShadowMatte)
Arnold is a unidirectional path tracer and therefore realistic caustics can be expensive to render. This is because caustic effects create a lot of noise and require very high sampling values, which can lead to long rendering times. This tutorial shows how to create a fake caustic effect that is far cheaper to render but still looks convincing. It uses a combination of the Ray Switch, Standard Surface and Facing Ratio shaders and assigns them to the object that emits caustics. A Shadow Matte shader is then assigned to the floors Standard Surface Emission attribute which gives the caustic effect.
It should be noted that the technique in this tutorial is not physically correct and does not demonstrate the result of a physically correct caustic effect. However, in most cases, the rendered results should be sufficient to fool the eye. Thanks to Slava Sych for his help with this tutorial.
Information about rendering true caustics can be found here.
Scene Setup and Lighting
- Place the object that you want to emit caustics from in the scene. Create a camera and set the desired position. Create a floor plane to sit under the object.
- Create a directional (distant) light. Increase its Exposure to 3, Angle to 3 and Samples to 3.
Directional (distant) light
Camera Glass Shader
- Next, create a Standard Surface shader. Rename it to something like CamGlass and assign to the object. This will be the shader that is visible to camera rays. Change the following parameters:
Specular Roughness: 0.070
Specular IOR: 1.550
Transmission Weight: 1.0
Coat Weight: 1.0
Coat Roughness: 0.1
Coat IOR: 1.550
Enable Transmit AOVs so that you can render out separate caustic AOVs.
Shadow Glass Shader
- Next, create a new Standard Surface shader and rename it ShadowGlass. Change the following parameters:
Specular Roughness: 0.1
Transmission Weight: 1.0
Enable Transmit AOV
Create a Facing Ratio shader and connect its output to Transmission Weight of the ShadowGlass shader.
The Facing Ratio parameters used will be dependent on the particular object that you are using and therefore may need to be adjusted.
FacingRatio -> Standard Surface (ShadowGlass)
Ray Switch Shader
Next, create a Ray Switch shader and assign it to the object. Rename it to GlassMat. This will be used to tell Arnold which rays to use when rendering the glass object.
- Connect the CamGlass shader output to the Camera, Diffuse Reflection, Diffuse Transmission, Specular Reflection, and Transmission parameters of the GlassMat (Ray Switch) shader.
- Connect the ShadowGlass shader output to the Shadow parameter of the GlassMat shader.
Ray Switch shader
Floor Plane Shader
- Create a second Standard Surface shader and rename it to FloorMat. Assign it to the floor plane geometry. Change the following parameters:
Base Weight: 0.3
Specular Roughness: 0.2
ShadowMatte -> Range -> ColorCorrect -> Standard Surface
- Create a Shadow Matte, Range and Color Correct shaders.
- Connect the Shadow Matte output to the Range input. Connect the Range output to the input of the Color Correct and connect the Color Correct output
to the Emission Color of the FloorMat shader.
Set Background to Background Color.
Background Color: 0.0 0.0 0.0
Shadow Color: 1.0 1.0 1.0
Shadow Opacity 1.0
Enable: Alpha Mask
Diffuse Intensity: 0.0
ShadowMatte -> Range -> ColorCorrect -> FloorMat (Standard Surface)
When using a SkyDome light, there are some steps required to not break the caustic effect.
- Create a SkyDome light, connect an HDR map to its Color parameter and set the following parameters:
Disable all parameters in Visibility except Transmission and Specular.
This light is to be used for lighting the Glass material itself and is not required for the caustic effect. You may need to break light linking between the Skydome light and the floor plane otherwise the caustic effect may not be visible properly. If you need lighting from a Background with HDRI, try creating a second SkyDome light and break its light linking with the glass object.
Scene setup with SkyDome light. Glass object is better lit.
Render Layers for Compositing
Now the scene is ready to set up render layers for AOV compositing. These can be used to fine-tune the caustics, add dispersion effects etc.
Increasing the Specular Ray Depth will create more reflective bounces in the glass object and give a more realistic result. Note that increasing this value will increase render times.