Ocean wave formation

Posted on June 13, 2008. Filed under: shader, Uncategorized | Tags: , , , |

I want to demonstrate the wave formation in this video. The radial waves are dominant, 3 normal sinusoidal wave components are added to them. Changing the background image changes the reflection and rafraction colors as well.

Read Full Post | Make a Comment ( None so far )

Rendering caustics

Posted on April 21, 2008. Filed under: Lake water shader, shader, Uncategorized | Tags: , , , , , |

However environment mapping is supported by graphic hardware, it is only good approximation in the case where the reflecting/refracting object is small compared to its distance from the environment. This means, environment mapping can be used only when the objects are close to the water surface. Objects under dynamic water surfaces need an often updated environment map, so the usability is limited.

Several approaches render accurate caustics through ray tracing methods, but generally, they are too time-consuming for real-time applications. (See [LWIuBBT]). Other techniques approximate textures of underwater caustics on a plane using wave theory. Although, these moving textures can be rendered onto arbitrary receivers at interactive frame rates, the repeating texture patterns are usually disturbing.

Graphics hardware has made significant progress in performance recently and many hardware-based approaches has been developed for rendering caustics. Real caustics calculation needs intersection tests between the objects and the viewing ray reflected at the water surface. Generally, the illumination distribution of object surfaces needs to be computed, but these are really time-consuming and difficult. Although, backward ray tracing, adaptive radiosity textures and curved reflectors are published methods for creating realistic images of caustics, they can’t be done real time because of the huge computational cost. For more details about these approaches, see [BRT], [ARTfBRT] and [IfCR].

[FRMfRaRCDtWS] describes a technique for rendering caustics fast. Their method takes into account three optical effects, reflective caustics, refractive caustics, and reflection/refraction on the water surface. It calculates the illumination distribution on the object surface through an efficient method using the GPU. In their texture based volume rendering technique objects are sliced and stored in two or three-dimensional textures. By rendering the slices in back to front order, the final image is created, and the intensities of caustics are approximated on the slices only, not on the entire object. The method is visualized on the next figure:

Rendering Caustics

The source of the image is: [FRMfRaRCDtWS].

Although, this reduces computation time, it does not enable real-time caustics rendering. The caustics map cannot be refreshed for every frame using this method.

Caustics-maps show the intensifies of caustics. They are generated by projecting the triangles of the water surface onto the objects in the water. The intersecting triangles influence the force of light on the object. The intensity of the caustic triangles are proportional to the area of the water surface triangle divided by the area of the caustic triangle. The more triangles intersect each other and the higher their intensity is at a given point, the lighter that point is. In the end, caustics map and the original illumination map is merged as on the next figure:

Caustics rendering 2

The source of the image is: [FRMfRaRCDtWS].

[IISTfAC] introduces a faster approach for rendering caustics. The method emits particles from the light source and gathers their contributions as viewed from the eye. To gain efficiency, they emit photons in a regular pattern, instead of random paths. The pattern is defined by the image pixels in a rendering from the viewpoint of the light. Or in another way: counting how many times the light-source sees a particular region is equivalent to counting how many particles hit that region. For multiple light sources, multiple rendering passes are required. Several steps are approximated to reduce the required resources, for example, interpolation among neighbouring pixels, no volumetric scattering effect or restriction to point lights.

In [IRoCuIWV], a more accurate method is described. In the first pass, the position of receivers are rendered to a texture. In the second pass, a bounding volume is drawn for each caustic volume. For points inside the volume, caustic intensity is computed and accumulated in the frame buffer. They take warped caustic volumes into account also, which is skipped in the other caustics-rendering techniques. Their technique can produce real-time performance for general caustic computation, but it is not fast enough for entire ocean surfaces. For fully dynamic water surfaces with dynamic lighting, their method rendered the following image at 1280 x 500 pixels with 0.2 fps:

Caustics rendering example

For more details, see [IRoCuIWV].

In [DWAaR], they optimise the problem to real-time performance. They consider only first-order rays and assume the receiving surface at a constant depth. The incoming light beams are refracted, and the refracted rays are then intersected against a given plane. The next figure illustrates the method:

Caustic trinagles

To reduce the necessary calculations, only a small part of the caustics-map is calculated, and they show a method to tile it for the entire image seamlessly. Finally, the sun’s ray direction and the position of the triangles are used to calculate the texture-coordinates by projection. For futher discuss on this method, see [DWAaR].

The main ideas of caustics rendering were briefly introduced. The accurate methods use ray tracing techniques, but they cannot produce real-time performance without cheating. The most often used approaches use pre-generated caustic textures and try to avoid the visible repetition.


[FRMfRaRCDtWS] – Kei Iwasaki1, Yoshinori Dobashi and Tomoyuki Nishita: A Fast Rendering Method for Refractive and Reflective Caustics Due to Water Surfaces

[BRT] – J. Arvo, “Backward Ray Tracing,” SIGGRAPH

[ARTfBRT] – P.S. Heckbert, “Adaptive Radiosity Textures for Bidirectional Ray Tracing,” Proc. SIGGRAPH

[IfCR] – D. Mitchell, P. Hanrahan, “Illumination from Curved Reflections,” Proc. SIGGRAPH

[IISTfAC] – Chris Wyman, Scott Davis: Interactive Image-Space Techniques for Approximating Caustics

[IRoCuIWV] – Manfred Ernst, Tomas Akenine-Möller, Henrik Wann Jensen: Interactive Rendering of Caustics using InterpolatedWarped Volumes

[LWIuBBT] – Mark Watt: Light-Water Interaction using Backward Beam Tracing

[DWAaR] – Lasse Staff Jensen, Robert Goliáš: Deep-Water Animation and Rendering

Read Full Post | Make a Comment ( None so far )

Liked it here?
Why not try sites on the blogroll...