+ All Categories
Home > Documents > Real-time Interactive Water Waves · rs at 3 ms per time step on a single core of a Intel™...

Real-time Interactive Water Waves · rs at 3 ms per time step on a single core of a Intel™...

Date post: 07-Aug-2020
Category:
Upload: others
View: 0 times
Download: 0 times
Share this document with a friend
47
Real-time Interactive Water Waves Water Wave Simulation for Computer Games BJÖRN OTTOSSON Master’s Thesis at CSC Supervisor: Lars Kjelldahl Examiner: Lars Kjelldahl
Transcript
Page 1: Real-time Interactive Water Waves · rs at 3 ms per time step on a single core of a Intel™ Xeon™ prossor with high quality results. Referat Interaktiva vattenvågor i realtid

Real-time Interactive Water Waves

Water Wave Simulation for Computer Games

BJÖRN OTTOSSON

Master’s Thesis at CSC

Supervisor: Lars Kjelldahl

Examiner: Lars Kjelldahl

Page 2: Real-time Interactive Water Waves · rs at 3 ms per time step on a single core of a Intel™ Xeon™ prossor with high quality results. Referat Interaktiva vattenvågor i realtid
Page 3: Real-time Interactive Water Waves · rs at 3 ms per time step on a single core of a Intel™ Xeon™ prossor with high quality results. Referat Interaktiva vattenvågor i realtid

Abstract

In this master thesis report a new method for simulating waters surfacewaves is presented. The method is well adapted for real-time applica-tions and has been developed with computer games in mind. By sim-ulating the water surface at several different resolutions simultaneouslyusing a construction similar to Laplacian Pyramids dispersion is handledapproximately resulting in a complex behaviour. The simulation is alsoextended with a dynamic level of detail method and phenomenologicalmodels for boundaries and high frequency waves. This method is pro-totyped inside the Frostbite™ engine developed at EA™ DICE™ andruns at 3 ms per time step on a single core of a Intel™ Xeon™ processorwith high quality results.

Page 4: Real-time Interactive Water Waves · rs at 3 ms per time step on a single core of a Intel™ Xeon™ prossor with high quality results. Referat Interaktiva vattenvågor i realtid

Referat

Interaktiva vattenvågor i realtid

Denna rapport presenterar resultaten för ett examensarbete om simu-lering av vattenvågor. En ny metod för att simulera vattenvågor pre-senteras. Denna metod är anpassad för realtids-tillämpningar och harutvecklats med datorspel i åtanke. Genom att simulera en vattenyta medflera upplösningar samtidigt i en pyramidstruktur hanteras dispersionapproximativt. Simuleringen varierar dynamiskt upplösning beroendepå avstånd till observatören och för att öka detaljnivån finns ett feno-menologiskt detaljsystem. En prototyp har utvecklats inuti spelmotornFrostbite™som utvecklats av EA™ DICE™. Prototypen simulerar ettsteg på 3 ms men en kärna hos en Intel™ Xeno™-processor med braresultat.

Page 5: Real-time Interactive Water Waves · rs at 3 ms per time step on a single core of a Intel™ Xeon™ prossor with high quality results. Referat Interaktiva vattenvågor i realtid

Contents

1 Introduction 1

2 Background 3

2.1 The Height Field Model . . . . . . . . . . . . . . . . . . . . . . . . . 32.1.1 Linear Wave Theory . . . . . . . . . . . . . . . . . . . . . . . 42.1.2 The Shallow Water Equations . . . . . . . . . . . . . . . . . . 42.1.3 Turbulence . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

2.2 Related Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52.2.1 Height Field Methods . . . . . . . . . . . . . . . . . . . . . . 52.2.2 Control and Detail . . . . . . . . . . . . . . . . . . . . . . . . 62.2.3 Interaction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

3 Overview 9

3.1 Variable Wave Speed . . . . . . . . . . . . . . . . . . . . . . . . . . . 93.2 Level of Detail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103.3 Interaction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

4 Theory and Techniques 13

4.1 Dispersion as Convolution . . . . . . . . . . . . . . . . . . . . . . . . 134.2 Laplacian Pyramids . . . . . . . . . . . . . . . . . . . . . . . . . . . 144.3 Approximating L . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144.4 Interaction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164.5 Bandpass Filtered Ellipses . . . . . . . . . . . . . . . . . . . . . . . . 174.6 Level of Detail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184.7 Phenomenological Generation of Details . . . . . . . . . . . . . . . . 194.8 Phenomenological Boundary Conditions . . . . . . . . . . . . . . . . 21

5 Implementation 23

5.1 Update method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235.2 Parallelism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

5.2.1 Vectorization . . . . . . . . . . . . . . . . . . . . . . . . . . . 245.2.2 Processor parallelism . . . . . . . . . . . . . . . . . . . . . . . 24

5.3 Algorithm Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . 255.4 Client and Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

Page 6: Real-time Interactive Water Waves · rs at 3 ms per time step on a single core of a Intel™ Xeon™ prossor with high quality results. Referat Interaktiva vattenvågor i realtid

5.5 Rendering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255.6 Physics Interaction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

6 Results 27

6.1 Octave Implementation . . . . . . . . . . . . . . . . . . . . . . . . . 276.2 Frostbite Implementation . . . . . . . . . . . . . . . . . . . . . . . . 31

7 Discussion 33

7.1 Design Choices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337.1.1 Linear Wave Theory . . . . . . . . . . . . . . . . . . . . . . . 337.1.2 Wave decomposition . . . . . . . . . . . . . . . . . . . . . . . 337.1.3 Approximation of L . . . . . . . . . . . . . . . . . . . . . . . 337.1.4 Level of Detail . . . . . . . . . . . . . . . . . . . . . . . . . . 347.1.5 Interaction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347.1.6 Phenomenological boundaries and details . . . . . . . . . . . 34

7.2 Future Research . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347.2.1 Different approximations of L . . . . . . . . . . . . . . . . . . 347.2.2 Hybrid Methods . . . . . . . . . . . . . . . . . . . . . . . . . 347.2.3 Level of Detail . . . . . . . . . . . . . . . . . . . . . . . . . . 347.2.4 Rendering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357.2.5 Interaction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357.2.6 Boundary Conditions . . . . . . . . . . . . . . . . . . . . . . 357.2.7 Performance Comparisons . . . . . . . . . . . . . . . . . . . . 357.2.8 Other uses . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

Bibliography 37

Page 7: Real-time Interactive Water Waves · rs at 3 ms per time step on a single core of a Intel™ Xeon™ prossor with high quality results. Referat Interaktiva vattenvågor i realtid

List of Figures

3.1 Level of Detail. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103.2 Example of Object Interaction. . . . . . . . . . . . . . . . . . . . . . . . 11

4.1 Laplacian Pyramid Algorithm. . . . . . . . . . . . . . . . . . . . . . . . 154.2 Example Decomposition. . . . . . . . . . . . . . . . . . . . . . . . . . . . 154.3 Approximation of L. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164.4 Bandpass Filtered Edges. . . . . . . . . . . . . . . . . . . . . . . . . . . 194.5 Propagation of Detail Waves. . . . . . . . . . . . . . . . . . . . . . . . . 20

5.1 Vectorization. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245.3 Algorithm Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255.2 Border sizes for Different Grid Resolutions. . . . . . . . . . . . . . . . . 26

6.1 Sum of eight bandpass filtered functions. . . . . . . . . . . . . . . . . . . 276.2 Bandpass Decomposition. . . . . . . . . . . . . . . . . . . . . . . . . . . 286.3 Measured wave speed. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296.4 Height-field Results Comparison. . . . . . . . . . . . . . . . . . . . . . . 296.5 Grids in the Pyramid. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

Page 8: Real-time Interactive Water Waves · rs at 3 ms per time step on a single core of a Intel™ Xeon™ prossor with high quality results. Referat Interaktiva vattenvågor i realtid

List of Tables

4.1 Approximation of L: Values for B and A1 . . . . . . . . . . . . . . . . . 16

6.1 Time Measurements for 8 Connected Pyramids. . . . . . . . . . . . . . . 316.2 Time Measurements for Various Pyramid Configurations. . . . . . . . . 31

Page 9: Real-time Interactive Water Waves · rs at 3 ms per time step on a single core of a Intel™ Xeon™ prossor with high quality results. Referat Interaktiva vattenvågor i realtid

Chapter 1

Introduction

Simulating water realistically is of greatinterest in computer graphics since it issuch an important part of our world. It isalso a very complex problem. Today re-alistic computer generated water is seenin many movies. This not the case forcomputer games. The simulations usedin movies are not computed in real-timeand a single frame may take several min-utes or hours to compute (24 frames areneeded per second) and may use a clusterof computers. In video games this is notpossible, instead the simulation has to becomputed in real-time on a single com-puter or video game console. Because ofthis only a 1/24th of a second is avail-able per frame to achieve 24 frames persecond. Also only a fraction of a the com-puter’s or the console’s processing poweris available since to rest of the game hasto be run at the same time. This is a dif-ference of several orders of magnitude.Because of this water is rarely simulatedin games today and when it is in a verysimple fashion.

In this thesis we will focus on surfacewaves on water that as a whole is in rest.Examples of this are ponds, lakes andpools. The goal is to investigate how ac-curately this can be done in a real time

