The paper discusses various aspects of the waved water surface and underwater bottom video representation simulation and also expands on the math models and algorithms of the following related tasks: waved water surface simulation; calculation of reflected and refracted rays directions in 3-D space; underwater caustics (extra illuminated areas) forming; refractive distortion of the bottom view account; reflected skylight addition.
The ‘Breeze’ Microsoft Windows demo application realizes all described algorithms and enables real-time simulation of the underwater view. The paper also assesses the efficiency of the Intel Integrated Performance Primitives used in this application. Presented images illustrate all optical effects described in the paper.
Despite certain achievements in the area of waved water surface video representation (see, for example, [1-6]), each work in this subject must be viewed as relevant. This article describes a physical model that was used in the development of the ‘Breeze’ Microsoft Windows demo application designed for modeling of underwater view video representation in real time. Unlike the algorithm described in , ‘Breeze’ application simulates more optical phenomena, namely light reflection, refraction and focusing by the waved water surface. The last one leads to forming of so-called caustics (intensively illuminated lines and shapes) on the bottom. Both algorithms have advantages and disadvantages, which will not be discussed in detail in the frames of this paper.
To increase the performance rate, we used the Intel? Integrated Performance Primitives (IPP) library . Destination and capabilities of this software are briefly described in in section 5. As shown in that section, utilization of the IPP library enables to increase the performance rate by 3-5 times.
Video representation of the sea bottom, under the waved water, surface is built as a sequence of frames, each corresponding to the current time moment. The procedure of the building the frames is divided into the following steps.
1. Simulation of the waved surface, namely, calculation of the surface elevation z(x, y, t) and its declination angels (dz/dx and dz/dy) as functions of the horizontal plane coordinates x, y and time t. The simulated surface must have characteristics more or less close to the ones of the real water surface.
2. Calculation of reflected and refracted ray directions in each point of the surface (separately for the solar and view rays). This step is the most complicated and requires substantial computational resources.
3. Calculation of the number of refracted solar rays found for each bottom point to define illuminance in that particular point.
4. Calculation of coordinates where the view ray finds the bottom after refraction (those coordinates are necessary to build a distorted bottom view).
5. Calculation of the reflection coefficient in each surface point (to use together with the reflected ray direction to build the skylight reflection effect).
6. Frame forming, that is, reflected skylight and caustics effects adding to the bottom image (previously read graphical file) and its refraction distortion performing.
7. Perspective transforming of the frame.
Described procedure is repeated for each frame with the next value of t to simulate video representation of the sea bottom view. The following sections offer more details on these steps.
Intel Integrated Performance Primitives (IPP)  is a software library that provides a variety of multimedia functions for developing high performance applications. This software includes a number of library segments, each of which is highly optimized for the use with one of the Intel? processors (including the Intel Pentium? 4 processor, Intel Itanium? processor, and Itanium 2 processor). The IPP library is very effective for processing data arrays, such as vectors, matrices, images, etc. In this case application performance rate may increase highly. The other purpose of the IPP library is to simplify code writing. IPP includes functions that are often used in different calculation regions, such as vector and matrix algebra, image development, etc.
To prove the efficiency of the use of the IPP software library, a performance test of the ‘Breeze’ application was carried out. Computers based on two different processors, a 700 MHz Intel Pentium III processor and a 2000 MHz Intel Pentium 4 processor, were used. Two modifications of the application were optimized for the Pentium III processor and Pentium 4 processor respectively (these modifications differ from each other by the IPP optimization variants they use and by compiler presets). Both programs were compiled by the Intel C++ compiler . The Pentium III processor does not support some Pentium 4 processor instructions, thus it was tested only with the first modification. All the tests were performed with picture resolution 512×384 pixels.
The results of the test are presented in Fig. 3. The figures above columns show averaged performance rate in frames per second; the blue columns correspond to IPP disabled mode, the yellow ones correspond to IPP enabled mode. The figure proves that the use of the most optimized IPP library segment in combination with the optimal compiler presets may significantly enhance the application performance.
Fig. 3. ‘Breeze’ application performance rate in frames per second shown on (from left to right): the Pentium III processor (1), Pentium 4 processor using the Pentium III processor-optimized library (2), and Pentium 4 processor using the Pentium 4 processor-optimized library (3)
1. Lasse S. Jensen and Robert Golias. ‘Deep-Water Animation and Rendering‘.
2. Jerry Tessendorf. ‘Simulating Ocean Water‘. SIGGRAPH 2001 Course notes.
3. Miguel Gomez. ‘Interactive Simulation of Water Surfaces’. Game Programming Gems. ISBN 1-58450-049-2.
4. Nick Foster and Dimitri Metaxas. ‘Realistic Animation of Liquids’. Graphical Models and Image Processing, 58(5), 1996, pp.471-483.
5. Gary A. Mastin, Peter A. Watterger, and John F. Mareda, ‘Fourier Synthesis of Ocean Scenes’, IEEE CG&A, March 1987, p 16-23.
6. Dmitry Abrosimov, Victor Zelenogorsky, Michail Kryukov. ‘Computer Simulation of Water Surface View’. Proceedings of the 9-th International Conference on Computer Graphics and Vision (GRAPHICON-99). Moscow, MSU, 1999, pp. 255-260 (in Russian).
Copyright 2002 © Intel Corporation.
All Rights Reserved.
About the Author
Dmitry Abrosimov is a software engineer on the Intel Performance Libraries software development team at Intel Corporation, based in the Nighzy Novgorod Russia software lab. Dmitry graduated from Gorky state university in 1979 and earned a Ph. D. degree (Russian Candidate of sciences degree) in physics and mathematics in 1996. Prior to joining Intel, Dmitry worked at the Applied Physics Institute in Nizhny Novgorod, Russia, specializing in underwater acoustics.