Fake Caustic Effect

Glass transmission fake caustic on floor plane (shadow_matte)

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 that 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.

The shader can be downloaded here.

Note:

Information about rendering true caustics can be found here.

Scene Setup and Lighting

distant_light (directional)

Camera Glass Shader

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_aov so that you can render out separate caustic AOVs.

Shadow Glass Shader

specular_roughness : 0.1

transmission_weight : 1.0

Enable transmit_aov

Facing Ratio

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.

Bias: 0.136

Gain: 0.619

Enable Linear

Enable Invert

facing_ratio -> 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.

Ray Switch shader

Floor Plane Shader

Base Weight: 0.3

Specular Roughness : 0.2

Emission: 1

ShadowMatte -> Range -> ColorCorrect -> Standard Surface

to the emission_color of the FloorMat shader.

Shadow Matte :

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

Backlighting : 0.0

Enable: Alpha Mask

Diffuse Intensity : 0.0

Range:

Enable smoothstep

ColorCorrect:

Gamma: 0.6

shadow_matte -> range -> color_correct -> FloorMat (standard_surface)

Skydome Light

When using a skydome_light, there are some steps required to not break the caustic effect.

Samples: 3

Disable all parameters in visibility except transmission and specular.

Note:

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.

Caustic layer Glass layer Precomp version

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.

Glass shader (left). Floor shader (right).