Contents
Sponsored Feature: Real-Time Parametric Shallow Wave Simulation
 
 
Printer-Friendly VersionPrinter-Friendly Version
 


Part of:



[More information...]
 

Latest News
spacer View All spacer
 
February 9, 2010
 
EA Reduces Quarterly Loss, Claims #1 Publisher Position [5]
 
EA: Distribution Business To Be Pared Down, Headcount Stable In 2010
 
Game Developer Announces Salary Survey Call, Now Including Indies [4]
spacer
Latest Jobs
spacer View All     Post a Job     RSS spacer
 
February 9, 2010
 
Tarsier Studios
Senior Game Engine Programmer
 
Konami Digital Entertainment Co., Ltd.
Sound designer
 
Vicarious Visions / Activision
Tools Programmer
 
Trion Redwood City
Sr. Environment Modeler
 
Trion Redwood City
Sr. Graphics Programmer
 
Sparkplay Media
Senior Game Designer
 
Blue Fang Games
Producer: Online/Mobile
 
Blue Fang Games
Senior Server Engineer: Online/Mobile
spacer
Latest Features
spacer View All spacer
 
February 9, 2010
 
arrow Television, Meet Games
 
arrow Two Halves, Together: Patrick Gilmore On Double Helix [1]
 
arrow The Road To Hell: The Creative Direction of Dante's Inferno [18]
 
arrow The Sensible Side of Immersion [10]
 
arrow Jumpstarting Your Creativity [5]
 
arrow Truth in Game Design [49]
 
arrow Postmortem: Vicious Cycle's Matt Hazard: Blood Bath and Beyond [4]
 
arrow Developers React: The iPad's Future [16]
spacer
Latest Blogs
spacer View All     Post     RSS spacer
 
February 9, 2010
 
[Lineage 2] Freya Update Is Just a Beginning ②
 
Swashbuckling for Landlubbers: Why you may already be encouraging piracy! [7]
 
[Lineage 2] Freya Update Is Just a Beginning ①
spacer
About
spacer News Director:
Leigh Alexander
Features Director:
Christian Nutt
Editor At Large:
Chris Remo
Advertising:
John 'Malik' Watson
Recruitment/Education:
Gina Gross
 
Feature Submissions
Features
  Sponsored Feature: Real-Time Parametric Shallow Wave Simulation
by John Van Drasek III
4 comments
Share RSS
 
 
January 28, 2009 Article Start Page 1 of 5 Next
 

[Simulating convincing waves is mathematically complex and computationally taxing. In this sponsored article, part of the Intel Visual Computing microsite, John Van Drasek III, David Bookout and Adam Lake tackle the problem with DirectX 10.]

Abstract Summary

The simulation of ocean waves provides a significant challenge to computer graphics. Offline rendering yields phenomenal results, but the computational cost is high. The ability to generate waves in real time that resemble actual ocean waves is highly desirable. In this article we describe an implementation of a real-time shallow ocean wave simulation using Microsoft DirectX 10. Our simulation produces a variety of wave shapes and allows the designer to tune wave parameters in real time.

Introduction and Previous Work

Simulating ocean waves has been a challenging goal for both offline and real-time renderings. Early publications in the graphics literature date back to Peachey (1986) and Fournier (1986), but these publications refer to a number of wave simulations that were developed as early as 1981 and the film Carla's Island by Nelson Max (1981). For game developers, a continuing degree of realism has tracked the performance capabilities of hardware. These techniques can be partitioned into two categories: offline and real-time. In both of these categories, water simulation techniques are classified as those that simulate only the water surface and those that simulate the entire water volume.

Offline rendering lets us increase the physical accuracy without regard to the tight time constraints we have in real-time game engines. Many attempt to simulate the fluid mechanics using solutions of the Navier-Stokes (NS) equations. In computational fluid dynamics (CFD) an area or volume approximation is used to calculate an accurate solution to the NS equations (Wang 2007;Stam 1999; Foster 2001). Particle systems can also be used to create solutions to the NS equations. Examples include smoothed particle hydrodynamics (SPH) and level set methods1.

Real-time wave simulation also has two areas of research: treatment of the water as a 3D volume and treatment of the water as a 2D surface. Previous work using a volume-based approach includes that of Thürey (2007). Because of the reduced computational complexity of the surface simulations, the majority of work for game developers has been in this realm. The technique that treats the wave simulation as a surface was made popular by Tessendorf (2001), and relies on treatment of the surface in the Fourier domain. The corollary to the Tessendorf approach is known as the "sum of sines" (Isidoro 2002; Finch 2004; Lake, Van Drasek III, and Reagin 2005; Lake and Reagin 2005). Most recently, an interactive simulation that includes interaction with floating objects (Yuksel 2007) has been published. Although still simulating only the surface, Yuksel uses a particlebased approach.

Observations made by oceanographers and surf science authors provide data that reveals the behavior of ocean waves. Tessendorf refers to this method as a phenomenological approach. It produces results that work well to reduce the complexity in the simulation.