context and find a method that is us-able in games on this generation of con-soles. The method should be easy to con-trol from a user perspective: an artistshould be able to tweak as much as pos-sible for artistic use in a computer game.It should also be predictable in perfor-mance. In games consistent performanceis more important than simulation ac-curacy: keeping the frame-rate is moreimportant than keeping the simulationphysical. Another important area of fo-cus is level of detail. In order to effi-ciently use the computing power resolu-tion should be adapted to the distance tothe observer. Waves far away need lessresolution than waves close since theywill occupy less screen space. Paralleliza-tion is also important to utilize the paral-lel nature of modern computer processorsand video game consoles.

An important area of research is in-vestigating what simplification are use-ful and provide realistic results. In thisthesis we limit our investigation to lin-ear wave theory since it accounts forimportant properties of water such aswave speed dependency on wavelengthand water height. It is also an inter-esting starting point since several com-

1

Page 10: Real-time Interactive Water Waves · rs at 3 ms per time step on a single core of a Intel™ Xeon™ prossor with high quality results. Referat Interaktiva vattenvågor i realtid

CHAPTER 1. INTRODUCTION

mon approximation may be derived fromit. Another advantage linear wave theoryprovides is an intuitive understanding ofwave behavior that is hard to obtain withother approaches.

Using linear wave theory we presenta method for simulating water surfacewaves that approximates the height andwavelength dependency of water waves.In this way it captures the complexity ofwater waves in nature. Our method iswell suited for level of detail techniquesand is highly parallizable.

2

Page 11: Real-time Interactive Water Waves · rs at 3 ms per time step on a single core of a Intel™ Xeon™ prossor with high quality results. Referat Interaktiva vattenvågor i realtid

Chapter 2

Background

One of the hardest problems in com-puter graphics is fluid-simulation. Largescale (millions of particles) offline fluidsimulations have not been possible un-til recently with software such as Re-alFlow [rea]. Large scale real-time simu-lations are still not feasible. To simulatefluid dynamics Navier-Stokes equationshave to be solved. Usually simulation isrestricted to incompressible Newtonianfluids. This yields the incompressibleNavier-Stokes equations (2.1) and thevolume conservation equation(2.2):

ρ

(

∂v

∂t+ v · ∇v

)

= −∇p + µ∇2v + f

(2.1)

∇ · v = 0 (2.2)

Where v is the flow velocity, ρ is thefluid density, p is the pressure, µ isthe dynamic viscosity and f representsbody forces such as gravity. These equa-tions are usually solved with smoothed-particle hydrodynamics (SPH) for fluidsand 3D grid-based methods for gases.For real time solvers only modest particlenumbers (e.g.. 65 000 [Gre08]) and gridsizes (e.g.. 128x128x32 grid [KID10]) canbe solved. These results are from simula-

tions utilizing the full processing powerof a high-end PC. In real-time applica-tions such as games only a fraction of thecomputing power is available: simulationsize has to be even less. In order to simu-late more detailed fluids in real-time vastsimplifications have to be made.

2.1 The Height Field

Model

One way of simplifying the simulation isto only consider the surface of the fluidand to model it as a height field. Thismeans that the surface height (h) is mod-eled as a function of horizontal spatialcoordinates (x, y). This effectively re-duces the problem size by a dimension.A height field correctly represents waveson for example an ocean surface, a pond,a river etc as long as the waves are fairlysmall. Splashes and breaking waves cannot be represented however since they vi-olate the height field assumption. Never-theless this is a useful representation andheight field approach will be the focus ofthis paper.

There has been a lot of research onthis description of water surfaces. Wewill focus on the results of linear wave

3

Page 12: Real-time Interactive Water Waves · rs at 3 ms per time step on a single core of a Intel™ Xeon™ prossor with high quality results. Referat Interaktiva vattenvågor i realtid

CHAPTER 2. BACKGROUND

theory and the shallow water equation.Studying other higher order models suchas the Boussinesq model for water wavesare possible future areas of research.

2.1.1 Linear Wave Theory

Linear wave theory describe waves assmall perturbation of the water surfaceand ignores effects of water current (ad-vection). Also viscosity is assumed to bezero. Because of this linear wave theorydoes not correctly handle rivers, steepwaves etc. There are also several otherassumption that are out of the scope forthis brief introduction. These assump-tion results in the following expressionfor the water speed, c:

c =

g

|k| tanh (kH) (2.3)

Where g is the acceleration by grav-ity, k the angular wavenumber and H thewater depth. For shallow and deep waterrespectively, c is reduced to:

c =√

gh, λ ≫ H (2.4)

c =

g

|k| , λ ≪ H (2.5)

Equation (2.5) is known as the disper-sion relation for ocean waves and is re-sponsible for the characteristic look ofship wakes (Kelvin wakes) and is there-fore critical to simulation of realisticocean waves.

2.1.2 The Shallow Water

Equations

The shallow water equations are the re-sults of a different set of approximations.Just as in linear wave theory viscosity is

assumed to be zero. The most importantassumptions are that the water heightis assumed to be significantly less thanthe wavelength of water waves and thatthe flow is assumed to be constant ver-tically. Because of this the shallow wa-ter equations only simulate large waterwaves correctly - small waves will have asmall wavelength compared to the waterheight and therefore contradict the wave-length assumption. Contrary to linearwave theory current is simulated; riversetc can be simulated. Also the sharpen-ing of waves as they reach shallower wa-ter is handled. The resulting equationsare:

dv

dt+ g∇h + (v · ∇)v = 0 (2.6)

dh

dt+ (h + b)∇ · v = 0 (2.7)

Where v is the horizontal flow, g isthe acceleration by gravity and h the wa-ter height from a reference level h0 andb the water depth from h0. Worth not-ing is that if we remove the advectionterm,(v · ∇)v, from (2.6) assume thath ≪ b the shallow water equations re-duce to the linear wave theory model forshallow water, that is the wave speed isgiven by (2.4).

2.1.3 Turbulence

Neither linear wave theory nor shallowwater equations model turbulence. How-ever turbulence plays an important rolein realistic simulation of water surfaces.Many situations common in games re-sult in a great deal of turbulence. Aperson running through water is such asituation. Turbulence is created whenthere is a large difference in flow velocity

4

Page 13: Real-time Interactive Water Waves · rs at 3 ms per time step on a single core of a Intel™ Xeon™ prossor with high quality results. Referat Interaktiva vattenvågor i realtid

2.2. RELATED WORK

within a short distance. Understandingof turbulence is limited and it is thereforehard to do accurate simulations withoutsolving the full Navier-Stokes equations.There are however several phenomeno-logical models. See [FS06, MK99]. Oneof the simplest methods is to model tur-bulence by diffusion. In turbulent ar-eas the flow field will be close to ran-dom which results in diffusion, much likeBrownian motion. Physical models forturbulence are beyond the scope of thispaper. In section 2.2 a brief overview ofturbulence models for computer graphicsis given.

2.2 Related Work

This literature review is limited to workrelevant to real-time water surface simu-lations with rigid body interaction. Fora complete overview of fluid simula-tion in computer graphics see [Sch07,Igl04, BMF07]. Section 2.2.1 containsan overview of 2d height field techniques,section 2.2.2 an overview of research oncontrolling simulations and phenomeno-logical methods for adding details to sim-ulations such as turbulence, foam andparticles and section 2.2.3 an overviewof different methods for interaction.

2.2.1 Height Field Methods

An early approach for simulating wa-ter surfaces uses a Fourier approach andpropagates waves in the frequency do-main. Waves are stored as amplitude andphaseangle for each wavenumber. Propa-gation is done by updating the phasean-gle according to the dispersion relationfor ocean waves. While accurate mod-eling the dispersion relation it is difficultto combine this method with interaction.

Because of this it is often used for ambi-ent waves. For an overview see [Tes04b].Recently this algorithm has been imple-mented on GPU [Fin04].

One other approach for simulating wa-ter height fields is to use grids and fi-nite differences to solve simplified 2Dshallow water equations where the flowis assumed to be zero. This approachwas used by [KM90]. [CL95] use a sim-ilar method and solve compressible 2D-Navier Stokes equation and extend thefinite difference approach to handle ob-ject interaction by introducing variableboundary conditions. The height of thewater is generated using the pressure.

Recent work has focused on solv-ing the full shallow water equations in-cluding current using a Semi-Lagrangianapproach[LvdP02, HHL+05]. [Kal08]simulate shallow water equations with anadaptive grid to do fluid simulations witha scale of several hundred meters for usein open world games. Semi-Lagrangianapproaches suffer from dissipation dueto the discretization. Research has beendone to reduce this [KLLR05].

Another recent development is the in-corporation of dispersion in interactivesimulations. [Tes04a] and [Lov02, Lov03]do this by convolution.[Day09] use amulti-resolution frequency domain ap-proach. Their simulation is done usingan adaptive grid. The waves are prop-agated in the Fourier domain using thedeep water dispersion relation. The res-olution is changed in run-time to so thatthe simulation has high resolution nearthe player and low resolution far away.

Particle systems have also been usedfor water simulation. Recently 2D par-ticle systems have been used to simulatewater surfaces. [LH10] use SPH in 2D toanimate a height field. [YHK07] intro-

5

Page 14: Real-time Interactive Water Waves · rs at 3 ms per time step on a single core of a Intel™ Xeon™ prossor with high quality results. Referat Interaktiva vattenvågor i realtid

CHAPTER 2. BACKGROUND

