Keep up-to-date with Free tutorials!!

 

Sign up to our twice-monthly newsletter today for the latest tutorials, interviews and product information.

Sign me up to receive third-party emails from 3dtotal's partners, too!

- Latest news
- Exclusive Shop Offers
- Preview early content
- Plus much more

 

Not Ready to take that step? OK, Why not just Subscribe to the RSS Feed

 
submit tutorial
1 | 2
Diamond Caustics

By Philippe Le Miere
Web: Open Site
| Your Rating:
rating star nonerating star nonerating star nonerating star nonerating star none
(0 Votes)
| 32455 Views
| 0 Comments
| Comments 0
Date Added: 9th December 2009
Software used:
Maya

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:

1190_tid_06_GI&FG_tmp.jpg
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.

1190_tid_07_caustics.jpg
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.

1190_tid_08_intensity.jpg
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.

1190_tid_09_num_photons.jpg
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.

1190_tid_10_accuracy.jpg

Here the Accuracy has been set to 1 (with the number of photons reduced back to 10,000 to get a quicker render). It can be seen here how the photons are being refracted onto the surrounding surface.

Caustic Radius controls the maximum distance at which photons are consider for caustics. Left at its default of 0, the radius is automatically calculated and is usually the best setting.

The Caustic Filter Type controls the sharpness of the caustics. There are two settings Box and Cone. Box will make caustics look sharper and Cone makes caustics look smoother. The resulting difference can be subtle and I have a preference for the Cone filter.

The Caustic Filter Kernel is the last of the settings and specifies the size of the filter applied to caustic photons. The default of 1.1 is fine in most cases.

Final Touches

To improve the final render quality:

  • Global Illumination and Caustic Photons from the light were both increased to 80,000
  • Photon Intensity was also increased to 6,000 to brighten the scene
  • The Max Reflection\Refraction Photons was increased to 6
  • And Max Photon Depth was increased to 10
  • Global Illumin and Caustic Accuracy was increased to 120
  • The Number of Samples was increased to Min = 0 and Max = 2
  • Multi-pixel Filtering set to Gauss
  • Jitter turned on in Sample Options
  • Raytracing increased to 10 for Reflections/Refractions and 20 for Max Trace Depth

1190_tid_11_final.jpg
Just for fun I set the Col of the diamond material to blue - not sure if there is such as thing as a blue diamond though.

Reference

The individual files for this tutorial are available for download:

01_set-up.mb
02_dielectric_mat.mb
03_GI&FG.mb
04_caustics.mb
05_final.mb

Scenes were modeled and rendered using Maya 6

The caustics details were partly based on an article at Interstation3d

The dielectric material details were partly based on an article at Matty3d

Jeremy Birn's, "Digital Lighting and Rendering" has more information about the Fresnel Effect (Fresnel Reflections)

The Maya Help manual is copyright of Alias Software




< previous page

 
1 | 2
Related Tutorials

Tutorial

Gallery Image.



Keywords: Animation, Rigging, Transformer, Decepticon, Modeling, Lighting

Go to tutorial
rating star fullrating star fullrating star fullrating star fullrating star full (5)
Comments 0 Views 16072

Tutorial

Gallery Image.



Keywords: Making of, Tutorial, Rat, Cartoon, Lighting, Blender, ZBrush, 3ds Max, V-Ray, Advertisement

Go to galleries 1
rating star fullrating star fullrating star fullrating star fullrating star half
Comments 2 Views 82000

Tutorial

Gallery Image.



Keywords: Tutorial, Car, KeyShot, Rendering, Lighting

Go to galleries 1
rating star fullrating star fullrating star fullrating star fullrating star half
Comments 1 Views 70240

Tutorial

Gallery Image.



Keywords: beginners, fundamentals, 3ds max, texturing, rendering,

Go to galleries 1
rating star fullrating star fullrating star fullrating star fullrating star full
Comments 2 Views 26870
Readers Comments (Newest on Top)
avatar
(ID: 139975, pid: 0) Ceruleandragon on Fri, 10 August 2012 5:49pm
Your tutorial is outstanding! Thank you.
Add Your Comment