Periodic Caustic Textures

Caustics are the evolving light patterns one often sees swimming pools, rivers, lakes and oceans. Sun light when it hits a water surface is reflected and refracted specularly in various directions. The water surface acts as a distorting lens focusing and defocusing the sunlight on nearby objects. To properly model this phenomenon in computer graphics is quite costly and can be achieved using techniques such as bidirectional path tracing or the photon map.  In many applications, however, one is more interested in capturing the general "feel" and "look" of an environment that has caustics. This is the motivation behind this work where we precompute a caustic texture map which is both periodic in space and in time. Our "texture map" consists of a set of 32 picture files. Each picture is spatially periodic which means that you can seamlessly tile an entire plane with only one texture. The sequence of 32 tiles also wraps around in time. To achieve the periodicity I use the fast Fourier transform (FFT) in a crucial manner. The usefullness of the FFT comes from the fact that most phenomena in Nature tend to be approximately cyclical. On this page you can find a some more information on how I generated the caustics. You can also download precomputed sets of caustic texture maps. If you are going to use these texture maps, please make sure to acknowledge me and/or my company.

Brief Overview of the Algorithm

First I generated a random (fractal) surface profile by filtering a three-dimensional white noise by a power law-like filter in space and a gaussian-like filter in time. One realization of such a surface looks like this:

To generate the caustic texture I assume that the light source points straight at this surface, then for each vertex of every quad on the surface I compute the intersection of the refracted ray with a plane at some depth D. This is shown in the figure below:

Then I break up the quad into two triangles which I then shade using Open GL. The intensity is proportional to the area of the triangle. This makes sense since in regions of high focus the triangles are smaller than in regions of defocusing. The alpha blending implemented in OpenGL takes care of blending all the triangles.The figure below shows the computed caustic texture map along with the fractal surface:

Some of the caustic textures also have colourful patterns near the focusing. These colours are due to the dispersion of light waves in water: waves of different wavelengths travel at different speeds in water. This effect is well known and easily demonstrated with a prism. To handle these effects I compute two sets of refracted triangles one with an index n=1.3 and one with an index of refraction equal to n=1.3+dispersion (where the dispersion constant is an input parameter to my program). Then I draw a whole bunch of triangles in between with colors coming from a nice spectral ramp.


These texture can be used in MAYA using a ``file texture''. Just specify the filename and use an expression on the frame extension attribute. The expression should be

   file1.frameExtension = ((frame-1)%32) + 1,

for the textures to loop in time.

You can download the texture files by clicking on one of the pictures below. The texture files are zipped TIFF files.