duce the wave particles, particles repre-senting a small disturbance of the watersurface, and use them to solve a simplewave equation. The particles are splat-ted to a height field for rendering. Abig advantage of this approach is thatthe simulation is concentrated to the ar-eas with perturbations and barely anycomputation is needed in areas withoutwaves. However, with lots disturbancesmore and more wave particles have tobe created which results in bad worstcase performance. Wave particles are inthis wave very similar to ordinary parti-cle systems.

[Cor08] extend the wave particle ap-proach to handle flow by coupling it witha low resolution flow simulation. [Cor07]couple a low resolution SPH simulationwith a surface wave simulation.

2.2.2 Control and Detail

Increasing particle numbers and gridresolution result in major performancedegradation. Therefore a lot of workhas been made regarding up-samplingand adding details to lower resolutionsimulations. Up-sampling a fluid with-out turbulence is fairly easy to do. Tomake a low resolution simulation moredetailed high frequency turbulence hasto be added. This can be done eitherby adding noise [BHN07, KTJG08] orby simulating the generation of turbu-lence at a higher resolution [PTSG09].Height field simulation lack foam andsplashes. Work has been done on how toadd this to existing simulations. [JG01]add foam from particles and steep wavesand render it by blending in a foam tex-ture. They also generate particles fromthe height field simulation to simulatesplashes. [Vla10] use flow to animate a

texture with good result.Fluid simulations are generally hard

to control and predict due to many pa-rameters (such as grid subdivision, staticgeometry, interacting objects etc) withoften large unexpected consequences.Therefore work has been made at con-trolling fluid animations while keepingthe overall appearance dynamic. ForSPH simulations the notion of guide par-ticles has been introduced [TKPR06].With this approach individual parti-cles are allowed to move freely but thelocal mean of particle motion is re-stricted. [NCZ+09, Nie10] propose amethod for guiding grid-based fluid sim-ulations. Neither of these approaches aredirectly applicable to height field simula-tions.

2.2.3 Interaction

There are mainly two different ways ofinteracting with a height field. Eitherthe height field and flow are modifieddirectly or the boundary conditions aremodified. The first approach is used in[CL95, Tes04a] to simulate the motionof rigid objects. In the approach usedby [Tes04a] the height of the water is in-creased in front of a moving object anddecreased behind it. When an object issubmerged the height is increased aboveit corresponding to the volume of theobject and when an object emerges theheight is decreased. This approach canalso be used to add and remove water.The other approach is to use handle in-teraction by applying pressure. When anobject is floating in the water pressure isapplied to the height field resulting in alower height below the object.

[Tes04a] also use what they refer to asan obstruction mask. This mask con-

6

Page 15: Real-time Interactive Water Waves · rs at 3 ms per time step on a single core of a Intel™ Xeon™ prossor with high quality results. Referat Interaktiva vattenvågor i realtid

2.2. RELATED WORK

tains which parts of the water surfacethat is obstructed. This is used to createrigid boundaries against the obstructedareas. This is not physically correct butresults in plausible reflections against dy-namic objects.

7

Page 16: Real-time Interactive Water Waves · rs at 3 ms per time step on a single core of a Intel™ Xeon™ prossor with high quality results. Referat Interaktiva vattenvågor i realtid
Page 17: Real-time Interactive Water Waves · rs at 3 ms per time step on a single core of a Intel™ Xeon™ prossor with high quality results. Referat Interaktiva vattenvågor i realtid

Chapter 3

Overview

The aim of this chapter is to give a simpleoverview of the complete system. Thepurpose of this is to give the reader an in-tuitive understanding before diving intotheoretical details. Therefore this chap-ter will be less formal than the rest of thereport and will not contain many refer-ences. More theoretical details and mo-tivation of design choices can be foundin the following chapters: chapter 4 ochchapter 5.

3.1 Variable Wave Speed

As we saw in chapter 2 an importantproperty of water is that the wave speedis dependent on wave length. This isknown as the dispersion relation of waterwaves. The result of this property is thecharacteristic look of water surface wavesand the reason behind phenomenon suchas Kelvin wakes. Linear wave theoryprovides a highly simplified descriptionof surface waves. While being heavilysimplified it still manages to capture thedispersion property. In the linear wavetheory model wave speed increases untilwave length and water height is roughlythe same and then remains constant.

The water surface can be represented

by a grid. Given this representation itis easy to simulate waves with constantspeed. This can be done by Euler step-ping the wave equation:

∂2h

∂t2= c2∇2h (3.1)

It can be showed that the variable wavespeed of linear wave theory can be simu-lated by replacing c2∇2 with a convolu-tion, L:

∂2h

∂t2= L ∗ h (3.2)

This is similar to the method of[Tes04a]. While correctly accounting forthe dispersion relation this method is notoptimal for use in a real time context.The size of the convolution operator L isdependent on the largest possible wavelength. To represent a 1 m wave witha grid resolution of 5 cm the convolu-tion operator needs roughly 20 grid cellswide to handle variable wave speed atthat wave length. The convolution is notseparable either so 400 cells have to besummed to calculate the contribution toone pixel. [Day09] alleviate this by carry-ing out the convolution in the Fourier do-main at the cost of doing a forward and

9

Page 18: Real-time Interactive Water Waves · rs at 3 ms per time step on a single core of a Intel™ Xeon™ prossor with high quality results. Referat Interaktiva vattenvågor i realtid

CHAPTER 3. OVERVIEW

inverse Fourier transform in each step.We present a different solution.

Our method is the following: h is splitinto different parts (h1, h2, h3, . . . , hk)representing different ranges of wavelengths. We will refer to these as subgrids. h1 contains wave lengths down tosome wave length λ, h2 wave lengths be-tween λ and λ

2 , h3wave lengths betweenλ2 and λ

4 , and so on. With this repre-sentation the shortest wavelengths of hi

are twice those of hi+1 (i∈ Z, i > 0). Be-cause of this hi can be simulated at halfthe resolution of hi+1. The total heighth can be retrieved by interpolating andsumming hi for all possible i.

The big advantage of this approach isthat all the wave lengths contained in agrid are fairly small compared with thegrid cell width. Because of this the con-volution operator L can be approximatedwith a small convolution kernel. Withina sub grid the wave speed will not varyas much as within the whole range offrequencies and simple approximation ofL can be used. By splitting the gridinto several sub grids the total numberof grid cells being simulated increase butthe computation per cell is drastically re-duced.

All the sub grid together will be re-ferred to as a pyramid.

3.2 Level of Detail

To make the simulation fast without sac-rificing detail it is important to controlthe resolution of the grid so that ar-eas of high importance get higher res-olution than unimportant areas. Whenviewed through a perspective projectionthe water close to the observer will re-quire higher resolution since it occupies

41236

Figure 3.1. Level of Detail. Example dis-tribution of different resolution pyramids.

more of projected space. As the observermoves different areas will need higherresolution.

Our system solves this by having poolof pyramids of different resolutions allwith the same width ( 6 m for exam-ple). These are dynamically distributedto simulate water close to the observerwidth a high resolution and water fur-ther away with a higher resolution. Seefigure 3.1 for an example distribution.

3.3 Interaction

Interaction is handled by displacing theheight field. When an object is pulledout of water the water height is de-creased and when pushed down heightis increased. See figure 3.2. Using ourwavelength decomposition into sub gridsmakes this more complex. Only waveswith correct wavelength should be addedto a sub grid. This can be achieved bybandpass filtering the displacement witha filter corresponding to the wavelengths

10

Page 19: Real-time Interactive Water Waves · rs at 3 ms per time step on a single core of a Intel™ Xeon™ prossor with high quality results. Referat Interaktiva vattenvågor i realtid

3.3. INTERACTION

A

B

C

Figure 3.2. Example of Object Interaction.A, B and C show an object moving in differ-ent directions (arrow) and the correspondingchange in height-field (gray).

represented in the sub grid.To simplify the interaction the inter-

section between an object and the watersurface is approximated by an ellipse. In-stead filtering the ellipse numerically anapproximate analytical filter is used.

11

Page 20: Real-time Interactive Water Waves · rs at 3 ms per time step on a single core of a Intel™ Xeon™ prossor with high quality results. Referat Interaktiva vattenvågor i realtid
Page 21: Real-time Interactive Water Waves · rs at 3 ms per time step on a single core of a Intel™ Xeon™ prossor with high quality results. Referat Interaktiva vattenvågor i realtid

Chapter 4

Theory and Techniques

In this chapter we describe the tech-niques used to solve Linear Wave The-ory approximately in real time. We de-scribe various approximations made andtheir implications. We describe how in-teraction and boundary conditions canbe handled. Also a system for addingdetails to a lower resolution simulationis described.

4.1 Dispersion as

Convolution

In this section we will provide a theoreti-cal derivation of the results of section 3.1.While being similar to the derivation in[Tes04a] our derivation is based on Lin-ear Wave Theory rather than Bernoulli’sprinciple and also uses different set ofvariables: we use the time derivative ofh, [Tes04a] use a velocity potential for h.

Simple waves with constant speed canbe modeled by the wave equation:

∂2h

∂t2= c2∇2h (4.1)

This ordinary differential equation caneasily solved by discretization and Eu-ler stepping in time. However, this re-quires c to be constant with respect to

wavenumber since all wavelengths arehandled in the same way. As we recallfrom section 2.1.1 wave speed relates towater height from bottom, H, and angu-lar wavenumber, k, in the following way:

c2 =g

