Thursday, October 20, 2005

I've soiled my demo, how embarrasing

I added Jeff's water to our terrain demo today, looks awesome. We have an animated normal map for the reflection and refraction, fresnel falloff of reflection, and underwater murk. The murk is pretty cool, it's what Half Life 2 did for their water. It's kind of like fog with a clipping plane for the water surface. The more water you are looking through, the murkier objects under it seem. Doesn't sound like much but the effect is great. It makes for very nice shore lines that gradually fade to dark water.

We are having performance problems with nVidia cards specifically though. OpenGL lets you define up to six arbitrary clip planes to limit rasterization. Apparently clip planes are not widely used however, so certain vendors (*ahem*) cut corners in their implementation.

GeForce boards have never had true support for clip planes, instead they used to be emulated through some texture units (somehow) and now it appears a part of the vertex program pipeline is used. Using both vertex programs and clip planes on even the newest GeForce boards causes a massive performance hit. We think something is falling back to software.

We're also rendering the scene to a floating-point frame buffer, so our reflections are HDR and it really shows. I am however going to rip on graphics drivers some more: stencil buffers don't work with frame buffer objects! Everyone on opengl.org is complaining about it too, so I know I'm not alone in thinking it bites.

We also have the ability to throw normal mapped, circular ripples on top of the water surface for bullet effects, floating objects, etc. I don't have it integrated with the demo so no screenshots yet, but it looks pretty cool in action.

For more screenshots of the most advanced golf course rendering system in existence, check out this.

Oh yeah and buy this book, I wrote the HDR lighting chapter in it.

1 Comments:

Anonymous Anonymous said...

Damned impressive. Now I know what you guys can _really_ produce if you're working 40hr/wk.

12:57 AM  

Post a Comment

<< Home