Our real-time parametric shallow wave simulation was written using DirectX 10 and provides a complete framework for future work on breaking-wave geometry simulations. The approach uses the work of Tessendorf, Finch, and Isidoro for the surface representation and the sum of sines method for generating wave shapes. Each vertex in the water surface mesh is calculated independently from other points in the mesh, which makes our wave simulation a good candidate for parallel workloads.

We begin by presenting the theory behind our wave simulation. Next we describe the approach used to create waves and manipulate their shape as they move into shallow water, and then we give the details of the normal mapping method used to simulate the surface effects. Finally, we provide performance numbers and discuss the results of this simulation.

Theory

The fundamental component for our shallow wave simulation is the sine wave. A parameterized sine function allows control over the wavelength, amplitude, velocity, direction, and steepness of a wave for some point in the mesh at some time step. The inputs for the function are the direction, vertex position, time, amplitude, velocity, water depth, wavelength, wavelength variance tolerance, steepness, and steepness variance tolerance. The function returns a height value that is used to displace the z dimension of the water surface mesh. We summarize our approach, adopted from Finch.

It is important for the phase of the wave to remain unchanged from one adjustment to the next. Maintaining a constant phase ensures smooth visual transitions when adjustments are made to the wave. Prior to changing the velocity and wavelength values, the phase is calculated. The inputs for the function that calculates the phase are velocity and wavelength. The output is the phase constant.

As a wave enters shallow water, the wavelength and velocity decreases while the steepness increases. The wavelength will begin to shorten when the depth of the water is less than one half of the wavelength. The inputs for the function that adjusts the wavelength are wavelength and water depth. The output is the adjusted wavelength.

The steepness of the wave is adjusted after the wavelength has been adjusted. In our simulation we chose to adjust the steepness at the same rate as the wavelength, resulting in the two functions looking very similar. The inputs for the function that adjusts the steepness are steepness and water depth. The output is the adjusted steepness.

Now that we have adjusted the height of the vertices in our mesh with the parameterized sine function in equation (1), we need to compute the surface normal to use in our lighting calculations. The surface normal at a given vertex is calculated using differentiation (Finch). Differentiating in the x and y directions gives the rate of change of the surface and becomes the normal at the vertex we are evaluating. These derivations are known as the binormal and the tangent vectors, respectively. The binormal and tangent vectors create a matrix commonly referred to as a "tangent space matrix." The surface normal is multiplied by the tangent space matrix to properly orient it on the surface of the wave.

 
Article Start Page 1 of 5 Next
 
Comments

Jeff Lander
profile image
I respect Adam and his work greatly. However, it is too bad Adam and Intel have taken a software patents out on his wave breaking technique and likely this research as well. Their work has been quite interesting and having done research in the area, I find it very promising for games. However, I would completely ignore their approach, read the wide body of prior art and references on the topic and roll your own. It is not worth the hassle or problems associated with Intel and its software patent machine.

Regarding the patent:
http://www.freepatentsonline.com/y2007/0151336.html

Simon Carless
profile image
Jeff: Although this is a sponsored feature (and therefore the contents are at the advertiser's discretion), we are going to at least ask Intel if they will consider adding information on whether they have applied for a patent for this simulation method - since it obviously affects how people use the article!

Haley Chivers
profile image
Kudos, that a very impressive method. The article is also very well written. I don't claim to know nearly so much about mechanics for wave simulation, but it has always been one of those secret intrigues of mine. Of course, it’s not typically my job to think about these sorts of things (I’m a designer), but it does make me a bit curious. I’ve had a few ideas of my own (though no time to fully implement and try them) and was wondering how much more efficient this method would be in contrast. If someone would take the time to tell me, I’d really appreciate it. It helps me understand a lot more to derail a bad train of thought than to simply learn the components.

Using a simplistic initial wave on a mesh, apply a multiplier for rate constants that are defined inside of shifting radials of influence (as defined by circumstances/design)? With that, using an origin tether for a vertex (as method of defining kinetic decay), define a node along the spline of the first influenced vertex. The node data is saved in the direction along the spline of the initial motion (creating the range), expanding size of influence by kinetic force for its initiation. For each major node, blend at points of interaction the rate modifier of the constant multiplier to determine vertex position change. Introduce secondary influential nodes as constants defined depth for creating swells, wave crashing and threshold points for misting (swell vs crash definition defined by depth threshold). Because after the initial phase all data necessary to create the real-time waves would be there, it would be unnecessary to recalculate the node data until a triggered event (such as wind). You could in turn use the fact the entire thing is based by region definition of multiplier influence to the mesh to create vertex groups by range definitions. In turn, use that in tests at distance to minimize new vertex calculations at long distance, while rendering large visible motion activity. You could render normal values in the same way as listed above (unless that’s part of the patent).

Of course I might be overlooking something blatantly obvious as to why this would operate with terrifying inefficiency (I do that sometimes...I'm designer after-all) but I thought I'd ask. I’d appreciate the lesson if anyone is willing to teach it!

ses ses
profile image
Hi, thanks for the information that you give me presents. I have given this information,
rugs or any community
home decor or any community of people indispensable.
leather lounges or any community of people indispensable.
online auctions or any community of people indispensable.
dune buggy game or any community of people indispensable.


none
 
Comment:
 


Submit Comment