|k| tanh|k|H

(4.2)

This expression can not be directlyused for integrating (4.1) because of itsdependence on k. However, by trans-forming (4.1) into the Fourier domain(4.2) can be directly used.

F(

∂2h

∂t2

)

= c2(ik)2F(h) (4.3)

Where F is the Fourier transform. In-sertion of (4.2) gives:

F(

∂2h

∂t2

)

= − g

|k| tanh|k|H

|k| 2F (h)

(4.4)Applying the inverse Fourier trans-

form gives the following result, whereF−1 is the inverse Fourier transform and∗ the convolution operator:

∂2h

∂t2= L ∗ h (4.5)

13

Page 22: Real-time Interactive Water Waves · rs at 3 ms per time step on a single core of a Intel™ Xeon™ prossor with high quality results. Referat Interaktiva vattenvågor i realtid

CHAPTER 4. THEORY AND TECHNIQUES

where L is defined as:

L = F−1(

−g |k| tanh|k|H

)

(4.6)

This equation can now be solved bycomputing L and solving (4.5) numeri-cally. While feasible, [Tes04a] does this,solving (4.5) directly requires a lot ofcomputation because of the convolution.If waves of unlimited size are allowedL has to be computed accurately inthe whole frequency range resulting in alarge kernel. If the range of wavenum-bers is limited L can be approximated tobe correct within that range and to havea small kernel size. Ideally wavelengthsshould also be fairly small compared withthe grid size to avoid computation on ahigher frequency than needed.

4.2 Laplacian Pyramids

Laplacian Pyramids, first introduced in[BA83], have been successfully used tosolve various problems within computergraphics. Laplacian pyramids decompo-sition is a way of representing an image,much similar to wavelets. The basic ideais very simple. To represent an image I

using a Laplacian pyramid an iterativealgorithm is used. An overview of thealgorithm is given in figure 4.1 and anexample decomposition in figure 4.2.

In essence this means that each imagein the Laplacian pyramid only containsa limited amount of frequencies. Alsothe wavelengths stored in each image aresmall compared with the pixels size andthe original image is retrieved by sum-ming all images in the pyramid. We canthus conclude that the Laplacian pyra-mid is a great match for the requirementsposed in the end of section 4.1.

Usually, a Laplacian is constructedonly once, some calculation are per-formed on it and then it is convertedback into an ordinary image. One wayof implementing wave propagation us-ing Laplacian pyramids. Each frame thepyramid is constructed, the waves arepropagated and the resulting pyramidis then summed. The results are thendrawn and displacements of the watersurface are generated. The reason the de-composition algorithm has to be run eachframe is to allow for interaction throughheight displacements. This is a potentialbottle neck of the algorithm. The de-composition algorithm requires each im-age in the pyramid to be down-sampled,blurred and then up-sampled. We there-fore propose an implicit construction ofthe Laplacian pyramids. The basic ideais that instead of running the decompo-sition algorithm each frame on the wholewater surface only the displacements aredecomposed. To simplify the decompo-sition further we propose a new methodin section 4.5.

4.3 Approximating L

To take advantage of the water heightfield representation introduced in 4.2 weneed an approximation for L. The goalfor this approximation is to accuratelyapproximate L for wavenumbers betweenj and 2j for some values j where j satis-fies j = C

h where h is the grid cell widthand C is some constant. We have usedwavelengths between 6h and 12h. Thismeans that the range of frequencies rel-ative to grid cell width represented in agrid are independent of grid size. The ap-proximation should also be fast to com-pute.

14

Page 23: Real-time Interactive Water Waves · rs at 3 ms per time step on a single core of a Intel™ Xeon™ prossor with high quality results. Referat Interaktiva vattenvågor i realtid

4.3. APPROXIMATING L

Input

Negate

Blur

Add

Downsample

Out

Recurse

Initial

image

Figure 4.1. Laplacian Pyramid Algorithm.

A B C

Figure 4.2. Example Decomposition. Ashows the original height-field. Black is -1and white is 1. B the resulting decomposi-tion. 50% gray is 0, white is 1 and black -1.C shows the resolution of the different grids(at a lower resolution than B to exaggerate)

A third requirement is that the ap-proximation should be symmetric. Thereason for this is to make the wave speedequal in all directions. We believe thatthis property is more important than theaccurate wavenumber wave speed rela-tion since it is required to keep wavescircular.

For this reason a kernel based on a lin-ear combination of a separable Gaussiankernel and an impulse was chosen. TheGaussian kernel is the only kernel that isboth rotationally symmetric and separa-ble. This means that a 2D convolution

can be made by a 1D convolution firstvertically and then horizontally. Thismeans that an n × n convolution onlyneeds 2n reads and 2 writes per cell tobe computed instead of n2 reads and 1write for a non-separable kernel.

We express this kernel as:

A1δ(r) + A2e−B2r2

(4.7)

Where δ is the Dirac delta function, r

is the distance to center and A1, A2, B

are weights. To choose the weigths wetransformed locally 4.7 into the Fourierdomain 4.8.

15

Page 24: Real-time Interactive Water Waves · rs at 3 ms per time step on a single core of a Intel™ Xeon™ prossor with high quality results. Referat Interaktiva vattenvågor i realtid

CHAPTER 4. THEORY AND TECHNIQUES

0 jj 2j2j

-6 -4 -2 0 2 4 6

3 px

5 px

7 px

target

Pixel

Wavenumber

Ma

gn

itu

de

Figure 4.3. Approximation of L. The firstplot show L in the Fourier domain. The sec-ond plot shows the corresponding Gaussianfunctions.

A1√2π

+A2√2B

e−

k2

4B2 (4.8)

The weights were determined by test-ing various values for B and comparing4.8 with F(L). When k approaches zero4.8 approaches A1√

2π+ A2√

2B. Therefore

A2was chosen so that A2√

2B= − A1√

2πto

keep the simulation stable at low fre-quencies. A1 was chosen visually to make4.8 and F(L) close in the area of interest,between j and 2j. We start by choos-ing A1, A2, B for F(L) with infinite wa-ter depths. To make our approximationindependent of pixels size and averagewavelength we parametrize it based on

Pixels B A1

7 0.53 · h −5.91 · g · jmean

5 0.74 · h −10.2 · g · jmean

3 1.24 · h −26.0 · g · jmean

Table 4.1. Approximation of L: Values forB and A1

pixel width grid cell width h and meanwavenumber, jmean. A2 is not calculatedanalytically. Instead it is calculated nu-merically once the Gaussian kernel hasbeen discretized. This is to ensure sta-bility with the discretized kernel. Thecalculation is done by numerically inte-grating I = e−B2r2

and setting A2 = A1

I .See figure 4.3 and table 4.1.

In order to handle non infinite waterdepths we need values for A1, A2, B forwater depth limited wave speeds. Forcomputational simplicity B is not al-lowed to vary with depth so that a subgrid will not need multiple B values. In-stead we simply clamp A1 and A2 toavoid the wave speed from reaching overthe shallow water speed.

4.4 Interaction

For interaction simple linear displace-ment of the height field was chosen forits simplicity. The displacements haveto be decomposed to be distributed tothe different sub grids in the Laplacianpyramid. Computing the intersectionbetween an arbitrary body and the wa-ter surface is complex. Because of thisa simple approximation of the intersec-tion is used. All interacting bodies aremodeled as ellipsoids and their resultingintersections as ellipses. This makes itpossible to do an approximate analyticaldecomposition rather than numerical de-

16

Page 25: Real-time Interactive Water Waves · rs at 3 ms per time step on a single core of a Intel™ Xeon™ prossor with high quality results. Referat Interaktiva vattenvågor i realtid

4.5. BANDPASS FILTERED ELLIPSES

composition as we shall see in section 4.5.A horizontally moving body is modeledby increasing the water height in front ofit and decreasing it behind. To do thisthe intersection ellipse is used to modifythe height field twice. It is moved for-ward and used to increase water heightand backward to decrease water height.When a body is moved vertically throughthe water surface the ellipse is used tochange the water height dependent onthe change of submerged volume.

4.5 Bandpass Filtered

Ellipses

In order to generate bandpass filtered el-lipses we derive an approximate analyti-cal expression. This expression is correctfor ellipses which are considerable largerthan the size of the band pass filter.

The basic idea is the following: Letf(d) be the edge response function of aband pass filter . An ellipse can locallybe approximated by a line segment. Letd(x, y) be the signed distance functionto the ellipse. Then f(d(x, y)) will lo-cally represent the bandpass filtered el-lipse, given that the filter is much smallerthan the line segments, so that curva-ture does not start to play a role. Ifwe can find an expression for d(x, y) overthe whole ellipse f(d(x, y)) will have anapproximation for the band pass filteredellipse valid for large ellipses.

We will use two properties of d in ourderivation: its gradient is perpendicularto the boundary of the ellipse and thegradient’s magnitude is one.

An ellipse is usually described by thefollowing equation:

x2

r2x

+y2

r2y

= 1 (4.9)

Where x and y are orthogonal coor-dinates in a coordinate system definedso that the direction of x and y coincidewith the major and minor axis of the el-lipse and rx and ry are the radii alongthe x and y directions respectively. Tofind d we start by finding an expressionof the form:

x2 + y2 = r2(x, y) (4.10)

We therefore propose r2(x, y) of theform:

r2(x, y) =r2

xr2y(x2 + y2)

r2yx2 + r2

