NVIDIA Demo: Clear SailingMaking Of
Detail Oriented
In creating Clear Sailing, the artists and engineers looked at plenty of other media for reference, including of the 2003 movie releases, Pirates of the Caribbean: The Curse of the Black Pearl and Master and Commander: The Far Side of the World. While d’Eon was quick to point out that nothing was “stolen” from those sources, the team did get some great ideas—along with a realization of the challenges they would be facing, and a fresh outlook on how those hurdles could best be lept in the demo.

“The main thing is just getting believable water. Water is a standard difficult problem that people solve incrementally over time,” Demers explained. “We’ve done lots of wave demos and people have done splashing, but getting something that, especially in real time, looks anything like the ocean, I don’t think anyone’s really gotten there. People have done a lot of sliding 2D texture techniques and stuff like that. Our goal was to do really good-looking water with lots of visual complexity—to get the foam and the spray and the waves out to the horizon.”
Demers then described in more detailed terms how the demo is lessening the work the GPU (graphics processing unit) has to do by “only tessellating vertices that are inside what’s called the ‘view frustrum’— basically, the stuff that you can see on the screen.” The process gives the demo’s programming a level of efficiency by calculating only what the viewer will be shown—however, even that brings up its own quirks in the increasingly complex world of computer-generated graphics.
“People have done stuff like this before, where there’s sort of a fixed grid in world space that you can tessellate different amounts based on how close it is to you, and then you can throw away the tiles that you don’t see, but you always get a half a tile here that you have to draw,

or a three-quarter of a tile there that you have to draw, even though only a quarter or half are visible,” Demers stated. “If I dial down the height of the waves so that they’re completely flat, you’ll actually see this sort of uniform grid on the screen. Normally, you’d see grids that are aligned to the world; this one is actually aligned to your screen itself. If you rotate left or right, all of these vertices are sliding along the actual wave surface.”
“It makes a lot of other things really tricky in terms of storing information—those points are always moving away from where they used to be, so it’s really hard to do stuff like that. You can throw a lot of vertices at the problem, they’re in this nice uniform grid that draws really well and then when you actually do get something on the screen, all the vertices are being used, so you get a fair amount of efficiency out of it, which is kind of nice. When you look out, you can see water up close next to the ship and all the way out to the horizon. Frequently, drawing to the horizon is very difficult to do.”
While the water accounts for a good portion of the engineering that went into the demo, it obviously doesn’t stop there, because there’s considerable detail in the ship, in addition to complex scene changes with respect to the lighting and the objects.

The GeForce 6800 GPU handles all of these details and other cinematic touches amply in several rendering passes, improving the depiction of the final image for the viewer. Demers said that among the chores the GPU is given during the demo are bump-mapping; environmental lighting; diffuse and specular cube maps, both rendered based on reflection angle and in the normal direction; as well as a standard single solar-light cube with shadows generated based on it. Demers also detailed an “ambient occlusion turn where we just baked off, for every given point in the scene, how much of the sky hemisphere you can see. If you can only see half of the sky hemisphere, you get a 50% occlusion level, whereas if you can see the entire sky hemisphere, you get a 0% occlusion level.”
There’s also a subtle visual effect that increases the scene’s realism, though it probably won’t be apparent to the average viewer. It’s part of what our eyes see in the real world—how we perceive a collision of light and objects. Demers described it as “high dynamic range, overbright-blur kind of stuff, so if you see the boat being silhouetted by the sky, the sky will blur over the top of the mast and the boat, and creep in a little bit over the edges of the sails and the hull.”