Conference PaperPDF Available

Real-Time Open Water Environments with Interacting Objects.

Authors:

Abstract and Figures

Large bodies of water are an integral part of nature and, thus, are of high interest for interactive 3D applications, e.g., computer games and virtual environments. We present a new scheme for real-time wave simulation in large-scale water environments with physics-based object interaction. In addition to a fast and realistic liquid representation, our method focuses on the creation of plausible detailed waves caused by moving boats. We expand the well-known wave equation by applying it to moving grids to simulate an apparently limitless body of water. Additionally, we present a fast, particle-based boat simulation, which is coupled to water simulation. Importantly, most parts of our method can be implemented efficiently on GPUs. We demonstrate the visual realism and performance of our approach with several experiments using different boats and other floating objects, achieving high frame rates on a desktop PC.
Content may be subject to copyright.
Eurographics Workshop on Natural Phenomena (2009)
E. Galin and J. Schneider (Editors)
Real-Time Open Water Environments
with Interacting Objects
H. Cords and O. Staadt
Visual Computing Group, University of Rostock, Germany
Abstract
Large bodies of water are an integral part of nature and, thus, are of high interest for interactive 3D applica-
tions, e.g., computer games and virtual environments. We present a new scheme for real-time wave simulation in
large-scale water environments with physics-based object interaction. In addition to a fast and realistic liquid rep-
resentation, our method focuses on the creation of plausible detailed waves caused by moving boats. We expand
the well-known wave equation by applying it to moving grids to simulate an apparently limitless body of water.
Additionally, we present a fast, particle-based boat simulation, which is coupled to water simulation. Importantly,
most parts of our method can be implemented efficiently on GPUs. We demonstrate the visual realism and perfor-
mance of our approach with several experiments using different boats and other floating objects, achieving high
frame rates on a desktop PC.
Categories and Subject Descriptors (according to ACM CCS): Computer Graphics [I.3.7]: Three-Dimensional
Graphics and Realism—Animation
1. Introduction
Simulation of complex, physics-based liquid effects has be-
come a staple in the field of computer animation and visual
simulation. Today’s offline-methods are realistically and de-
tailed, but computational cost is very high. Due to the com-
plexity of fluid physics in principle, achieving comparable
realism in real-time is an ongoing challenge that is aided by
the increasing performance of today’s GPUs.
This paper describes a method to simulate interactive
large-water environments that supports detailed surfaces
with focus on object-wave interaction. We expand differ-
ent techniques to achieve high-quality results in real-time.
We reduce complexity by applying an adaptive height field-
based method. It is based on the 2D wave equation and is
solved using a finite difference method (FDM). Thus, a fine
discretization can be used for simulation – even in interactive
environments. Using a moving grid method, detailed simula-
tion is carried out only in areas where it is needed. We extend
the approach to the use of multiple grids to obtain an adap-
tive simulation. Additionally, we describe an efficient boat
simulation and a two-way coupling with liquids simulation.
Hence, realistic boat movements and boat waves can be cre-
ated. The scheme has been evaluated in practice, achieving
good performance and realistic results due to extensive use
of the GPU. The approach is suited for real-time environ-
ments such as VR environments or video games.
2. Related Work
Interactive simulation of liquids can be classified into
surface- and volume-based techniques. The latter apply the
Navier-Stokes-Equations in 3D to model the liquid’s phys-
ical flow properties. In interactive computer graphics, the
equations are typically solved using an efficient finite differ-
ence method [Sta99] or smoothed-particle hydrodynamics
(SPH) [MCG03]. Adaptive couplings of 3D free surface sim-
ulations with 2D simulations have been presented to increase
performance [TRS06,Cor07]. An SPH simulation coupled
with a rigid-body simulation was presented in [Ama06].
GPU-based implementations of 3D simulations pushed the
limit of virtual liquids realism [Har04,HKK07,CIS07]. The
use of adaptive domain translation within a 3D fluid sim-
ulation is presented in [SCP04]. Our work uses a domain
translation within a 2D FDM simulation as well to reach an
adaptive representation at high performance. Surface extrac-
c
The Eurographics Association 2009.
H. Cords & O. Staadt / Real-Time Open Water Environments
tion using, for example, a marching cubes algorithm [LC87]
is another bottleneck of such 3D simulations. [MSD07]pre-
sented a fast screen-space approach for 3D surfaces to over-
come this problem. Since complexity of simulation and sur-
face extraction of 3D liquids is high, only small amounts of
liquid can be simulated in real-time. It is important to note
that many liquid effects (e.g., rain or puddles) can be approx-
imated realistically without an underlying physical simula-
tion [TI06].
The wave equation supports simulating the propagation of
2D waves efficiently. Usually, it is solved by applying a finite
difference method [Gom00], resulting in a height field that
can be rendered efficiently. [JH03] described the coupling of
a tiled ambient wave simulation and a wave equation sim-
ulation — the presented work is following this paradigm,
creating an infinite environment. [YHK07]presentedanew
method for solving an approximation of the wave equation.
Particles are used to simulate propagating waves with im-
pressive results at high frame rates. They also present a cou-
pling of rigid-body simulation and wave particles, resulting
in a real-time boat simulation. Their work is closest to our
method, yet the simulation is different. Due to the impor-
tance of their work, a direct comparison is given in Section
6. The wave particles method has been coupled with a two
dimensional flow simulation in [Cor08]. Other approaches
of height field-based liquid simulation are based on solv-
ing the Navier-Stokes Equations in 2D and constructing a
height field from pressure [CdVLHM97]. [KM90]usedan
approximated shallow water equation, which results from
the Navier-Stokes Equations, disregarding the vertical veloc-
ity of the liquid. [OH95] presented the creation of splashes
within height field-based liquids. [TSS07] presented the
creation of bubbles and foam within a shallow water simula-
tion. Tessendorf presented a technique for the animation of
realistic ocean waves [Tes04b] and expanded it for wave cre-
ation of objects in [Tes04a], see also [Bel03,JG01]. We use
the technique to generate ambient waves. [JG01] described
an entire ocean environment, including the shallow water
equation. Rigid-body dynamics within liquids may be de-
termined by particle systems discretizing the rigid-body. Es-
pecially within height field-based liquids, the acting forces
can be determined efficiently in this way (e.g., [DSH06]).
Reflection and refraction effects in real-time envi-
ronments are usually approximated by mapping tech-
niques [SW01,Joh04,Sou05]. GPU-based raycasting of an
environment that features two height field-based water and
ground surfaces can be applied using [BD06].
3. Overview
Our goal is to create a realistic, yet interactive ocean-scale
water environment with static objects and moving water
crafts. Focus lies on the representation of surface waves.
Therefore, we spend computational effort on the most visible
property leading to more detailed results. We apply a FDM-
based approach of the wave equation and create a dynamic
simulation grid, using high grid resolutions. Although the
simulation grid has discrete resolution, we focus on creating
smooth animations. We devise an adaptive solution where
simulations occur only in such areas where needed (see Fig-
ure 1). Another important benefit of a dynamic grid is that
the grid can follow moving objects like boats. By placing a
specific object at the grid’s center, the wave creation in the
object’s surrounding area is always interactive. For example,
when a camera follows a moving boat, detailed waves are
created in it’s neighborhood, while the infinite ocean surface
with ambient waves outside of the simulation grid is not af-
fected.
4. Simulation
Simulating large water environments in real-time with
highly detailed waves everywhere is not feasible. Hence, we
only simulate the liquid surface where fine detail is needed
(e.g., in the wake of moving water crafts) and animate it in
regions with no object–water interaction. Most ocean waves
are created by wind and move independently. We classify
waves into interactive waves when interaction with objects
occurs and ambient waves otherwise
Ambient Waves For ambient wave animation, we use the
effective method of Tessendorf [Tes04b]. This results in re-
alistic wave propagation for open water. The model is based
on statistical measurements of real ocean environments. The
frequency spectrum is generated by the Phillips spectrum,
supporting handling of wind direction and wind strength.
Since this method generates tiled height fields, several fields
with different aperiodic scales can be used to generate an
infinite ocean surface, where the tiling is not visible.
Interactive Waves The wave equation describes the prop-
agation of waves at time tand position xR2. A 2D linear
partial differential equation (PDE) can be used for simulat-
ing radial wave propagation of liquid surface waves:
f(x,t)1
c2
2f(x,t)
t2=0.(1)
Here, =2=2
12
x2
i
is the Laplacian in 2D and cis the
velocity at which waves propagate across the surface. This
PDE can be solved in a fast and straightforward manner us-
ing an Eulerian grid-based approach. Boundary conditions
have to be included for collision objects as well as for the
boundary of the simulation grid. Such bounding conditions
can be modeled within the wave equation directly. Adapt-
ing f(x,ti)to constant values at the boundary of collision
objects within the liquid models objects and, hence, the cor-
responding reflection of waves. Radially propagating waves
can be created at any position x0and time tiby displacing
f(x0,ti). Displacing several f(xi,ti)can create, for example,
large waves or wave trains.
c
The Eurographics Association 2009.
H. Cords & O. Staadt / Real-Time Open Water Environments
Figure 1: Principle: Several simultaneous wave simulations
are used within the infinite ocean surface.
Additional maps that influence the simulation of the wave
equation can be used to model specific behavior. In shallow
water, for example, velocity depends on water depth. Hence,
ccan be varied according to depth and described by a veloc-
ity map. The same applies to damping and a damping map
may describe the damping according to the type of ground.
Discrete wave equation The discretization of the wave
equation (Equation 1) using a finite difference method can be
carried out using a 2D map zij =f(i,j), with i,j[0,size]
and step size h=1/size. Using central differences, the dis-
cretization leads to [Gom00]:
zt+1
i,j=a·
k=i±1,l=j;
k=i,l=j±1
zt
k,l+(24a)·zt
i,jzt1
i,j,(2)
with a=c2Δt2
h2and time step Δt. Hence, the wave equation is
solved for a rectangular area.
For smooth movement of the simulation grid in surface
space, we define a translation tR2. Note that a translation
with non-integer numbers would result in large numerical
diffusion due to the necessary dissipation step. The trans-
lated grid elements has to be refiltered onto the discrete grid
values within each time step, resulting in diverging wave
trains. To overcome this problem, we split the translation
tinto the integral part tint =(tx
int,ty
int)TN2and the frac-
tional part tfrac R2with 0 tx
frac,ty
frac 1 (illustrated in
Figure 2). Since the numeric solution of Equation 2depends
on the current and the previous time step, the integral trans-
lation told
int of the previous time step is stored for reuse. Con-
sequently, the discrete wave equation is then changed to
zt+1
i,j=a·
k=m±1,l=n;
k=m,l=n±1
zt
k,l+(24a)·zt
m,nzt1
o,p,(3)
with m=itx
int,n=jty
int,o=mtx old
int and p=n
ty old
int . The simulation grid is accessed in surface coordinates,
adding the fractional translation tfrac. Hence, numerical dis-
sipation is suppressed, due to the use of a discrete grid.
Transformation within the grid is carried out on integer ba-
sis. However, the grid can still be moved smoothly, because
access of coordinates works on a fractional basis. To scale
the surface in xor ydirection by sxand sy, the translation
vector is scaled by (1./sx,1./sy)T.
t
tx
frac
-tSimulation Grid
tx
int
ty
frac
ty
int
ty
frac
tx
frac
Figure 2: The simulation grid is moved relative to the infi-
nite ocean surface. Therefore, the translation vector tis sep-
arated into an integer and a fractional part.
The described simulation method can be executed effi-
ciently on a GPU. Using a 2D grid, the method can be imple-
mented within a fragment shader using textures. A general
purpose GPU framework, such as CUDA, can be used too.
Yet the texture-based point of view lets us set the boundary
conditions efficiently by rendering directly into the simula-
tion grid.
Stability We use an explicit approach for solving the wave
equation, we got the following stability constraints (e.g.,
[Gom00]) according to explicit finite difference simulation
methods. The simulation becomes unstable, if condition
(c2Δt2)/(h2)0.5 is not adhered and hence, the height field
grows exponentially (h: Gridstep). Yet, the maximum wave
propagation speed can be determined by the given condition.
Multiple Grids The above method allows for placing the
simulation grid at an arbitrary position on the infinite water
surface. The grid can follow moving objects and the simula-
tion grid can follow the view frustum. We describe the use
of several simulation grids for adaptive simulation below.
Different Locations In some scenarios it may be of impor-
tance to simulate the surrounding of more than one object or
the area within the view frustum only. Our method can be ex-
panded to support multiple moving grids. Even more, each
grid can be moved independently as depicted in Figure 1.
Final height-field values can be determined by superposition
of all overlapping grids. Simulation grid sizes are adapted
according to the importance of the actual simulation. Hence,
waves are simulated where necessary. As a result, we achieve
a fast, environment specific simulation. For example, differ-
ent moving boats can have their own simulation grid and,
hence, full interaction with surrounding liquid. Simulation
grid sizes may vary according to the importance of details
within that grid.
Interference of waves is a fundamental physical principle
and result in superposition of amplitudes (not intensities).
Since waves are interfering without any interaction, differ-
ent grids can be simulated independently — wave interaction
c
The Eurographics Association 2009.
H. Cords & O. Staadt / Real-Time Open Water Environments
between different grids do not occur. Hence, objects in dif-
ferent grids have to be coupled to their belonging simulation
grid only and the final height field can then be determined by
superposition. Take note that the independence of simulation
grids is important for efficient execution, since no data has to
be transferred between simulation grids. Height field values
are scaled down smoothly to zero at the boundaries of mov-
ing grids to guarantee a soft transition to the height values of
ambient waves or interfering simulation grids. A static grid
can be used, if the wave propagation within a static region is
of importance.
Different Scales Our approach can not only be used for
adaptive simulation at different locations, but also at differ-
ent scales. Since multiple grids can be used, one grid can be
used to represent high details if the camera comes close to
the liquid’s surface. For example, in a multiple grid simula-
tion, one tiled grid simulates the detailed wave propagation
of a rain drop hitting the water surface and another grid sim-
ulates the wave propagation of a moving boat (see Figure 1).
If different scales are used, the simulation grid’s translations
have to be normalized: They are divided by their resolution
— otherwise different grids are moving with different veloc-
ities.
Another possibility is the use as an LoD-Simulation. De-
pending on the distance to the camera, simulation grid size
can be decreased, resulting in less details and faster simula-
tions for objects far away.
Foam Foam is a highly complex and chaotic phenomena,
which is important to increase visual realism of simulated
liquid. We model two types of foam. A foam mapping repre-
sents the wave peak of a rendered liquid. Depending on the
height of a grid element (i.e., water wave), the foam map’s
intensity is faded in [JG01] to increase realism. In addition
to this method, we developed a boat wake state machine. It
is described in Section 4.2.
4.1. Rigid-Body Dynamics
Visual realism does not depend on the liquid simulation
alone, but also on the believability of object–liquid interac-
tion. We separate interaction into (i) liquidobject and (ii)
objectliquid interaction. The former describes the dynam-
ics of floating objects and their reaction to liquid motion.
The latter describes the liquid’s reaction to moving boats or
object impacts. We simulate both types independently.
Realistic motion of objects in water depends on stan-
dard rigid-body dynamics coupled with buoyancy forces and
damping forces. In the ideal case, the damping forces are
split into drag and lift forces. More more details we re-
fer the interested reader to a fluid dynamics textbook. To
achieve a real-time simulation, we apply an explicit integra-
tion scheme.
xi
Fb
Fg
Mrot
Figure 3: Rigid-bodies objects such as boats are discretized
using particles.
4.1.1. Representation
We use particle systems for rigid-body physics. Each rigid-
body object is discretized by a set of nparticles with static
positions x0
i(i=1...n)relative to the center of mass xc.Dy-
namic motion is determined according to the translation of
and orientation to xc. Each particle iof a rigid-body has the
following position in world space at time t(see Figure 3):
xt
i=xt
c+Mt
rot x0
i.,whereMt
rot describes the rotation of the
rigid-body object. Each particle represents the surrounding
mass of the rigid-body object and, thus, the buoyancy force
is determined only for particles lying below the water sur-
face: (xt
i)z<h((xt
i)x,(xt
i)y),whereh(x,y):R2Rde-
scribes liquid’s height at position (x,y)and x=(xx,xy,xz)T.
Mt
rot is updated within each time step Δtaccording to an-
gular acceleration as follows: Mt
rot =Mt1
rot +ΔMrot ,where
ΔMrot is the rotation matrix of Δt·Mabout the vector
M/M(M: angular momentum). The momentum of a col-
lection of particles is equal to the sum of angular momenta
of each particle. Hence, ΔMrot can be determined by the sum
of the angular accelerations of each particle. Hence, arbitrary
object shapes with different physical parameters can be sim-
ulated.
Stability Since we use a relatively sparse discretization of
rigid-body objects to achieve high performance, the discon-
tinuity of buoyancy at the free surface can lead to instanta-
neous force changes if a particle is passing the free surface.
To avoid such side effects, the buoyancy force is scaled lin-
early according to a threshold distance dtunder water, such
that the buoyancy force reaches zero at the surface. Conse-
quently, rigid-body movement is smooth – even for sparsely-
sampled objects.
4.1.2. Collisions
Fast collision handling for rigid-bodies has been well studied
in the field of computer graphics. Our approach is influenced
by the observation that a complex and exact rigid-body col-
lision handling is not required for the kind of floating ob-
jects in our system. In many cases (except for dropping ele-
ments), the problem is equivalent to the 2D case. We apply
the following approximation for dynamic object collisions:
according to the distance between different dynamic objects,
a force is introduced that acts between them in opposite di-
rection .
c
The Eurographics Association 2009.
H. Cords & O. Staadt / Real-Time Open Water Environments
Figure 4: Collision particles are introduced for an effective
collision handling. Repulsive forces act between them.
We introduce collision particles xcol to each rigid-body
object as illustrated in Figure 4. These particles are used
to determine the distance di.e., the collision forces ±Fcol.
The collision force is represented by a linear distance ker-
nel. To avoid exhaustive tests between all collision particles,
a standard grid-based orthogonal range search data structure
can be used, that decreases complexity significantly. This
method achieves fast and plausible results without any over-
lapping for moderate velocities, even though correct results
are not guaranteed.
4.2. Boat Simulation
Since our method uses particles to model rigid-body ob-
jects, we can handle objects of arbitrary shape in our sim-
ulation. Figure 3depicts a boat represented by particles. Ob-
viously, our performance decreases with an increasing num-
ber of particles. To reduce the number of particles we only
model the boat’s hull. Since physics calculations are on a
per-particle basis, this procedure results in realistic motion
based on existing waves.
4.2.1. Wave Creation
Since we do not simulate liquid flow, wave creation from
rigid-body objects can only occur when dropping or moving
objects. In case of a dropping object, a wave with the shape
of the intersection of object and surface is created while the
object is intersecting the surface. To determine the starting
time of a wave, each object knows its state s: (0) above wa-
ter, (1) under water. The state is refreshed at each time step
and a wave is created when the object begins to intersect the
surface:
create_wave =(st1=0)((xt
c)z<0)
(st1=1)((xt
c)z>0).
If create_wave is equal to one for a given rigid-body ob-
ject, the object has intersected the water surface and a wave
is created. Hence, the object’s intersection with the surface
plane is projected onto the simulation grid, with an intensity
according to the intensity of the impact.
For creating waves caused by moving objects, we take ad-
vantage of the following physical properties. Pressure on an
moving boat’s hull is higher at its bow than at its stern. Thus,
Figure 5: Waves are generated by intersection of St0and
St1at the actual and the previous time step. Hence, bow
waves are generated in (a) and stern waves in (c).
positive waves are created in front of the boat and negative
ones at the back. The intensity of created waves depends on
the speed of the boat. To determine the area that a boat is
passing through within a time step, we combine the position
and orientation of the current and the previous time steps.
For each time step we generate a map containing the inter-
section of the boat’s hull and the water surface. Since calcu-
lating the exact intersection area is too expensive, we make
two assumptions: (i) we approximate the surface by a plane.
Since ambient waves are usually small compared to the ex-
tent of the surface, this is a reasonable assumption. However,
in scenarios with large ambient waves, this assumption be-
comes a limitation and may result in artifacts. In the final
animation, the difference is hardly visible, since the boat is
in water and the waves are created along the hull in addi-
tion to the ambient ones. (ii) we assume that every boat slice
within z=const.,z<0 is a subset of the slice at z=0. A
slice is defined by the intersection of the polygonal boat and
a plane with z=const. This assumption is valid for most
water crafts, even for a catamaran. For more complex float-
ing objects being pulled through the water, a more sophisti-
cated approach has to be used. For example, the intersection
contour could be extracted by culling according to the two
planes z=±εHence, even strongly dynamic objects with
complex shape would create waves at their boundary layer
intersection. After the texture of intersection Stis created, it
is combined with the corresponding texture from the previ-
ous time step St1. Considering the textures as a set, three
different wave creation states can be constructed (see Figure
5,\: Difference.):
1. Bow wave: St\St1,
2. Body: Bt=StSt1,
3. Stern wave: St1\St.
To create waves, wave intensities may be added to or sub-
tracted from actual simulation grid values. Hence, the cre-
ated waves interfere with existing ones, which is necessary if
the simulated boat should interact with existing waves. If this
effect is not required, the values within the simulation grid
can simply be replaced. If they are replaced, they should be
scaled slightly and translated accordingly to the front. Thus,
artifacts at the boats contour are reduced and a bow wave
is created. If the boats velocity is faster than wave propaga-
tion speed, the bow wave stays constant in front. According
to reality, this area could be improved with splashing effects
known from today’s computer games.
c
The Eurographics Association 2009.
H. Cords & O. Staadt / Real-Time Open Water Environments
Figure 6: Placement of engine waves and the foam genera-
tor (three engines are used in this example).
4.2.2. Wave Reflection
If the boat’s hull should reflect interactive waves, the gener-
ated body set Btcan be used to detect the boats position. If at
rest, St=Bt, otherwise it results in the area where no waves
are created. Hence, the simulation grid is filled with values
of no displacement within the area of Bt. Thus, the boundary
conditions are set according to the outer contour and waves
are reflected correctly at the boat’s hull. Take note, that the
wave reflection cannot be used while wave creation is en-
abled, since both methods replace the grid values. This con-
straint may be acceptable though, because the wave reflec-
tion of a moving boat may hardly be visible.
4.2.3. Motor Boats: Engines and Wakes
So far, we have only considered boats without engine. Typ-
ically, a powerboat causes a distinct wake, which is more
pronounced than the wake of a sailboat. Since we do not
simulate flow, we reproduce the engine’s wake generation
by creating a wave at the given engine position. As many
water crafts have more than one engine, we use symmetry
and place the i-th engine wave generator at the subsequent
y-position eyaccording to the number of engines mand the
boat’s width w(see Figure 6): ey=(w/2)+i·(w/m)+
(w/2m). The wave generator can generate different shapes.
Still we found that a circular shape results in the most realis-
tic waves. Size and intensity of the wave generator may de-
pend linearly on the boat’s velocity. Our approach for wake
animation is based on the observation that boat wakes have,
beside the chaotic and complex foam movement, a very typ-
ical yet simple shape. The amount of foam depends on the
engine’s speed. It decreases over time, and stays within the
wake. We use a state machine to represent these characteris-
tics. Within the engine’s area new foam fis created f[0,1]
in a foam map. The foam map is updated at each time step.
We use the following fading and smoothing formula, which
is simple a filter function:
fij d·fij +1d
4·(fi+1j+fij+1+fi1j+fij1),
where d[0,1]describes diffusion and fading velocity. Fig-
ure 6depicts the associated propagation of foam. The size of
generated foam may vary depending on the boat’s velocity
as well. The state machine for representing foam can be used
to create fading foam interactively at any position and with
arbitrary shape within a simulation grid (e.g., if an object
drops into water).
Figure 7: Interactive speedboat.
5. Surface Extraction & Rendering
To combine multiple dynamic height fields weapply the pro-
jected grid method [HNC02,Joh04]. Our projected grid im-
plementation is entirely GPU-based. Nevertheless, the sur-
face extraction step is the most time consuming within our
framework (see also Section 6). We determine normal vec-
tors by combining overlapping simulation grids and calcu-
late partial derivations by forward differencing. To reduce
aliasing effects at the horizon resulting from the projected
grid method, we adjust normals naccording to normalized
camera distance in z-direction cd:n→(nx,ny·(1+(cd·
i)),nz)T,wherei0 is the smoothing intensity. Sometimes
it is convenient to additionally smooth the height field or the
associated normals.
After calculating normals, lighting and optical effects
can be applied. In our implementation we use a combina-
tion of standard Phong lighting, standard cube mapping and
reflection-/refraction-mapping techniques [Sou05,Joh04]to
approximate reflections and refractions of objects within the
liquid. Absorption of the liquid is simulated by the use of a
view-dependent method: By subtracting the collision-object
depth map from the depth map of the liquid’s surface (both
seen from camera position), the resulting map is a distance
map of object–surface distances. The distance can be used
with any absorption function fading out the object’s color.
Hence, the liquid exhibits more visual depth and is not unre-
alistically transparent.
6. Results & Discussion
The experiments presented in this paper ran on a quad-core
desktop PC with a 2.4 GHz Intel Q6600 CPU, 4GB RAM,
and nVidia GeForce GTX 280 GPU. Using only a single
CPU core, the measurement times include simulations as
well as surface generation and rendering. Results were gen-
erated at a screen resolution of 1024 ×1024 pixels. All ex-
amples include two wave-equation simulations with a res-
olution of 2048 ×2048 and 1024 ×1024 that were solved
on the GPU with floating-point precision. The foam state
machine has a grid size of 1024 ×1024. The accompanying
video illustrates the visual quality and performance of our
method.
Performance Frame rates for different projected grid step
sizes of our unoptimized prototype are given in Table 1.
c
The Eurographics Association 2009.
H. Cords & O. Staadt / Real-Time Open Water Environments
(a) (b) (c) (d)
Figure 8: Examples: Corsair (a), 3 Boats (b), Buoys (c) and Armada (d).
The distribution of calculation time according to the dif-
ferent steps are shown for projected grid steps 1 ×1inTa-
ble 2. Measured frame rates allow full interactivity (see ac-
companying video), including the wave creation of cruising
boats. Note that most of the time is spent for surface ex-
traction and rendering, not for surface simulation, since it
can be implemented very effective on the GPU. The cost of
the projected grid method increases quadratically with view-
port size. Hence, we have to trade off screen-space resolution
and, thus, aliasing artifacts with performance. Another bot-
tleneck of our method is the memory read back from GPU.
Since rigid-body simulation is executed on the CPU, the lo-
cal area surrounding each object has to be read back to be
included within the rigid-body simulation. Wave generation
could be accelerated by using low-resolution models of the
relevant boat – this is a bottleneck of our specific implemen-
tation, reducing performance for many boats (see example
Armada depicted in Figure 8d).
Quality The presented real-time method aims at large, but
realistic liquid environments including liquid–object inter-
action. To achieve fast simulation times, we concentrate on
the main visual property of liquids in those scenarios, which
we tried to represent realistically: surface waves. Hence, our
method is valid only in environments where liquid flow and
3D liquid effects can be disregarded. The method is view
dependent and additional simulations can be carried out in
important areas (e.g., the surroundings of moving ships) and
1×1 2 ×2 5 ×5
Speedboat (3) 40.3 56.3 69.4
Corsair (3) 35.2 46.7 58.8
3 Boats (43) 32.2 43.0 56.8
Buoys (41) 26.6 34.9 40.9
Armada (40) 22.7 27.6 30.3
Tabl e 1 : Time results in FPS for different projected grid
spacings. The number of used rigid-bodies within each sim-
ulation is indicated within brackets.
different scales of surface simulations can be combined. But
it should be noted that the 2D wave equation is physically
only applicable to shallow water or constant-wavelength
waves. Within deep ocean water wave propagation is more
complex, due to dispersion. However, aiming at interac-
tive environments, we believe this limitation is acceptable.
Our rigid-body object and boat simulation method results
in effective and realistic movements and detailed wave cre-
ation, even for multiple moving boats. Rivers or lakes can be
simulated straight-forwardly by our method. Obviously, our
model is not intended to replace existing high-quality off-
line techniques, but may be well-suited for real-time scenar-
ios, such as computer games and virtual environments.
Comparison with Wave Particles A fundamental differ-
ence between our work and Wave Particles [YHK07] lies
in the simulation method: instead of using wave particles to
approximate the wave equation, we solve the wave equation
using an FDM, which allows us to simulate Huygen’s prin-
ciple. In other words, using wave particles, an object hitting
the water surface would cause a radially propagating wave
front with a flat surface inside. Similarly, diffraction cannot
be represented using particles as well. As demonstrated in
the results, we can simulate the more detailed waves between
wave fronts and diffraction, which cannot be reached with
the wave particles method, principally. We believe that both
effects improve the richness of the animation. Wave parti-
RB LF RTotal
Speedboat 1.8 35.1 63.1 100.0
Corsair 2.0 29.3 68.7 100.0
3 Boats 2.7 23.7 73.6 100.0
Buoys 12.3 23.6 64.1 100.0
Armada 1.3 36.0 62.7 100.0
Tabl e 2 : Distribution of calculation time (in percentages).
Results for projected grid spacing 1×1. Rigid-body simu-
lation (RB), liquid and foam simulation (LF) and surface
extraction and rendering (R).
c
The Eurographics Association 2009.
H. Cords & O. Staadt / Real-Time Open Water Environments
cles are very fast, but computational cost increases with the
number of waves, as more particles are needed to represent
additional wavefronts. The grid size of our FDM approach
does not depend on the number of waves, since the whole
grid is refreshed each time step. Performance of our method
can be improved by decreasing simulation sized (which are
large in our examples) and projected grid size.
7. Conclusion
We presented a scheme for simulating interactive large wa-
ter environments including moving boats. The liquid sim-
ulation environment is designed to be executed on mod-
ern GPUs. We demonstrate that a simplified approach can
achieve fast and realistic wave creation. We introduced an
extension of the wave equation to simulate large, apparently
infinite water environments. Therefore, we introduced inde-
pendently moving simulation grids. The presented method
achieves real-time performance, is highly scalable and al-
lows for full interaction between objects and liquid surfaces.
The presented model of moving boats produces realistic and
detailed waves, as we have demonstrated with several test
cases.
Future work will include the coupling with a 3D Navier-
Stokes-based flow simulation in areas where necessary.
Hence, additional realistic 3D liquid effects could be created
— e.g., splashing and flow caused by a boat’s engine. Ad-
ditionally, we would like to improve performance of rigid-
body simulation by using the GPU. (e.g., [Har07]).
References
[Ama06] AMADA T.: Real-time particle based fluid simulation
with rigid body interaction. In Game Programming Gems 6
(2006), Charles River Media, pp. 189–205.
[BD06] BABOUD L., DECORET X.: Realistic water volumes in
real-time. In EG Workshop on Natural Phenomena (2006).
[Bel03] BELYAEV V.: Real-time simulation of water surface. In
GraphiCon-2003 (2003), pp. 131–138.
[CdVLHM97] CHEN J. X., D.V.LOBO N., HUGHES C. E.,
MOSHELL J. M.: Real-time fluid simulation in a dynamic virtual
environment. IEEE Comput. Graph. Appl. 17, 3 (1997), 52–61.
[CIS07] CRANE K., I.LLAMAS,S.TARIQ: Real-time simulation
and rendering of 3D fluids. In GPU Gems 3 (2007), Addison-
Wesley, pp. 633–673.
[Cor07] CORDS H.: Mode-splitting for highly detailed, interac-
tive liquid simulation. Proc. of GRAPHITE (2007), 265–272.
[Cor08] CORDS H.: Moving with the flow: Wave particles in
flowing liquids. Journals of WSCG (2008).
[DSH06] DOBASHI Y. , S ATO M., HASEGAWA S., YAMAMOTO
T., K ATO M., NISHITA T.: A fluid resistance map method for
real-time haptic interaction with fluids. In VRST’06 (2006).
[Gom00] GOMEZ M.: Interactive simulation of water surfaces.
In Game Programming Gems (2000), Charles River Media,
pp. 187–195.
[Har04] HARRIS M.: Fast fluid dynamics simulation on the GPU.
In GPU Gems (2004), Charles River Media Graphics.
[Har07] HARADA T.: Real-time rigid body simulation on GPUs.
In GPU Gems 3 (2007), Addison-Wesley, pp. 611–632.
[HKK07] HARADA T., K OSHIZUKA S., KAWAGUCHI Y.:
Smoothed particle hydrodynamics on GPUs. In Computer
Graphics International (2007), pp. 63–70.
[HNC02] HINSINGER D., NEYRET F., CANI M.-P.: Interactive
animation of ocean waves. In ACM-SIGGRAPH/EG Symposium
on Computer Animation (SCA) (july 2002).
[JG01] JENSEN L., GOLIAS R.: Deep-water animation and ren-
dering. In Game Developer’s Conference (Gamasutra) (2001).
[JH03] JAMES G., HARRIS M.: Simulation and animation using
hardware accelerated procedural textures. In Game Developers
Conference Tutorial (2003).
[Joh04] JOHANSON C.: Real-time water rendering - introducing
the projected grid concept. In Master of Science Thesis (Lund
University) (2004).
[KM90] KASS M., MILLER G.: Rapid, stable fluid dynamics for
computer graphics. In Proc. of the 17th annual conf. on Com-
puter graphics and interactive techniques (1990), pp. 49–57.
[LC87] LORENSEN W. E ., CLINE H. E.: Marching cubes: A
high resolution 3D surface construction algorithm. In Computer
Graphics (Proceedings of SIGGRAPH 87 (1987), vol. 21, ACM.
[MCG03] MÜLLER M., CHARYPAR D., GROSS M.: Particle-
based fluid simulation for interactive applications. In Proceed-
ings of Symposium on Computer animation (2003).
[MSD07] MÜLLER M., SCHIRM S., DUTHALER S.: Screen
space meshes. In Proceedings of Symposium on Computer an-
imation (2007), Eurographics Association, pp. 9–15.
[OH95] O’BRIEN J. F., HODGINS J. K.: Dynamic simulation of
splashing fluids. In Computer Animation (1995).
[SCP04] SHAH M., COHEN J. M., PATEL S., LEE P. , P IGHIN
F.: Extended galilean invariance for adaptive fluid simulation. In
Proc. of SCA’04 (2004).
[Sou05] SOUSA T.: Generic refraction simulation. In GPU Gems
2(2005), Addison-Wesley, pp. 295–305.
[Sta99] STA M J.: Stable fluids. In Proc. of SIGGRAPH (1999).
[SW01] SCHNEIDER J., WESTERMANN R.: Towards real-time
visual simulation of water surfaces. In VMV ’01: Proceedings of
the Vision Modeling and Visualization Conference 2001 (2001),
Aka GmbH, pp. 211–218.
[Tes04a] TESSENDORF J.: Interactive water surfaces. In Game
Programming Gems 4 (2004), Charles River Media.
[Tes04b] TESSENDORF J.: Simulating ocean water. In Course
Notes Siggraph: The Elements of Nature: Interactive and Realis-
tic Techniques (Course 31) (2004).
[TI06] TATARCHUK N., ISIDORO J.: Artist-directable real-time
rain rendering in city environments. In Eurographics Workshop
on Natural Phenomena (2006), ACM Press.
[TRS06] THUEREY N., RÜDE U., STAMMINGER M.: Anima-
tion of open water phenomena with coupled shallow water and
free surface simulation. Proc. of the 2006 EG/ACM SIGGRAPH
Symposium on Computer Animation (2006), 157–166.
[TSS07] THUEREY N., SADLO F., SCHIRM S., MUELLER M.,
GROSS M.: Real-time simulations of bubbles and foam within
a shallow-water framework. In Proc. Symposium on Computer
Animation (2007).
[YHK07] YUKSEL C., HOUSE D. H., KEYSER J.: Wave parti-
cles. ACM Transactions on Graphics 26, 3 (2007), 99–107.
c
The Eurographics Association 2009.
... [1] or [5]), or to use displacement mapping [42] or animated heightfields [23]. A typical approach describing interactions with such a simulated particle system can be found in [3]. ...
... However, it shows how easily an additional method for water interaction can be added, like for example equation-based approaches as described in e.g. [3], which have become a popular method in games for smartphones in recent years. These two methods complement each other rather well, since equation-based systems are very good in modeling interactions, but can get computational expansive if they have to simulate the normal water flow with a high visual quality. ...
Article
Particle effects are vital components of computer graphics in modern computer games. While game developers have a choice of several different methods for particle effects on PCs and home consoles, there exist only few solutions for games in the fast growing smartphones/tablets market. This is not only because of the more than a magnitude lesser computational performance of the systems-on-a-chip used there, but especially due to their even much slower memory access, which renders nearly all approaches used on standard PCs unsuitable for smartphones/tablets. To overcome the bottleneck of the memory access, I suggest using a procedural approach, which will be described fully in this paper, with the example of real-time water. It is based on particle movement in 2D, but by applying physical forces directly to the particles rather than using a pressure-field like in e.g. the popular Navier-Stokes based methods. This has the advantage of avoiding the need for two different data structures, one for the pressure-field and one for the particles themselves, and thus reduces memory usage significantly. In this paper I will also present a simple way to introduce interactions with the particle effect as well as a comparison with a low-complex Navier-Stokes based approach. To the best of my knowledge, this is the first scientific work investigating particle effects for systems-on-a-chip, like e.g. smartphones/tablets.
... In designing the MIF, we are motivated from the research on water simulation in computer graphics. In the method for simulating waves caused by moving boats [8], the water surface is created by the following physical property: positive waves are created in front of the boat and negative ones at the back because the pressure on a moving boats hull is higher at its bow than at its stern. They defined three regions that create the different waves: bow wave region, body region, and stern wave region [8]. Figure 2 shows the three regions when a boat moves from region S t−1 to region S t , and each region is defined as follows (\ means a set difference.): ...
... In the method for simulating waves caused by moving boats [8], the water surface is created by the following physical property: positive waves are created in front of the boat and negative ones at the back because the pressure on a moving boats hull is higher at its bow than at its stern. They defined three regions that create the different waves: bow wave region, body region, and stern wave region [8]. Figure 2 shows the three regions when a boat moves from region S t−1 to region S t , and each region is defined as follows (\ means a set difference.): ...
Article
Full-text available
This paper proposes a new method for the modeling of interactions among objects and for the detection of abnormal interactions in a video. To model interactions among multiple moving objects, we design a motion interaction field (MIF) that is similar to a water waveform generated by multiple objects moving on the surface of water and that describes the intensity of motion interaction in a video. Using the MIF, we establish a framework to detect abnormal interactions, which consists of rule-based decision about regions of interest and dictionary learning-based anomaly decision for these regions. The regions of interest are determined as the regions remaining after filtering out collision-free regions that are recognized clearly to be normal by a rule-based decision based on the shape of MIF. The MIF values in these regions are then used to construct spatiotemporal features for the detection of abnormal interactions by a dictionary learning algorithm with sparse representation. In the experiments, the effectiveness of the proposed method is validated through quantitative and qualitative evaluations with three datasets containing typical abnormal interactions such as car accidents, crowd riots, and uncontrolled fighting.
... Cords (2008) propuso un modelo de sólidos simulados por conjuntos de partículas que interactúan con una ecuación de superficie de onda bidimensional. En Cords et al. (2009) el modelo fue extendido para permitir la animación de grandes escenarios usando una aproximación de grilla móvil otorgando mayor nivel de detalle en la zona cercana al observador. ...
Article
Full-text available
Palabras claves: Interacción fluido-objeto, Lattice-Boltzmann, tiempo real, motores físicos, shallow waters. Resumen. Se presenta un método para resolver la interacción entre fluido y objetos flotantes para aplicaciones de tiempo real. La simulación del fluido se realiza con el método de Lattice-Boltzmann para aguas superficiales el cual ha demostrado su factibilidad para simulaciones en tiempo real aplicables a animación gráfica. Para los objetos flotantes se utiliza un motor de cálculo que simula la física newtoniana, que toma como entrada un modelo de fuerzas y calcula el comportamiento de cuerpos sólidos en base a las leyes de la mecánica clásica. Las fuerzas sobre los objetos se calculan en base a la presión estática en la zona sumergida, y las fuerzas de lift y de arrastre. Para introducir perturbaciones en el fluido generadas por el movimiento de los objetos, se propuso un modelo que estima las fuerzas generadas por la frontera. Se presentan animaciones del movimiento de embarcaciones, que demostraron una performance adecuada para lograr tasas aceptables de cuadros por segundo.
... In [20] the model was extended to be able to animate large scenarios using a movable grid approach providing greater detail closer to the observer. A simple approximation that, while maintaining the where h is the fluid height, x and y are the spatial fluid transport equations, keeps the computational time coordinates, u and u are the velocity components in x under control by reducing the mathematical problem and y directions respectively, v is the viscosity, g is the to two-dimensions, are the shallow-waters equations gravity and z is the bed elevation. ...
Article
Full-text available
A method to simulate graphic animations of objects floating in a water surface in real time is presented. The fluid is simulated by means of the Lattice Boltzmann method for the shallow-waters equations and the movement of the floating objects is calculated with a Newtonian physical engine suitable for the mechanics of rigid bodies. A two-way interaction between the fluid surface and the object structures is achieved by providing inputs to the Newtonian engine representing buoyancy, drag and lift forces calculated from the solution of the Lattice Boltzmann scheme, which in turn is perturbed by displacement forces acting at the objects boundaries. The method is tested in animation scenes of boats and different adrift objects, showing excellent rendering rates in desktop computers. INTRODUCTION [11] presented a technique to simulate large bodies of
Article
Easy-to-use physics engines have created a whole new source of emergence and fun for digital games. Water simulation could add another similar emergent interaction element in 3D games. Several barriers that prevent this step for games with large playing areas are analysed. One of the most important problems is how to couple the water and physics simulations. Our implementation of the extremely fast virtual pipe method is compared with more sophisticated solvers. Also, two different implementations of physics coupling are compared.
Chapter
The rendering of the large landscape scenes is impossible without simulation of meteorological impacts and atmospheric phenomena. Four types of the meteorological impacts, such as wind, fog, rain, and snow, are discussed in this chapter. Additionally, the water surfaces and cloud simulation are considered. Great variety of methods can be classified as the physical-based, computer-based, and hybrid approaches. In this chapter, it is shown that many natural impacts are successfully described by the Navier-Stokes equations. The main goal of the computer-based methods is to provide the real-time implementation to the prejudice of the realistic rendering and modelling accuracy. Nowadays, the hybrid methods become popular in virtual reality and computer games, likewise in forest monitoring and inventory.
Article
Current simulation methods for large-scale complex water scenes suffer from various problems such as low efficiency, and complicated collision detection. To remedy these problems, this paper presents a novel method for ocean-scale complex simulation based on spherical mapping projected grid. First, a novel spherical projected grid method is proposed for animating large scale water waves. Compared with conventional projected grid method, the new method does not need reconstructing projectors intersecting with the sphere, and thereby can achieve higher rendering efficiency which is also suitable for graphics hardware acceleration. Then, a new method is designed for simulating interactions including water-rigid body interaction and rigid body-terrain interaction. Additionally, a general bubble and coast line rendering framework is provided. Experiments demonstrate that the proposed method can realize realistic rendering results with high rendering rates (FPS>60), and can be applied in real time scenarios such as computer games and virtual reality.
Article
Realistic modeling and simulation of water is one of most popular research topics in development of digital valley and scientific visualization of hydraulic engineering. The modeling technologies of some water bodies were surveyed, such as ocean waves, rivers, flood, fountains, waterfalls, and water waves, etc., which are widely used in virtual simulation of digital valley and development of waterscape domains. For every kind of modeling method, its principle, advantages and disadvantages and application scopes were analyzed ad compared. Some typical application examples were also presented. The hydrodynamics-based modeling method was introduced importantly. Finally future research issues on modeling technologies of water body were introduced, including real-time simulation technologies, photorealistic rendering technologies, and interaction technologies between water and solid.
Article
We present a new GPU scheme for real-time simulation in large-scale water environments with physics-based object interaction. To improve the simulation efficiency, we divide surface waves into ambient waves and interactive waves. A fast and stable Verlet integration method is applied to solve the wave equation to simulate the propagation of interactive waves. To solve the problem that the interactive area caused by the moving object is uncertain, we propose a moving grid suited to LOD (Levels of Detail) surface with multiple resolutions, which reduces the computation cost. The extension of multiple moving grids makes the interaction of water and various objects possible. We propose a volume conservation based method to generate interactive waves and apply rigid body dynamics to demonstrate the effect of water reaction against the object. Experimental results show that our approach achieves higher visual realism and performance.
Article
Full-text available
Conference Paper
Full-text available
Realistically animated fluids can add substantial realism to interactive applications such as virtual surgery simulators or computer games. In this paper we propose an interactive method based on Smoothed Particle Hydrodynamics (SPH) to simulate fluids with free surfaces. The method is an extension of the SPH-based technique by Desbrun to animate highly deformable bodies. We gear the method towards fluid simulation by deriving the force density fields directly from the Navier-Stokes equation and by adding a term to model surface tension effects. In contrast to Eulerian grid-based approaches, the particle-based approach makes mass conservation equations and convection terms dispensable which reduces the complexity of the simulation. In addition, the particles can directly be used to render the surface of the fluid. We propose methods to track and visualize the free surface using point splatting and marching cubes-based surface reconstruction. Our animation method is fast enough to be used in interactive systems and to allow for user interaction with models consisting of up to 5000 particles.
Conference Paper
We present a new method for the real-time simulation of fluid surface waves and their interactions with floating objects. The method is based on the new concept of wave particles, which offers a simple, fast, and unconditionally stable approach to wave simulation. We show how graphics hardware can be used to convert wave particles to a height field surface, which is warped horizontally to account for local wave-induced flow. The method is appropriate for most fluid simulation situations that do not involve significant global flow. It is demonstrated to work well in constrained areas, including wave reflections off of boundaries, and in unconstrained areas, such as an ocean surface. Interactions with floating objects are easily integrated by including wave forces on the objects and wave generation due to object motion. Theoretical foundations and implementation details are provided, and experiments demonstrate that we achieve plausible realism. Timing studies show that the method is scalable to allow simulation of wave interaction with several hundreds of objects at real-time rates.
Article
In this paper, we present a Smoothed Parti- cle Hydrodynamics (SPH) implementation algorithm on GPUs. To compute a force on a particle, neighboring par- ticles have to be searched. However, implementation of a neighboring particle search on GPUs is not straightfor- ward. We developed a method that can search for neigh- boring particles on GPUs, which enabled us to imple- ment the SPH simulation entirely on GPUs. Since all of the computation is done on GPUs and no CPU process- ing is needed, the proposed algorithm can exploit the massive computational power of GPUs. Consequently, the simulation speed is many times increased with the proposed method.
Article
In an unbounded physical domain, simulating a turbulent fluid on an Eulerian grid is rather tricky. Since it is difficult to predict the motion of the fluid, it is also difficult to guess which computational domain would allow the simulation of the fluid without crossing the computational boundaries. To address this dilemma, we have developed a novel adaptive framework where the simulation grid follows the motion of the flow. Our technique is based on the principle of Galilean Invariance and the culling of simulation cells using a metric derived from continuative boundary conditions. We describe our framework and showcase its advantages over traditional techniques. Timing results and visual comparisons are presented.
Article
This chapter describes a method for fast, stable fluid simulation that runs entirely on the GPU. It introduces fluid dynamics and the associated mathematics, and it describes in detail the techniques to perform the simulation on the GPU. After reading this chapter, you should have a basic understanding of fluid dynamics and know how to simulate fluids using the GPU. The source code accompanying this book demonstrates the techniques described in this chapter.
Article
This paper presents a real-time water simulation framework with respect to wave propagation in flowing liquids. The presented method is based on the coupling of liquid flow simulation and simulation of surface waves. Physically, our system combines the solution of the Navier-Stokes Equations with the solution of the 2D Wave Equation. Numerically, we combine the concept of wave particles with a FDM-based flow simulation. Thus, wave propagation in fast flowing liquids (e.g., a creek) can be simulated – in real-time. Therefore, it is very suitable for today's video games and VR-environments. Finally, we discuss the coupling of the liquid simulation with a rigid-body simulation and a fountain simulation.