xy2(4.11)

We need to prove that 4.9 and 4.10 areequivalent:

x2 + y2 =r2

xr2y(x2 + y2)

r2yx2 + r2

xy2(4.12)

⇔ 1 =r2

xr2y

r2yx2 + r2

xy2(4.13)

⇔ r2yx2 + r2

xy2 = r2xr2

y (4.14)

⇔ x2

r2x

+y2

r2y

= 1 (4.15)

Using this expression we can findan approximation for d :

x2 + y2 −√

r2(x, y). This expression equals d

when the ellipse is a circle since it reducesto the distance from origin minus the ra-dius. For ellipses it is inaccurate sincethe gradient of x2 + y2 is not perpendic-ular to the boundary of the ellipse. To

17

Page 26: Real-time Interactive Water Waves · rs at 3 ms per time step on a single core of a Intel™ Xeon™ prossor with high quality results. Referat Interaktiva vattenvågor i realtid

CHAPTER 4. THEORY AND TECHNIQUES

compensate for this we divide with thegradient of x2 + y2 projected on the nor-mal of the ellipse ( x

r2x, y

r2y). This gives the

following results.

1√

x2

r4x

+ y2

r4y

(

x

r2x

,y

r2y

)

1√

x2 + y2(x, y)

=1

(

x2

r4x

+ y2

r4y

)

(x2 + y2)

(

x2

r2x

+y2

r2y

)

=r2

yx2 + r2xy2

(

r4yx2 + r4

xy2)

(x2 + y2)

=

(

r4yx4 + 2r2

xr2yx2y2 + r4

xy4

r4yx4 + (r4

x + r4y)x2y2 + r4

xy4

)1/2

=

(

1 +(r2

x − r2y)2x2y2

(r2yx2 + r2

xy2)2

)

−1/2

Using this we can find an expressionfor d:

d =

(

x2

r2x

+ y2

r2y

)1/2

−(

r2xr2

y(x2+y2)

r2yx2+r2

xy2

)1/2

(

1 +(r2

x−r2y)2x2y2

(r2yx2+r2

xy2)2

)1/2

(4.16)Laplacian pyramids use Gaussian fil-

ters as their basic low pass filter. Tomake the analytical bandpass filteringpossible we need a band pass filtered stepfunction to use as a basis. We have threerequirements for this function:

• Fast to calculate

• Short tail

• Good frequency response

The chosen function was selected by test-ing various simple function, consisting ofonly addition, multiplications and a sin-gle division and comparing them with aGaussian filter and a perfect band passfilter. See figure 4.4 for a comparison.Based on its simplicity and short tail wechose:

f(d) =ad

1 + a6d6(4.17)

4.6 Level of Detail

In computer games predictable memoryand computation requirements are im-portant. A game has to run at a highframe rate for the experience to be en-joyable. It is therefore better to sacrificequality for performance. Because of thiswe require our level of detail algorithmto be close to constant in both mem-ory and computation independent of ob-server and water configuration.

As we shall see the Laplacian pyra-mid approach is very well suited foradaptive resolution. The simulation isdone by simulating several sub grids(h1, h2, h3, . . . , hi) . Different resolutionis easily obtained by varying i. For ex-ample 5 sub grids could be used close tothe observer, 4 further away and 3 evenfurther away etc.

In order to achieve constant memoryand performance we decided to base ourlevel of detail system on a pool. Thepool contains pyramids of different res-olutions. These are dynamically dis-tributed to achieve varying level of de-tail. To make the change of resolutioneasy, the area which should be simulated

18

Page 27: Real-time Interactive Water Waves · rs at 3 ms per time step on a single core of a Intel™ Xeon™ prossor with high quality results. Referat Interaktiva vattenvågor i realtid

4.7. PHENOMENOLOGICAL GENERATION OF DETAILS

0

0.2

0.4

0.6

0.8

1

1.2

1.4

-1

-0.5

0

0.5

1

ax

1+ a x4

ax

1+ a x6

ax

1+ a x84 6 8

Gaussian

Di�erence

-15 -10 -5 0 5 10 15

0 2 4 6 8 10

Inte

nsi

tyM

ag

nit

ud

e

x

Angle (rad)

Figure 4.4. Bandpass Filtered Edges.First plot shows the edge response of dif-ferent functions. Second plot the frequencyplot of the corresponding bandpass filter. a

is a scaling factor. a = 0.3 was used in theexample.

(this is defined by the user) is split intoequal sized squares (for example 6 x 6 min size). We refer to these as simulationcells. The pyramids are at run-time dis-tributed to the simulation cells so thatcells close to the observer get high reso-lution pyramids while cells further awayget lower resolution. This results in con-stant performance independent of sim-ulated area. However, the bigger areaneeded to be simulated the lower resolu-tion it will be, relative to distance to theobserver. When there are so many cellsthat there are not enough pyramids thecells furthest away will not be simulated.

4.7 Phenomenological

Generation of Details

Real world water has waves down to justa few millimeters in size. With our ap-proach and current processors it is im-possible to achieve this amount of detailin real-time. Because of this an inter-esting area to study is phenomenologi-cal addition of details. Phenomenologi-cal approaches have been used success-fully to add details to smoke simulations[BHN07, KTJG08]. It is therefore in-teresting to consider similar methods forheight field based water. [KTJG08] usewavelet noise to modify the flow of a lowresolution simulation. This method isnot applicable since our simulation as-sumes zero flow. Instead a method thatmodifies the height-field is needed. Anearly approach at generating waves forcomputer games is to render a billboardwith a circular wave on it and animatethe billboard scaling. While an interest-ing approach it is hard to integrate withthe rest of the simulation. Ideally the de-tail addition could be done mainly in a

19

Page 28: Real-time Interactive Water Waves · rs at 3 ms per time step on a single core of a Intel™ Xeon™ prossor with high quality results. Referat Interaktiva vattenvågor i realtid

CHAPTER 4. THEORY AND TECHNIQUES

(0.0, 0.0)

0.0(0.0, 0.0)

0.0(0.0, 0.0)

0.0

(0.0, 0.0)

0.0(0.0, 0.0)

1.0(0.0, 0.0)

0.0

(0.0, 0.0)

0.0(0.0, 0.0)

0.0(0.0, 0.0)

0.0

(0.35, 0.35)

0.09

(0.5, 0.5)

0.12 0.09

(0.5, 0.5)

0.12(0.0, 0.0)

0.16(0.5, 0.5)

0.12

0.09(0.5, 0.5)

0.12 0.09

(dx, dy)

A

(0.35, 0.35)

(0.35, 0.35)(0.35, 0.35)

(0.0, 0.0)

0.0(0.0, 0.0)

0.0(0.0, 0.0)

0.0

(0.0, 0.0)

0.0(1.0, 0.0)

1.0(0.0, 0.0)

0.0

(0.0, 0.0)

0.0(0.0, 0.0)

0.0(0.0, 0.0)

0.0

(0.71, 0.71)

0.29(0.0, 0.0)

0.0(0.0, 0.0)

0.0

(1.0, 0.0)

0.41(0.0, 0.0)

0.0(0.0, 0.0)

0.0(0.71,-0.71)

0.29(0.0, 0.0)

0.0(0.0, 0.0)

0.0

(0.0, 0.0)

0.0(0.0, 0.0)

0.0(0.0, 0.0)

0.0

(0.0, 0.0)

0.0(0.71, 0.71)

1.0(0.0, 0.0)

0.0

(0.0, 0.0)

0.0(0.0, 0.0)

0.0(0.0, 0.0)

0.0

(0.71, 0.71)

0.41(0.0, 0.0)

0.0(0.0, 1.0)

0.29

(1.0, 0.0)

0.29(0.0, 0.0)

0.0(0.0, 0.0)

0.0(0.0, 0.0)

0.0(0.0, 0.0)

0.0(0.0, 0.0)

0.0

A B C D

Figure 4.5. Propagation of Detail Waves.A explains the meaning of the different val-ues. B, C and D show example propagations.

pixel shader.Instead we propose a method for mod-

eling the existence of waves rather thana height field. The idea is that insteadof propagating waves information aboutwave direction and amplitude is propa-gated. Simulation is done in a grid. Eachgrid cell contains the wave energy, E, anda 2d vector containing the average direc-tion of the waves, d, this vector is notnormalized. Because of this the d con-tains information about how directionalthe waves are. If |d| = 0 no directionis favored , if |d| = 1 they are com-pletely directional. This representationis clearly inaccurate and violates the su-perposition principle. However our re-sults using the approach are promising.

A method of propagation is neededto use this representation. We basethe propagation on three simple obser-

vations:

• If |d| = 1 they should propagate inthat direction and maintain |d| = 1.

• If |d| = 0 one possible reason for thisis that the waves are traveling in alldirections. In that case they shouldpropagate in all directions and be-come more and more directional.

• Sum of E for all cells should be con-served.

Based on this E is propagated in twoways dependent on |d|. E is splitinto two parts: directional |d|E andnon-directional (1 − |d|)E. The non-directional part is diffused equally in alldirections. The directional part weightedby the scalar product between d and thedirection to the adjacent cell. Energy isonly moved in the directions where the

20

Page 29: Real-time Interactive Water Waves · rs at 3 ms per time step on a single core of a Intel™ Xeon™ prossor with high quality results. Referat Interaktiva vattenvågor i realtid

4.8. PHENOMENOLOGICAL BOUNDARY CONDITIONS

