Re: [Plib-devel] Q2: Water
Brought to you by:
sjbaker
From: Steve B. <sjb...@ai...> - 2000-05-08 23:28:05
|
"Vallevand, Mark K" wrote: > > Any suggestions for implementing water on a terrain using SSG? > > Right now, I have water implemented as textured triangle strips on a > 'sea-level' plain, and also adjust the fog when the camera is underwater. Yep - that's more or less what I've done in Tux_AQFH - except that since I had plenty of pixel fill to spare, I just made the water one *HUGE* quadrilateral that runs under all of the terrain and only shows through where the terrain drops below zero altitude. It's not great for a couple of reasons: 1) You can look down into the water and see the bottom just as clearly as the sides. But once you are in the water, you can't see as far as you could from above. It's hard to fix that - but fortunately, nobody seems to notice! 2) Very gently sloping 'beaches' tend to Z-fight with the water surface. That would happen no matter what you did - but it's worse when the water runs under the ground. > The terrain and water are just allowed to intersect each other without > any adjustments, cutouts, etc. This works pretty well except for some > artifacting when viewed from a distance. Flying along the terrain is > rather nice. > > But, there may be a better way to do this. Bump-mapping looks really great on water - especially if you do some texture animation tricks to make fake waves in the bump map. -- Steve Baker http://web2.airmail.net/sjbaker1 sjb...@ai... (home) http://www.woodsoup.org/~sbaker sj...@ht... (work) |