I received a question about adding caustics to the matte/shadow/reflection material in mental ray. The setup I typically use for such a scenario might be useful for a broader audience so I turned my reply into a tutorial. Read on for the details.
Here lately I’ve been setting up my own scenes to allow more individual control over specific elements. In this particular scene I wanted to control the look of the caustics so I use a specific light source to generate the caustic photons and ONLY the photons. It doesn’t add light to the scene, etc., only caustics.
There are three lights in this scene. The first light is a skylight to provide general/low detailed illumination from the environment HDR. This isn’t really needed for this particular scene since the objects are chrome and glass. However since I’m providing the scene I figured I’d set it up for more typical usage where your objects would pickup some illumination from the HDR.
The second light is a mr area omni light. It’s sole purpose is to provide the hard shadows from the sun in the HDR. Typically the HDR + Skylight + FG combination doesn’t produce this type of shadows. For that you’d need to use something like the new IBL node or Importons/IP. The use of those options is outside of the scope of this tutorial so I went with the more standard route of using a light to generate the hard shadows.
The third light source is a direct light and it’s purpose is to generate the caustic photons. Here’s a screen capture of the light setup:
The skylight is configured to just use the scene environment, nothing special there. The other two lights however will need some adjustments. On the mr Area Omni light, named “Shadow Casting” in the scene, I disabled the Diffuse and Specular options. This prevents the light source from adding illumination or specular highlights to the scene. By default it will not generate caustic photons either. Therefore the only thing it will contribute to the scene is a shadow.
The target directional light source, named “Caustic Photon Generator” in the scene, also has the diffuse and specular options disabled. I did not want light or specular highlights from it either. Instead I wanted only caustic photons. Therefore it’s set to generate caustic photons (right click on the light, go to the mental ray tab and enable the caustic generating option).
I also decreased the multiplier of the “Caustic Photon Generator” light source. I did this because I found that the indirect illumination it was producing was washing out the shadows on the torus knot object where it’s focused. When the light multiplier is decreased, it also decreased the energy of the caustic photons. So to counter balance that I increased the Photon Energy multiplier of this light source to bring back the intensity of the caustic photons only. Below is a screen capture of the light properties for both the shadow generating light and caustic photon generating light.
Material wise there’s nothing unique here. The chrome is the A&D chrome preset, the Glass used on the torus knot is the A&D physical glass preset with the color red applied. The matte/shadow/reflection material has the typical setup for this type of scene. I did tint the shadows a bit to add some blue like the shadows in the back plate though.
With this type of setup I can easily manipulate the look of the caustics or even render them out separately for post adjustments by replacing the backplate with a black color, etc.. Lot’s of options there to make life easier.
You can download the file HERE. I think I saved it back to 3ds Max 2011 format.