scalar product is positive. See figure 4.5for examples. Propagation speed is con-trolled by the amount of energy beingpropagated.

E and d are then exposed in a pixelshader to generate the actual details.

4.8 Phenomenological

Boundary Conditions

Correct handling of boundary conditionsis a hard problem. [Tes04a] uses a phe-nomenological approach and simply setsthe water displacement to zero wherethere is no water. This results in arigid boundary condition which gener-ates reflected waves. However thesewaves are completely unphysical sincethe water height is kept constant at bor-ders. A better approximation would bea free boundary condition. Using thisboundary condition is more complicated.Therefore we use a simple approxima-tion: water displacement is modeled bydiffusion where there is no water. Physi-cally this is very inaccurate and may gen-erate both energy and mass. In practiceit is a cheap way of generating plausi-ble boundary interactions and also hasa dampening effect on wave amplitude.The diffusion is cheap to calculate sincewe already calculate L which can directlybe used to calculate the diffusion.

This model does not take non linear ef-fects of water boundaries. A large wavegenerates smaller waves when interact-ing at a boundary. In order to modelthese effects we allow waves in low reso-lution sub grids to move into higher res-olution sub grids near borders. This alsocompensates for the energy loss of theboundary condition approximation.

21

Page 30: Real-time Interactive Water Waves · rs at 3 ms per time step on a single core of a Intel™ Xeon™ prossor with high quality results. Referat Interaktiva vattenvågor i realtid
Page 31: Real-time Interactive Water Waves · rs at 3 ms per time step on a single core of a Intel™ Xeon™ prossor with high quality results. Referat Interaktiva vattenvågor i realtid

Chapter 5

Implementation

We have created two implementations ofthe methods and algorithms described inchapter 4. One implementation is cre-ated using GNU Octave to create easyanalyzable results. We have also im-plemented the algorithm of [Tes04a] forcomparison. The Octave implementa-tion is made directly from the equationspresented in 4. The Octave implemen-tation does not feature the LOD system.The second implementation is made us-ing C++ in the Frostbite engine. Thisimplementations is made to see how ouralgorithm works in a real computer gameengine and is highly optimized. TheFrostbite implementation is used for per-formance evaluation.

The rest of this chapter is focused onthe Frostbite implementation and howour algorithm is optimized and adaptedto the game engine architecture.

5.1 Update method

We solve eq. 4.5 using Euler integrationin the following way:

vn+1 = vn + ∆t (L ∗ hn)

hn+1 = hn + ∆t vn+1 + ∆hdisplacement

Where n is the last step, n + 1 is thestep to be calculated, v the velocity,∆t

the change in time and ∆hdisplacement isthe change in water height due to inter-action. To solve this the height and ve-locity is stored in two buffers, one for thecurrent frame and one for the previous.The two buffers alternate role so that thefirst buffered is updated from the secondand in the next frame the second fromthe first.

To make sure the simulation is sta-ble ∆t is clamped at a maximum value∆tmax. This results in slower wave speedfor large ∆t rather than unstable simu-lation.

5.2 Parallelism

To fully utilize the Parallelism of moderncomputers and game consoles it is impor-tant to take into account when imple-menting high performance code. Thereare several kinds of parallelism. Two im-portant types, which we will focus on, arevectorization and processor parallelism.Vectorization refers to utilizing Single In-

23

Page 32: Real-time Interactive Water Waves · rs at 3 ms per time step on a single core of a Intel™ Xeon™ prossor with high quality results. Referat Interaktiva vattenvågor i realtid

CHAPTER 5. IMPLEMENTATION

1 2 3 4

1 2 3 4

1 2 3 4

1 2 3 4

1 2 3 4

1 2 3 4

1 2 3 4

1 2 3 4

1 2 3 4

1 2 3 4

1 2 3 4

1 2 3 4

1 2 3 4

1 2 3 4

1 2 3 4

1 2 3 4

1 2 3 4

1 2 3 4

1 2 3 4

1 2 3 4

1 2 3 4

1 2 3 4

1 2 3 4

1 2 3 4

1 2 3 4

1 2 3 4

1 2 3 4

1 2 3 4

1 2 3 4

1 2 3 4

1 2 3 4

1 2 3 4

1 2 3 4

1 2 3 4

1 2 3 4

1 2 3 4

1 2 3 4

1 2 3 4

1 2 3 4

1 2 3 4

1 2 3 4

1 2 3 4

1 2 3 4

1 2 3 4

1 2 3 4

1 2 3 4

1 2 3 4

1 2 3 4

1 2 3 4

1 2 3 4

1 2 3 4

1 2 3 4

1 2 3 4

1 2 3 4

1 2 3 4

1 2 3 4

1 2 3 4

1 2 3 4

1 2 3 4

1 2 3 4

1 2 3 4

1 2 3 4

1 2 3 4

1 2 3 4

Figure 5.1. Vectorization.

struction Multiple Data (SIMD) capabil-ities. Processor parallelism to the usageof multi core architectures to run codeon several processors in parallel.

If fully utilized parallization can pro-vide huge speed ups. A Cell processor,which is used in PlayStation 3, has 6 in-dependent processors that each are ca-pable of doing 4 instructions on 32 bitfloating point number. This is makes itpossible to process 24 numbers at once.

The Frostbite engine is using a jobmodel to handle processor parallelism.This means that to parallelize a task ithas to be divided into a number of inde-pendent jobs which are then scheduledto the many different cores. Frostbitealso has a cross platform vector libraryto simplify vectorization.

5.2.1 Vectorization

To utilize SIMD capabilities the subgrids are stored as vectors of length fouraligned in the x-direction as shown in fig-ure 5.1. Most parts of the simulation istrivial to vectorize since it does not de-pend on neighbor cells. The two partsthat are harder are up-sampling and con-volution. Up-sampling and convolution

in the y-direction is unchanged. In thex-direction it can be calculated by ma-trix multiplication. Since up-samplingand convolution are similar we only showhow convolution is done in more de-tail. Calculating the convolution in thex-direction with a 9 cells wide vectorw(w0, w1, . . . , w8) in an height field rep-resented by the 4 long column vector hx,y

(each x represents 4 values, y represents1 value) can be done in the following way:

Mbefore × hx−1,y + Mmiddle × hx,y +Mafter × hx+1,y

Where

Mbefore =

w0 w1 w2 w3

0 w0 w1 w2

0 0 w0 w1

0 0 0 w0

Mmiddle =

w4 w5 w6 w7

w3 w4 w5 w6

w2 w3 w4 w5

w1 w2 w3 w4

Mafter =

w8 0 0 0w5 w6 0 0w6 w7 w8 0w5 w6 w7 w8

5.2.2 Processor parallelism

To be able to use the job model for par-allelism the simulation has to be splitinto smaller problems. The Cell pro-cessor consists of 7 processing units. 6of these, called Synergistic ProcessingUnits (SPU’s), do not have direct accessto main memory and only have 256 kB ofcache for both code and data. Because ofthis jobs can only access 256 kB simul-taneously. To meet these requirementswave propagation is split into two part:a simulation step and a border copy step.All grids contain a border outside thesimulated area. This border is used tocalculate the Laplacian in the propaga-

24

Page 33: Real-time Interactive Water Waves · rs at 3 ms per time step on a single core of a Intel™ Xeon™ prossor with high quality results. Referat Interaktiva vattenvågor i realtid

5.5. RENDERING

Frame start

Frame end

Copy data

Render

Handle Interaction

Propagate waves

Copy borders

Switch bu!er

Update LOD

Parallelized per pyramid

Figure 5.3. Algorithm Overview. Theframe starts at the task “Frame start” andprogresses downwards. Tasks beside eachother are performed in parallel.

tion step. In the border copy step twoneighbors are processed simultaneouslyand their border are filled with the sim-ulated data from their neighbor.

The height-field has to be copied to theGPU for rendering. In order to do thisin parallel with simulation the copyingis done on the data calculated in the lastframe. This results in a slight time differ-ence between simulation and rendering.However this has not been noticeable inpractice.

5.3 Algorithm Overview

Figure 5.3 contains an overview of thework done during a frame.

5.4 Client and Server

The multiplayer games at EA DICETM

use a client server model. Critical sys-tems such as player movement, vehiclephysics simulation, large scale destruc-tion etc run on the server and are mir-rored on the client. Effects and less im-

portant physics objects such as smoke,newspaper blowing in the wind, debrisfrom destruction etc are only simulatedon the client. We will refer to objectsonly existing on the client as client sideobjects and objects being simulated atthe server and mirrored at the client asserver side objects.

For performance reasons it was de-cided that the water simulation shouldonly run on the client. If the simula-tion was to be run on the server levelof detail methods could not have beenused and lots of network traffic had beenneeded. Because of this a server side sim-ulation would have had substantially re-duced resolution.

Client side objects can interact fullywith the water simulation. They bothgenerate waves and respond to them.Server side objects do not have access tothe height field simulation and can there-fore not be affected by waves. Insteadserver side objects use the resting waterheight. Since server side objects are mir-rored onto the client they can generatewaves in same way client side objects do.This makes it less obvious that serverobjects are not affected and in practiceit is barely noticeable unless large wavesare present (comparable to the interact-ing object in size).

5.5 Rendering

This is only a sort overview of the ren-dering since this was not the focus of thisthesis. This is an important area of fu-ture work.

