tutorials.render-test.comtutorials.render-test.com/worddocs/Caustic_Basics.docx · Web viewCaustics...

11
Caustics - Mental Ray In this tutorial we are going to go over some advanced lighting techniques for creating realistic caustic effects. Caustics are the focused patterns of light which form after light strikes and bounces off of a curved reflective or refractive surface. Think about those dancing shapes of light on the walls or at the bottom of the swimming pool next time you are around one. Remember that last fancy party you attended where they served wine in a glass and you noticed the shapes your glass made as the light from the chandelier passed through the glass and its contents. Remember the rainbow lights and shapes that appeared on your wall when sunlight showed through the peep hole in your door, or from a crystal wind chime on a sunny morning? All Caustics. Caustics are a big part of how light works in the real world and therefore must play a big role in how we simulate light in the 3D world. There are two kinds of caustic light: 1

Transcript of tutorials.render-test.comtutorials.render-test.com/worddocs/Caustic_Basics.docx · Web viewCaustics...

Page 1: tutorials.render-test.comtutorials.render-test.com/worddocs/Caustic_Basics.docx · Web viewCaustics - Mental Ray. In this tutorial we are going to go over some advanced lighting techniques

Caustics - Mental RayIn this tutorial we are going to go over some advanced lighting techniques for creating realistic caustic effects.

Caustics are the focused patterns of light which form after light strikes and bounces off of a curved reflective or refractive surface.

Think about those dancing shapes of light on the walls or at the bottom of the swimming pool next time you are around one.

Remember that last fancy party you attended where they served wine in a glass and you noticed the shapes your glass made as the light from the chandelier passed through the glass and its contents.

Remember the rainbow lights and shapes that appeared on your wall when sunlight showed through the peep hole in your door, or from a crystal wind chime on a sunny morning? All Caustics.

Caustics are a big part of how light works in the real world and therefore must play a big role in how we simulate light in the 3D world.

There are two kinds of caustic light:

ReflectiveandRefractive

1

Page 2: tutorials.render-test.comtutorials.render-test.com/worddocs/Caustic_Basics.docx · Web viewCaustics - Mental Ray. In this tutorial we are going to go over some advanced lighting techniques

It really does not matter how you start this little tutorial as it is more about how caustics work than it is about getting a specific result from the caustic generators.

If you wish to follow along with me exactly however, you are welcome to download this little starter file I have prepared for us: http://tutorials.diclementi.com/start_files/caustics_start.max

Inside you will find a ground plane, a ring with a shiny brass type texture assigned to it, and a blue glass sphere. A skylight for ambient light, and a mr Area Omni light which we will use as a direct light source and as the source for our caustics.

If you hit the render button right after opening the file you will see something like this.

Our textures look nice, and the light is fine ... but this scene is easily pegged for 3D because the laugh does not look natural.

In the real world light is constantly bouncing off of objects and taking color and more light with it... spreading it around infinitely. We learned how to simulate this by adjusting our Final Gather settings in mental ray, but when light strikes a curved surface which happens to be either highly reflective like a mirror, or metal/chrome type surface ... or when it is refractive like crystals, diamonds, water, or glass. Something else happens to the light.

It gets focused and condensed. The original Latin for the word causticus actually means burning. I suspect that right about now everyone is remembering their childhood when they first learned they could burn paper, leaves, or ants with a magnifying glass on a bright sunny day.

You were burning these things with Caustics.

2

Page 3: tutorials.render-test.comtutorials.render-test.com/worddocs/Caustic_Basics.docx · Web viewCaustics - Mental Ray. In this tutorial we are going to go over some advanced lighting techniques

Simulating caustics takes a large amount of calculation and a decent knowledge of how the settings work for your renderer.

We will set caustics up for both our shiny reflective ring and our thick glass sphere in Mental Ray today, but know that in all types of 3D rendering software these ideas are similar.

Ever since 3D Studio 2012 I believe, we have had to turn caustics on from the main source of direct light. Which actually makes good sense. We do this by deciding first which our main source of light will be. In our case it is the "mr Area Omni 001" light that I have already created in the scene.

Select this light, and right click to bring up the Quad Menu...

In the Quad menu, find and click on the Object Properties...

3

Page 4: tutorials.render-test.comtutorials.render-test.com/worddocs/Caustic_Basics.docx · Web viewCaustics - Mental Ray. In this tutorial we are going to go over some advanced lighting techniques

Select the mental ray tab at the top of the window that pops up.

And down under hte Caustics and Global Illumination settings ... mark the check box next to Generate Caustics.

