'Maya'

 
'Diamond Caustics' by Philippe Le Miere


Lighting Set-Up:


There are three main areas to cover when setting up the lights: applying a Physical Light Shader, converting the point light to a Mental Ray Area Light, and turning on Emit Photons.

Since the diamond is using a physically accurate dielectric material, a Physical Light shader is applied to the main light. This shader simulates the natural fall off, or decay of a light. To attach the Physical Light node, select the light and scroll down to the Mental Ray section, Custom Shaders section. Click on the add texture button next to the Light Shader field. A Create Render Node window will appear. Scroll down to the Lights section and select the Physical_light node. The Attribute Editor will switch to display the Physical_light settings. The default values are fine.

Area lights emit light from within a space defined by its shape. This produces a more accurate model for the light and softens the effect of raytraced shadows. To convert the Point Light into an Area Light, select the light again, and scroll down to the Area Light section in the Mental Ray section. Check Area Light. The default Rectangle Type and Sampling is used. Low Level is initially set to 3 to speed up rendering of shadows, but set back to 0 when final rendering. Also, area lights have direction, and need to be rotated to point at the object.

To enable Photon Emission, turn of Emit Photons in the Light’s Caustics and Global Illumination section of the Mental Ray section. Default values are used initially and then adjusted after test rendering.

The scene is now set up and ready to render. The last step is to turn on the Global Illumination and Final Gather. Turning Final Gather Rays down to 100 and rendering with the rest of the settings at their default value produces the following:



Now, real diamonds cast light into their shadow – they are transparent objects and don’t block all the light. Also, because light is being refracted, some of it gets focused into one spot like a lens. It’s these ‘bright shadows’ we call caustics that are missing from the picture.

Caustics:


Caustics are a light effect and the result of specular light transmission. It calculates light that remains focused, unlike Global Illumination which calculates how light diffuses. Caustics are usually seen as light patterns on a diffuse surface created by transparent mediums such as water and glass.

Like Global Illumination, Caustics use a photon map. Photons emitted from a light source are stored in the photon map and used to calculate the effect. Photons have already been turned on in the previous setup of Global Illumination – saving an extra step. Rendering with Caustics turned on, and at their default value produces.



Render times have increased, but when adding caustics to a scene, it is easier to visualize after indirect illumination has been taken into account. Notice the bright spots being cast onto the ground, and how internally the diamond is brighter. The next step is to improve the caustic effect.

Fine Tuning the Caustics:


There are two places that the caustics can be improved, adjusting the photons emitted by the light and controlling the caustics in the Render Global Settings.

The brightness of the caustics can be controlled by the Photon Intensity setting in the light’s Caustics and Global Illumination section.



Here the Photon Intensity has been decreased to 4,000. Note that this setting is now controlling the brightness of both the global illumination and caustics.

The Exponent value, below Photon Intensity is left at the default of 2. This is because a Light Shader is being used and the value of two is the natural decay of light.

Caustic Photons is the number of photons emitted by the light to create the caustic effect and stored in the photon map. The higher the value the better the quality, but the render times are longer. Setting it to 50,000 photons produced the following result – but took much longer to render.



There are now more light patterns and the results are sharper than the first render.

Caustics Settings:


There are four Caustic settings in the Render Global Settings that can be used to improve quality and efficiency: Caustic Accuracy, Caustic Radius, Caustic Filter Type and Caustic Filter Kernel.

Caustic Accuracy controls the number of photons used to estimate the caustic brightness. Generally the default of 64 is fine and values above 100 will smooth the photons. Reducing the Accuracy to 1 though, can be a way of visualizing how the photons are behaving.