To render the height field a vertexbuffer and a texture map is used. Thevertex buffer contains a triangle repre-sentation of all the grids and the phe-

25

Page 34: Real-time Interactive Water Waves · rs at 3 ms per time step on a single core of a Intel™ Xeon™ prossor with high quality results. Referat Interaktiva vattenvågor i realtid

CHAPTER 5. IMPLEMENTATION

A B C

Figure 5.2. Border sizes for Different GridResolutions.

nomenological detail model. The texturemap the height values which are usedfor normal calculation. For simplicity allgrids are represented in the whether theyare simulated or not. However, only thegrids that are currently active are ren-dered.

The vertex buffer is generated ata lower resolution than simulation toincrease performance of the renderingwhile the texture map is generated at fullresolution. The textures for all the gridare stored in a single texture using a tex-ture atlas approach.

The normals are generated from thetexture map by computing the gradient.In addition to this details are added inthe vertex buffer using the phenomeno-logical detail simulation. The directionis used to blend in an animated texturemoving in that direction. The energy isused to scale the amplitude of the ani-mated texture. The texture is animatedusing the method of [Vla10].

In order to provide smooth transitionsbetween LOD levels the highest resolu-tion grid in a pyramid are faded towardsany neighbors with lower resolution.

5.6 Physics Interaction

The Frostbite engine has existing sys-tems for handling rigid body physics andbuoyancy. Our simulation interacts withthis system in three ways.

• The bottom height is determined bychecking vertical rays for intersec-tion with static geometry

• Interacting bodies are updated withthe current water height at their po-sition to handle buoyancy

• Interacting bodies are approximatedwith an ellipsoid to find an intersec-tion with the water surface to gen-erate waves. See 4.4.

26

Page 35: Real-time Interactive Water Waves · rs at 3 ms per time step on a single core of a Intel™ Xeon™ prossor with high quality results. Referat Interaktiva vattenvågor i realtid

Chapter 6

Results

6.1 Octave Implementation

These are the results of the GNU Octave implementation. Wave speeds where cal-culated by measuring zero crossings of a standing wave. The iwave implementationuses a kernal constructed by a numerical inverse Fourier transform of eq. (4.6).

Figure 6.1. Sum of eight bandpass filteredfunctions.

27

Page 36: Real-time Interactive Water Waves · rs at 3 ms per time step on a single core of a Intel™ Xeon™ prossor with high quality results. Referat Interaktiva vattenvågor i realtid

CHAPTER 6. RESULTS

base ellipse our approximation convolution

he

igh

t!e

ldfo

uri

er

tra

nsf

orm

he

igh

t!e

ldfo

uri

er

tra

nsf

orm

Figure 6.2. Bandpass Decomposition.

28

Page 37: Real-time Interactive Water Waves · rs at 3 ms per time step on a single core of a Intel™ Xeon™ prossor with high quality results. Referat Interaktiva vattenvågor i realtid

6.1. OCTAVE IMPLEMENTATION

1

1.5

2

2.5

3

3.5

0 2 4 6 8 10

3 px

5 px

8 px

target

c2(m

2/s

2)

λ-1(m-1)

Figure 6.3. Measured wave speed.

our algorithm iwave wave-equation

Figure 6.4. Height-field Results Compari-son. 50% gray represents 0, lighter gray pos-itive and darker gray negative.

29

Page 38: Real-time Interactive Water Waves · rs at 3 ms per time step on a single core of a Intel™ Xeon™ prossor with high quality results. Referat Interaktiva vattenvågor i realtid

CHAPTER 6. RESULTS

512 x 512 256 x 256

128 x 128 64 x 64 32 x 32

Figure 6.5. Grids in the Pyramid. 50%gray represents 0, lighter gray positive anddarker gray negative.

30

Page 39: Real-time Interactive Water Waves · rs at 3 ms per time step on a single core of a Intel™ Xeon™ prossor with high quality results. Referat Interaktiva vattenvågor i realtid

6.2. FROSTBITE IMPLEMENTATION

6.2 Frostbite Implementation

These are the results of the optimized implementation. All measurements wheremade on a 8 core Intel Xeon x5550 processor running at 2.67 GHz with 12 GB ofRAM and a Nvidia GeForceGTX 470 graphics card.

Pyramid resolution Time per frame (ms)

128 6.5

64 2.1

32 0.9

16 0.5

Table 6.1. Time Measurements for 8Connected Pyramids. Measurements wheremade in Frostbite with 8 pyramids of dif-ferent resolutions. The measurements showthe time spent on propagation and bordercopying.

No. of pyramids with resolution Time per frame spent on

64x64 32x32 16x16 All Simulation (ms) Rendering (ms)

4 12 0 16 2 0.5

6 24 0 30 4 0.7

4 12 36 52 3.1 0.7

6 18 54 78 4.5 1.0

4 16 64 84 4.3 0.9

6 24 96 126 6.5 1.3

Table 6.2. Time Measurements for Vari-ous Pyramid Configurations. Measurementswhere made in Frostbite. The measurementsshow the time spent on propagation and bor-der copying and the amount of time spent onthe CPU to generate vertex buffers and tex-tures.

31

Page 40: Real-time Interactive Water Waves · rs at 3 ms per time step on a single core of a Intel™ Xeon™ prossor with high quality results. Referat Interaktiva vattenvågor i realtid
Page 41: Real-time Interactive Water Waves · rs at 3 ms per time step on a single core of a Intel™ Xeon™ prossor with high quality results. Referat Interaktiva vattenvågor i realtid

Chapter 7

Discussion

The method presented in this thesis is anew method for simulating water surfacewaves. This method is fast enough tobe usable in computer and video gamesand provides an approximation of lin-ear wave theory. In particular both wa-ter height and wave length dependencyon wave speed is handled which createscomplex effects impossible without it.

Formal quality and performance com-parisons are important areas which havenot been adressed in this thesis. Be-cause of a lack of reference implemen-taions and because of the dynamic levelof detail system performance is hard tocompare. Quality is also hard to evaluatesince the goal is not numerical accuracy.This could be evaluated by a user study.

7.1 Design Choices

7.1.1 Linear Wave Theory

We have successfully used linear wavetheory as a basis for real time watersurface waves simulations. Linear wavetheory is also used to derive the iWavemethod which makes it possible to doa qualitative comparison based on thecommon base.

7.1.2 Wave decomposition

We have presented a novel method forapproximating linear wave theory by do-ing a wavelength based decompositionsimilar to Laplacian pyramids. This al-lows heavy approximation of L while re-quiring 33% more memory than previ-ous methods. Because of the multireso-lution approach it is well suited for levelof detail methods. We believe that thisdecomposition has been a success. How-ever, our approximation of L and decom-position algorithm leave room for furtherdevelopments.

7.1.3 Approximation of L

The Gaussian approximation of L is oneof the simplest possible. While beingfast to compute it is not an accurateapproximation. Because of the goal ofbeing usable in current generation videogames and consoles a more expensive ap-proximation is impossible. In figure 6.4our algorithm does not feature as stronginference pattern (Kelvin wakes) as theiWave algorithm, which correctly solvesthe linear wave theory dispersion rela-tion. With a better approximation L

our results would have been closer to the

33

Page 42: Real-time Interactive Water Waves · rs at 3 ms per time step on a single core of a Intel™ Xeon™ prossor with high quality results. Referat Interaktiva vattenvågor i realtid

CHAPTER 7. DISCUSSION

iWave results. However, while being lessaccurate, our method accounts for heightdependence.

7.1.4 Level of Detail

The level of detail system presented au-tomatically adapts resolution of the sim-ulation while keeping the performanceconstant. One big disadvantage of thepool-based method is that the total pos-sible area of the simulation is held con-stant. This becomes a problem when theobserver is moved far from a large watersurface. Also as the number of pyramidsincrease in the pool border copying be-comes an larger issue. For 4x4 grids thesize of the border is 8 times larger thanthe grid itself. See figure 5.2.

7.1.5 Interaction

All intersections are modeled as ellipses.In the implementation in the Frostbiteengine this has not limited the interac-tions. Finding accurate intersection foruse more advanced system is currentlytoo costly to be of practical use. Theellipse method allows for fairly varied in-teraction without becoming overly com-plex.

7.1.6 Phenomenological

boundaries and details

The phenomenological boundaries anddetails improves the visual quality byadding interest and detail. Naturallyan accurate high resolution simulationwould be better but given the constraintson performance this is not possible.

7.2 Future Research

7.2.1 Different approximations of

L

Our approximation of L is fast to com-pute but not accurate. For future gamesand other applications a more complexapproximation may be of interest. L

could potentially be modeled as a sumof several Gaussian functions, two keepthe separable property. Another alterna-tive would be to generate a two dimen-sional kernel computed directly from awindowed frequency response of L.

7.2.2 Hybrid Methods

Hybrid methods are common in fluidsimulations. See for example [Cor08].Using out method in conjunction withanother model is an interesting futurearea of research. One way of doing thisis to couple our linear wave theory basedmethod with another height field methodsuch as shallow water equations. Shal-low water equations do not account fordispersion effects but handles flow. Aninteresting use would be to couple a lowresolution shallow water equations solu-tion with a high resolution linear wavetheory solution. To do this the linearwave theory solver would need an advec-tion step. Another similar possibility isto couple a static laminar flow solutionwith our solution. to simulate rivers etcwhich have a close to constant flow.

Coupling our simulation with a turbu-lence model could also be interesting.