You can do this for more than 1 light source but be wary as with each one you will increase your render times greatly.

Then click the OK button to close the dialogue menu.

The majority of our caustic work will be done in the Render Setup window, where I will discuss the settings and what they do for us.

4

Page 5: tutorials.render-test.comtutorials.render-test.com/worddocs/Caustic_Basics.docx · Web viewCaustics - Mental Ray. In this tutorial we are going to go over some advanced lighting techniques

Hit F10 on your keyboard to open up the Render Setup window, and then go to the Indirect Illumination tab.

Scroll down until you find the Caustics and Global Illumination (GI) rollout and open it up.

The first thing you should see is the Enable checkbox under Caustics. Mark it to turn them on.

Next to the Enable box to the right you will find a Multiplier number. This number increases the brightness of the caustics in the scene... if you want them to reflect more light turn this up. The default of 1.0 is usually sufficient however if you get the rest of the settings correct.

The Maximum Num. of Photons per Sample: value will increase the quality of your caustic light.. smoothing out any rough, speckled, or splotchy reflections the higher the number goes ... it also increases render time the higher the value goes.

Volumes can increase the volumetric light effect of caustics tracing the light from its source to its destination. Like all volume lights, this effect increases render times.

The Light Properties is the next place we really want to focus our energy. The Average Caustic Photons per Light: Defaults at 20,000. I normally like to add a couple zeroes to this and bump it up to 2,000,000. This increases the amount of caustic reflections that can show up in our scene. The more photons, the more bouncing the light does and consequently the more caustics are created.

The Decay: value is the most important value to adjust... This value controls how far the caustic light is allowed to travel before it fades away. It usually defaults at 2.0 which in my experience does not show up very bright in a scene.

The further you reduce this number, the more vivid and bright your caustics will show up. I have reduced the number to an extreme just to demonstrate the effects, but if I were creating a scene I would probably stop around 1.8 or 1.7 ... subtlety is often the key in realistic lighting.

5

Page 6: tutorials.render-test.comtutorials.render-test.com/worddocs/Caustic_Basics.docx · Web viewCaustics - Mental Ray. In this tutorial we are going to go over some advanced lighting techniques

Lastly, you will want to check the box that says "All Objects Generate & Receive GI and Caustics"... this will allow for any reflective or refractive surface in your scene to generate these caustic effects. If you do not wish for everything to generate them, you can leave this box unchecked and turn Caustics on for each individual object in the Object Properties just like we did for the mr Area Omni light.

This relatively simple idea will bring an sense of reality to any scene, and let you generate some pretty great looking effects without a lot of effort.

(Sadly great looking light effects come with great render times ... but that is the price we pay for good looking renders!)

A Refractive caustic will condense and focus the light ... this gives you almost a beam like laser light a lot like our magnifying glass burning the ants idea.

Reflective caustics will bend and spread out based on the reflectivity of a surface and gives us some wonderful curvilinear dancing shapes.

6

Page 7: tutorials.render-test.comtutorials.render-test.com/worddocs/Caustic_Basics.docx · Web viewCaustics - Mental Ray. In this tutorial we are going to go over some advanced lighting techniques

Let's go back to the settings in our Render Setup window here for just a moment and I will explain further what the Samples values can do for your renders.

There are two places we can increase the quality of the Caustic light.

We do this by raising the Photons per Sample numbers in the Caustics Render settings.

The Higher the values, the better your render but also the longer it will take to render.

This side has the Default values of 100 in each of the Photons per Sample number.

7

Page 8: tutorials.render-test.comtutorials.render-test.com/worddocs/Caustic_Basics.docx · Web viewCaustics - Mental Ray. In this tutorial we are going to go over some advanced lighting techniques

The other side however I have raised the first sample value to 400, and the Volume sample number to 200. See how much smoother they get?

Ultra high refractive objects like Diamonds or Crystals bend light so much that it actually splits up the spectrum. Caustic light from these kinds of objects will give you the most well known type of Caustic light ... a Rainbow!

Simulating a High refractive caustic like a diamond or crystal however takes some extra work on the part of the 3D Artist, and in Mental Ray requires that you pass light of several different colors through the object at slightly varying degrees of refraction to get the rainbow split.... The caustics set up however is the same as any other for refractive caustics.

I hope you enjoyed this one, and I hope you use this very basic information to carry forward into other scenes. Glasses, Prisms, Sculptures, and Swimming pools alike.

8

Page 9: tutorials.render-test.comtutorials.render-test.com/worddocs/Caustic_Basics.docx · Web viewCaustics - Mental Ray. In this tutorial we are going to go over some advanced lighting techniques

9