# Exploring Ray Tracing – Global Illumination - Compute Caustics

## Recommended Posts

So there it is, that enigmatic little check box under Photon

Mapping called “Compute Caustics”. What is up with that?

Should I check the box? How does it affect my ray trace?

If we consult Chief’s help file we get the following information:

Global Illumination –

> Check  Use Photon Mapping to accurately calculate bounced

lighting in a scene. When unchecked, ray traces have low quality

lighting effects but generate more quickly. Use Photon Mapping

should be checked for all interior scenes and unchecked for most

exterior scenes.

> Check Compute Caustics, to use caustic photons, which are

photons used in areas of focused light. Caustic photons are helpful

when modeling certain effects as light shining through glass.

Digging a little deeper we find this in the dictionary definition of

“caustic”. Aside from the more familiar meanings of the word

there is also this reference in relation to optics:

of, relating to, or denoting light that is reflected or refracted by a curved surface

Wikipedia expounds upon this further:

In optics, a caustic or caustic network is the envelope of light

rays reflected or refracted by a curved surface or object, or the

projection of that envelope of rays on another surface. The

caustic is a curve or surface to which each of the light rays is

tangent, defining a boundary of an envelope of rays as a curve

of concentrated light.

Taking all of this into consideration I created a simple scene

where the warm glow of the late afternoon sunlight streaming thru

a window highlights a pair of vases and casts their shadows onto

the wall. (How do I know it’s the late afternoon sun? Because I

never see the early morning sun (unless I’m recovering from an

extremely long night))

This should meet the criteria of having a source of focused light

(the sun) shining thru (being reflected and refracted by) a curved

glass surface (the vases) and projecting onto another surface (the

wall).

FYI, the scene I created to demonstrate the effects of computing

caustics consists of 6 elements (a window, mirror, side table, place

mat and 2 vases). Everything in the scene is stock Chief content

from the Core Catalogs. I did replace the side table top with one

I created with a more realistic edge molding (Chief’s top had a

lame 45º bevel for an edge molding). The place mat is an oval rug

set to 1/16” thick and given the material of linen fabric. The vases

are 2 different versions of the same vase. I just changed the sizes

and colors and changed the Material Class to Transparent. To tie

things together I used the Rainbow Tool (Adjust Material Definition)

to get the color of the place mat and then used that color for the

walls. And then there was a lot of tweaking of the Sun Angle to

get the light in all the right places.

So what can we learn from all of this? Keeping in mind that we

are talking about very subtle effects here, let’s pull a couple of

ray traces and see what we get.

Both ray traces are identical in every respect save for the fact

that the first one is using Photon Mapping without computing

Caustics and the second one is using Photon Mapping with

Compute Caustics turned on.

I believe you will see that the answer is written on the walls.

Without Caustics (below)

With Caustics (below)

##### Share on other sites

Rich - Excellent explanation and examples. The effect can be subtle but often it is these little things that brings a scene together. I find that the compute caustics can have a more profound affect when you have light fixtures where the bulb (light source) is behind a glass covering and must travel through the glass covering in order to light the room.

One note, you may need to up your pixel size in order to fully appreciate the effect. Will take longer to raytrace but the wait may be worth it.

Graham

##### Share on other sites

One note, you may need to up your pixel size in order to fully appreciate the effect. Will take longer to raytrace but the wait may be worth it.

Good call Graham. I doubled the pixel size and sure enough it

picked up some details that weren't present at the lower count.

##### Share on other sites

Rich - Just curious, what material settings did you use for the mirror that enables it to reveal things that are invisible in the normal world?

Graham