Re: [Plib-devel] Q2: Water
Brought to you by:
sjbaker
From: Steve B. <sjb...@ai...> - 2000-05-15 02:38:30
|
Chris Purnell wrote: > > On Mon, May 08, 2000 at 06:30:58PM -0500, Steve Baker wrote: > > > 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! > > People notice, they just don't say anything because commercial games > are still doing this very badly. They are used to water that appears > crystal clear from above then turns murky when entered. And the other > extreme where it is hard to see what's below the surface but when you > enter the water everything lights up a funny colour. > > They way I'd do it is by calcutaing how much water there is between > the camera and the object on a per vertex basis. This would be easy > for the configuation in tux_aqfh. I'd have a colourless surface > texture and no changes in the way the scene is lit, coloured or > fogged when the camera enters or leaves the water. There is a problem with that though. Even if you know how much fog is between the eye and the camera, it's hard to do anything about that unless your OpenGL supports the vertex-fog-range extension. Failing that, you need a multi-pass technique. -- Steve Baker http://web2.airmail.net/sjbaker1 sjb...@ai... (home) http://www.woodsoup.org/~sbaker sj...@ht... (work) |