GAME JOBS
Contents
Sponsored Feature: Ocean Fog Using Direct3D 10
 
 
Printer-Friendly VersionPrinter-Friendly Version
 


Part of:



Latest Jobs
spacer View All     Post a Job     RSS spacer
 
June 20, 2013
 
High Moon / Activision
Texture Artist
 
Insomniac Games
FX Artist
 
2K Marin
Lead Network Programmer - 2K Marin
 
Bluepoint Games, Inc.
Senior Graphics Programmer
 
2K Marin
Lead AI Programmer - 2K Marin
 
2K China
2K Concept Artist - 2K China
spacer
Latest Blogs
spacer View All     Post     RSS spacer
 
June 20, 2013
 
Skills Needed to Become a Game Artist
 
What To Do When A Game Studio Isn't Responding To Your Emails
 
Finding Game Studios Near You
 
How to Go From Game Programming Beginner to Expert
 
The Red Herring of Real-Life Landmarks
spacer
About
spacer Editor-In-Chief:
Kris Graft
Blog Director:
Christian Nutt
Senior Contributing Editor:
Brandon Sheffield
News Editors:
Mike Rose, Kris Ligman
Editors-At-Large:
Leigh Alexander, Chris Morris
Advertising:
Jennifer Sulik
Recruitment:
Gina Gross
Education:
Gillian Crowley
 
Contact Gamasutra
 
Report a Problem
 
Submit News
 
Comment Guidelines
 
Blogging Guidelines
Sponsor
Features
  Sponsored Feature: Ocean Fog Using Direct3D 10
by Jeff Andrews & Chuck Desylva,Alfredo Giminez [Programming, Visual Computing]
4 comments Share on Twitter Share on Facebook RSS
 
 
June 11, 2009 Article Start Page 1 of 3 Next
 

[In this new Intel-sponsored feature from the Visual Computing microsite, a trio of Intel engineers showcase an experiment to create an ocean and complex fog effects using Direct3D 10 and Shader Model 4.0, complete with freely available source code and executable demo.]

Introduction

The purpose of this project was to investigate how we could effectively render a realistic ocean scene on differing graphics solutions while trying to provide a current working class set of data to the graphics community.

Given the complexities involved with rendering an ocean as well as fog effects we chose to start by using a projected grid concept, because of its realistic qualities, as our baseline.

We then ported the original Direct3D 9 code to Direct3D 10 and also ported the additional effects we needed to convert to Shader Model 4.0. In doing so we took advantage of a great opportunity to learn about an interesting subject (the projected grid) while adding many more nuances to it.

In addition to determining how best to work with this complex system under a DirectX10 scenario, we also wanted to know what would be required to achieve reasonable frame rates on both low- and high-cost graphics solutions.


During this endeavor we learned much about how to offload certain computations to the CPU versus the GPU, as well as when and where those compute cycles would be the most beneficial, both on high-end and low-end graphics solutions. For example, on the CPU front, using the Intel Compiler (version 10.1), we were able to gain an easy 10+ fps on our CPU-side computations (to generate fog and approximate wave movement).

Projected Grid Ocean

The basic concept behind the projected grid ocean is a regular discretized xz-plane that is displayed orthogonally to the viewer in world space. The vertices of this grid are then displaced using a height field. The height field is a product of two variables, which return the height value as specified by the following equation:

This method has proven very useful for generating a virtual large body of water.

The Perlin noise computation for generating the wave motion uses four textures of varying granularity called "octaves" to animate the grid in three dimensions. We chose this method to generate wave noise over other functions, such as Navier-Stokes, because it was less compute intensive on the CPU. The GPU-side Navier-Stokes implementation was not used, but it is worth further investigation. For reflections and refractions the algorithm uses derivations of Snell's function.

To further add realism to the scene we restricted the height of the camera on the y axis so that the illusion of ocean vastness could be maintained.

For a detailed description of this method, refer to Claes Johanson's Master Thesis.1

---

1 Johanson, Claes. "Real-time water rendering-introducing the projected grid concept." Master of Science thesis in computer graphics, March 2004. http://graphics.cs.lth.se/theses/projects/projgrid/, http://graphics.cs.lth.se/theses/projects/projgrid/projgrid-hq.pdf (PDF)

 
Article Start Page 1 of 3 Next
 
Top Stories

image
Microsoft pulls big 180 with Xbox One DRM policy reversal
image
Postmortem - Sony Santa Monica's God of War: Ascension
image
Automated testing the BioWare way
image
GDC Next's first talks: Disney, thatgamecompany, Google, Adam Orth
Comments

Jeromie Walters
profile image
Perhaps a video link or screenshot for those of us who would like to see it but still have Windows XP and cannot download the DirectX 10 runtime? Otherwise awesome article, enjoyed the read and just wish I could see it all in action! :)

David Paull
profile image
How can you have a article like this without pictures?

Simon Carless
profile image
We've added some screenshots, thanks - the original white paper this was taken from didn't have any, but Intel dug some up for us.

Jeromie Walters
profile image
Wow, screens look awesome! Thanks for adding the pics!


none
 
Comment:
 




UBM Tech