7.2.3 Level of Detail

Researching more advanced LOD meth-ods for our multiresolution simulationis an important area of future research.

34

Page 43: Real-time Interactive Water Waves · rs at 3 ms per time step on a single core of a Intel™ Xeon™ prossor with high quality results. Referat Interaktiva vattenvågor i realtid

7.2. FUTURE RESEARCH

The current system uses equal sizedpyramids of varying resolution. This lim-its the algorithm to a maximum area:the total area of all the pyramids. Sev-eral other methods were considered butnot implemented due to time constraints.A promising approach is to have a poolof equal resolution grids. The pyra-mid hierarchy is created globally by dy-namically varying the scale of the grids.This makes it possible to grid to tran-sition from one scale to another makingthe LOD algorithm independent of scenescale. The equal size of grid also removesthe problem of border copying becominga larger performance hit for small grids.

7.2.4 Rendering

In order for the simulation to be per-ceived as realistic in a computer or videogame the visualization needs to be real-istic. This research is beyond this thesisbut is still an important field of research.

7.2.5 Interaction

We have limited ourselves to interactionsthrough ellipses. A more advanced ap-proach using general intersections andnumerical bandpass filtering should beinvestigated. Also a more accurate bandpass filter should investigated.

7.2.6 Boundary Conditions

The boundary conditions we have usedare phenomenological in their nature. Amore scientific approach should be con-sidered.

7.2.7 Performance Comparisons

Comparing performance is important tofind the most efficient method. With

level of detail methods and different ap-proximations such a comparison is hardto do. Nevertheless such comparisons areimportant and so far have not been donewith height-field based methods. To dosuch a study it is important to find agood metric of simulation quality.

7.2.8 Other uses

The multiresolution method for solvinglinear wave theory is applied to simu-lation for computer and video games.Combined with a better approximationfor L it could potentially be used for non-real-time simulations. Another possibil-ity is to use this multiresolution meth-ods with higher order methods and othersimilar computational problems.

35

Page 44: Real-time Interactive Water Waves · rs at 3 ms per time step on a single core of a Intel™ Xeon™ prossor with high quality results. Referat Interaktiva vattenvågor i realtid
Page 45: Real-time Interactive Water Waves · rs at 3 ms per time step on a single core of a Intel™ Xeon™ prossor with high quality results. Referat Interaktiva vattenvågor i realtid

Bibliography

[BA83] P. Burt and E. Adelson. The Laplacian pyramid as a compact imagecode. IEEE Transactions on communications, 31(4):532–540, 1983.

[BHN07] Robert Bridson, Jim Houriham, and Marcus Nordenstam. Curl-noisefor procedural fluid flow. ACM Trans. Graph., 26(3):46, 2007.

[BMF07] R. Bridson and M. Müller-Fischer. Fluid simulation: SIGGRAPH 2007course notes Video files associated with this course are available fromthe citation page. In ACM SIGGRAPH 2007 courses, page 81. ACM,2007.

[CL95] J.X. Chen and N.D.V. Lobo. Toward interactive-rate simulation of fluidswith moving obstacles using Navier-Stokes equations. Graphical Modelsand Image Processing, 57(2):107–116, 1995.

[Cor07] H. Cords. Mode-splitting for highly detailed, interactive liquid simula-tion. In GRAPHITE ’07: Proceedings of the 5th international confer-ence on Computer graphics and interactive techniques in Australia andSoutheast Asia, pages 265–272, New York, NY, USA, 2007. ACM.

[Cor08] Hilko Cords. Moving with the flow: Wave particles in flowing liquids.In Journal of WSCG (WSCG’08), 2008.

[Day09] Mike Day. Insomniac’s water rendering system, 2009. retrieved fromhttp://www.insomniacgames.com/tech/articles/0409/files/water.pdf.

[Fin04] Mark Finch. Effective water simulation from physical models. In GPUGems. Addison-Wesley Professional, 2004.

[FS06] G. Falkovich and K.R. Sreenivasan. Lessons from hydrodynamic turbu-lence. Physics Today, 59(4):43, 2006.

[Gre08] Simon Green. Particle-based fluid simulation for games.http://developer.nvidia.com/object/gdc-2008.html, 2008. RetrievedSeptember 10th 2010.

37

Page 46: Real-time Interactive Water Waves · rs at 3 ms per time step on a single core of a Intel™ Xeon™ prossor with high quality results. Referat Interaktiva vattenvågor i realtid

BIBLIOGRAPHY

[HHL+05] T.R. Hagen, J.M. Hjelmervik, K.-A. Lie, J.R. Natvig, and M. OfstadHenriksen. Visual simulation of shallow-water waves. Simulation Mod-elling Practice and Theory, 13(8):716 – 726, 2005. Programmable Graph-ics Hardware.

[Igl04] A Iglesias. Computer graphics for water modeling and rendering: asurvey. Future Generation Computer Systems, 2004.

[JG01] Lasse Staff Jensen and Robert Golias. Deep-water animation and ren-dering. http://www.gamasutra.com/gdce/2001/jensen/jensen_01.html,2001. Retrieved September 10th 2010.

[Kal08] Daniel Kallin. Real time large scale fluids for games. Linköping Elec-tronic Conference Proceedings (Proceedings of SIGRAD 2008), 2008.

[KID10] Jeffrey Kiel, Kumar Iyer, and Sebastien Domine. Takingfluid simulation out of the box: Particle effects in dark void.http://developer.nvidia.com/object/gdc-2010.html, 2010. RetrievedSeptember 10th 2010.

[KLLR05] B.M. Kim, Y. Liu, I. Llamas, and J. Rossignac. Flowfixer: Using bfeccfor fluid simulation. In Eurographics Workshop on Natural Phenomena,volume 1. Citeseer, 2005.

[KM90] Michael Kass and Gavin Miller. Rapid, stable fluid dynamics for com-puter graphics. In SIGGRAPH ’90: Proceedings of the 17th annual con-ference on Computer graphics and interactive techniques, pages 49–57,New York, NY, USA, 1990. ACM.

[KTJG08] Theodore Kim, Nils Thürey, Doug James, and Markus Gross. Waveletturbulence for fluid simulation. ACM Trans. Graph., 27(3):1–6, 2008.

[LH10] Hyokwang Lee and Soonhung Han. Solving the shallow water equationsusing 2d sph particles for interactive applications. The Visual Computer,26:865–872, 2010. 10.1007/s00371-010-0439-9.

[Lov02] J. Loviscach. A convolution-based algorithm for animated water waves.In Eurographics, volume 2, pages 381–389, 2002.

[Lov03] J. Loviscach. Complex water effects at interactive frame rates. Journalof WSCG, 11:2003, 2003.

[LvdP02] Anita T. Layton and Michiel van de Panne. A numerically efficientand stable algorithm for animating water waves. The Visual Computer,18:41–53, 2002. 10.1007/s003710100131.

[MK99] A.J. Majda and P.R. Kramer. Simplified models for turbulent diffusion:Theory, numerical modelling, and physical phenomena. Physics Reports,314(237):574, 1999.

38

Page 47: Real-time Interactive Water Waves · rs at 3 ms per time step on a single core of a Intel™ Xeon™ prossor with high quality results. Referat Interaktiva vattenvågor i realtid

[NCZ+09] M.B. Nielsen, B.B. Christensen, N.B. Zafar, D. Roble, and K. Museth.Guiding of smoke animations through variational coupling of simula-tions at different resolutions. In Proceedings of the 2009 ACM SIG-GRAPH/Eurographics Symposium on Computer Animation, pages 217–226. ACM, 2009.

[Nie10] Michael B. Nielsen. Improved variational guiding of smoke animations.Computer Graphics Forum, 29:705–712(8), May 2010.

[PTSG09] Tobias Pfaff, Nils Thuerey, Andrew Selle, and Markus Gross. Syntheticturbulence using artificial boundary layers. In SIGGRAPH Asia ’09:ACM SIGGRAPH Asia 2009 papers, pages 1–10, New York, NY, USA,2009. ACM.

[rea] Realflow. http://www.realflow.com/. Retrieved September 10th 2010.

[Sch07] R. Schuster. Algorithms and data structures of fluids in computer graph-ics. Unpublished State of the Art Report, 2007.

[Tes04a] Jerry Tessendorf. Interactive water surfaces. In Game ProgrammingGems 4. Charles River Media, 2004.

[Tes04b] Jerry Tessendorf. Simulating ocean surface. SIGGRAPH 2004 CourseNotes, 2004. retrieved from http://tessendorf.org/reports.html Septem-ber 10th 2010.

[TKPR06] N. Thürey, R. Keiser, M. Pauly, and U. Rüde. Detail-preservingfluid control. In SCA ’06: Proceedings of the 2006 ACM SIG-GRAPH/Eurographics symposium on Computer animation, pages 7–12,Aire-la-Ville, Switzerland, Switzerland, 2006. Eurographics Association.

[Vla10] Alex Vlachos. Water flow in portal. Advances in Real-Time Renderingin 3D Graphics and Games, SIGGRAPH 2010 Course Slides, 2010. re-trieved from http://advances.realtimerendering.com/s2010/index.htmlSeptember 10th 2010.

[YHK07] Cem Yuksel, Donald H. House, and John Keyser. Wave particles. ACMTransactions on Graphics (Proceedings of SIGGRAPH 2007), 26(3):99,2007.

39


Recommended