Water rendering

Started by
2 comments, last by Burnt_Fyr 8 years, 5 months ago

Hi! The subject of my coursework is "realistic water rendering". I'd like to know different methods of water rendering in real time. I want to learn mathematical and physical substantiation of this problem and features of DirectX API. What literature can you recommend?

Advertisement

Most of the ocean water rendering you see today in movies or games is a derivative of the Tessendorf work, first seen in Titanic. Short version, it involves summing up various octaves of noise to come up with something that follows the same general structure of ocean waves in terms of geometry and normals. Once you've learned what this particular technique looks like, you will see it everywhere. For a more modern, game centric approach, you can look to Assassin's Creed.

As a high level overview: the first challenge is generating water that is geometrically plausible. Tessendorf covers this for deep ocean environments but isn't appropriate for shallow water or shorelines. In simple cases you can actually skip the geometric generation entirely, but you'll never get a truly convincing look without it. There's a fair bit of work on doing full blown fluid simulation models for water in more contained conditions. Most of the realtime-useful ones are based on smoothed-particle hydrodynamics (SPH). A search for "SPH water" should produce plenty of results.

Next step is the core shading work. At its heart this simply involves computing reflection and refraction components, sampling textures for both of those components, and putting it together with a BRDF specular model. The reflection and refraction components are both fundamentally functions of V and N, which means that you can get away without any geometric generation just by moving normal maps across the surface and sampling them, then blending using the fresnel term. This will fall apart at oblique viewing angles but works reasonably well at sharper viewing angles or longer viewing distances. The lighting model can be as trivial as Blinn-Phong specular with a ludicrously high specular power, but you'll see good visual benefits to using a proper physically based BRDF. C/LEAN mapping will do a lot to clean up the aliasing or roughness inconsistencies that will occur from a surface with such high frequency detail. That sparkling specular effect at the tips of the waves is the key of what makes water rendering work visually. Subsurface scattering also adds a lot of visual punch.

The last step is "embellishments". Sea foam, splashes, edge effects, etc. These do a lot to add presence and a sense of reality to the water, rather than having it simply slice through surfaces. I don't have a lot of information on this part, unfortunately. The Assassin's Creed paper does cover some of it.

While that's not comprehensive, it does provide the core elements you'll need and plenty to start on. IMO the easiest thing to do is render a gigantic flat plane, tile octaves of noise from a normal map across it, render the refraction with a clip plane and render to texture, use a stock skybox for the reflection, and get the basic fresnel blend and lighting correct. It's much easier to start doing the fancy stuff once you have that skeleton to work with.

SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.

Damn. That's almost an article-worthy "water rendering 101" right there.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

Damn. That's almost an article-worthy "water rendering 101" right there.

I think the same, and actually just followed this thread so i can digest Promit's excellent reply when i have more time

This topic is closed to new replies.

Advertisement