|
Caustics In this tutorial we are going to have a look at caustics and how to create them in Maya.
Photon Mapping Mental Ray (Maya 5.0+) simulates caustics using a photon map. In a preprocessing step, the light sources in the scene emit photons which are traced through the scene using photon tracing to generate a photon map. Photons emitted by lights can be reflected or refracted specularly. Mental ray photons continue through the scene until they hit an object that is diffuse (or the photon trace depth is reached). When the caustic photon hits a diffuse object, it is added to the caustic photon map.
Texture mapped emulation Using the caustic photon mapped solution of Mental Ray will produce excellent results, but as you can see by now, the rendering overheads are not very attractive. In a realistic production environment it is not practical to adhere to the luxuries of caustics, so a bit of lateral thinking can save you a ton on render times. A cheap way to achieve resonable caustics is to create a texture map that looks like the original caustic pattern and then mapped this to another light. If we turn off the primary visibility of the glass and brandy and stop the light casting shadows, the following image is what can be seen from the point of view of the light.
If we use this as a stencil in photoshop, we can trace the caustic hotspots such that we have a light texture map similar to the image below.
All that is left to do now is to duplicate the existing light, turn off its shadows, break light links between this new light and the brandy glass and then finally map this file texture to the colour channel of the new "fake caustic" light. You may need to rotate the texture in UV by 180 degrees as well as turn off UV wrapping (remembering to set the default colour in the colour balance to black so no light leaks out. With all this done, the following image was rendered.
This approach to creating caustics is much more favorable for animation, just as long as neither the light nor the glass ever moves. This is by no means as high a quality as that produced by Mental Ray, but at 9 seconds a frame to render, I am not complaining (I had time to boil the jug, make tea and play 2 games of Solitaire for the same render using Mental Ray...)
| ||||
|
|