Skip to content. Skip to navigation

Illuminate Labs

Sections

Render the perfect Cornell box

Learn the basics about photon mapping and Final Gathering in Turtle by constructing the classic cornell box.

Project files: cornellbox.zip

The aim of this tutorial is to explain how the global illumination system works in Turtle. First we need to open a basic Cornell box scene in Maya.

The scene consists of the Cornell box and two spheres, one reflective and one refractive. The scene also contains an area light that will be used for emitting light and photons.

We need to enable the area light to cast a shadow. Area lights can cast both Raytraced and Depth Map shadows. Depth Map shadows will only works good on non transparent objects, and the refractive object has a transparency of 0.900. We will use Raytraced shadows because of this.

Enable the Use Ray Traced Shadows attribute for the area light, set the attribute ShadowRays to 1 and RayDepthLimit to 2. Check the value of Shadow in the Raytrace section of Turtle's Render Global; the attribute needs to be set to a minimum of 2.


With this scene Turtle will produce a frame that looks like this: 


Global illumination

Open the Turtle render options menu. Enable Global Illumination and select Standard Photon Mapping from the drop down menu.

Change the Photon Accuracy value to 300, and the Photon Radius to 3.

Open up the attribute editor window for the area light, find the Turtle rollout and check the Emit Photons box.

Lower the Photon Energy value to 200 and set the Global Illumination Photons to 100000. A rendering of the scene will produce a frame that looks like this:

To make the Global Illumination look smoother, we need to enable Final Gather. Open the Turtle Rendering Options menu and click the Final Gather checkbox. When Final Gather is used, a rough estimate of the indirect light is sufficient for the photon map, since a Final Gather sample is an average of many Gathering Rays

Set the shading method to Photon Map + Direct Illumination, the Gathering Rays to 500, Accuracy to 1 and Smooth to 1. With this scene Turtle will produce a frame that looks like this:

The Photon Map + Direct Illumination setting will enable the Final Gather to use the indirect photon map and to do a shading call for every Gathering Ray. This means that the gathering ray can be raytraced through transparent objects, and be reflected on objects with reflectivity. This setting will produce better looking images, but at a cost of longer render time.

To get a shorter render time we can do three things.

  • Set the Final Gather Shading Method to Photon Map: this will eliminate the shading call in Final Gathering.
  • Enable Liquid Light Photon Mapping in Global Illumination: LiquidLight is less accurate but much faster then Standard Photon Mapping.
  • Enable Caustics.

Finishing touches

To get smooth, soft shadows, increase the Shadow Rays slider to 20 under Raytrace Shadow Attributes in the area light attributes window.



Return to Tutorial index

Last modified 2006-07-12