Working with caustics in your render is an essential step in creating highly realistic renders that closely mimic the way that light interacts with reflective and refractive surfaces in the real world.
Knowing why caustic light patterns happen, how they work and where to implement them is one of the first steps in creating photorealistic renders. Let's go over caustics so you can start implementing them into your next project.
What are Caustics?
What are caustics? Caustics is a term that is not just utilized in the world of 3D graphics. It's the term used that describes the patterns of light and color that occur when light rays are reflected or refracted from a surface.
Caustics can be seen in everyday life, from the light distortions at the bottom of a swimming pool to the light patterns being refracted from a transparent object like a vase or wine glass. Caustics are a form of indirect illumination but very specific in how it happens and where it occurs.
Render engines like mental ray (which is licensed and included for rendering in Maya and rendering in 3ds Max) and have a caustic feature that creates these real-world effects through the use of photons which are tiny packets of energy emitted from a direct light source, much the same as global illumination.
These caustic photons can be directed toward a single object creating the light patterns and distortions on the floor or wherever the object happens to be sitting. When working on a photorealistic render, you'll want to consider implementing caustics into the right areas to create the look that you want.
Utilizing caustics in your render engine is great for creating those real-world light distortions that occur on a transparent or reflective object. Because caustics occur at a very specific area and on certain objects, not every render will require caustics. You need to take a close look at your scene, what may need to utilize caustics to increase the realism and where it can be excluded.
For example, if your scene includes shiny or transparent surfaces that refract, reflect and focus light then caustics should be considered. If an object in your scene isn't transparent or reflective then most likely you won't need it. Caustics will greatly increase the render time so use it only when it's needed.
Tips for setting up caustics in mental ray When working with caustics, a powerful feature that should be utilized is the map visualizer in mental ray. This allows you to see the photon placement directly in your viewport. That way you can see exactly where the photons are being concentrated and where you may need to troubleshoot any problems that you find within your render.It'll also show you where photons might be getting placed within the scene where they aren't really needed. For example, outside of the camera view.
To achieve a more accurate result with your caustic render, you need to increase the photon amount that is being emitted from the direct light source. If you are familiar with global illumination you know that by increasing the photon count will noticeably increase the render time.
The same goes when working with caustics. So you need to find the right amount of photons that achieve the look you want while still maintaining a low render time. By default, caustic photons are transmitted to any object within the scene, but not every object in your scene will necessarily need a caustic effect added to it.
To decrease render time and to be able to fine-tune where you want to simulate caustics you can specify which objects you want to receive these caustic photons. To more accurately direct the caustic photons you can use mental ray's feature that allows you to create spotlights that emit caustic photons, but do not provide any direct illumination. This is great because you can focus the caustic photons into the area of the scene that require them and it won't disrupt any other lighting within the scene.
A great way to decrease render time significantly is to save and reuse caustic photons. Once you are happy with the caustic pattern, you can save out the photons, and anytime you render the render engine won't have to re-render those photons. Of course this won't work if you require the object to animate in any way, or if it will eventually need to be moved, but if you are rendering a still image this is a great technique to utilize.
Now that you're familiar with caustics try utilizing it in the areas of your scene that will benefit from it. It will help you achieve a much higher level of realism in your renders.
Here's a few Pluralsight courses that will get you up and running with caustics for your 3D application: