RE: [Algorithms] water caustics
Brought to you by:
vexxed72
|
From: Jason M. (A. Technologies) <v-j...@mi...> - 2000-08-10 15:58:56
|
We use projective caustic maps in the Radeon's Ark demo (ships on the
Radeon end-user CD and has screenshots in the new GP Gems book if you're
interested) in the fish tanks. There is one static caustic map and it is
used twice (two slightly different projections) with multitexturing. After
the projection, the maps are scrolled, twisted and scaled over time to
taste. Naturally, the two textures are scrolled/rotated in different ways.
The great thing about the projective nature of the texture coordinate
assignment (as opposed to the DX SDK dolphin sample which uses essentially a
parallel projection) is that you can simulate the "tight" caustic details in
the shallow water and the more diffused patterns you get in deeper areas.
(IIRC, Mark Watt has a SIGGRAPH 1990 paper on doing this "right.")
The new MS water sample which was used at the XBox launch and appears on
the DX8 SDK was written by Loren McQuade and uses the actual water surface
simulation to generate a dynamic caustic map as you suggest.
Another issue is projecting onto objects in water (as opposed to the
container itself). The DX SDK dolphin sample takes pain to make sure that
the caustic map does not appear on the under side of the dolphin. While
this looks fine, we neglected this as a first cut in our water tanks and
found that allowing the caustics to project through the animals in our tanks
looked just fine. The caustic maps get modulated with a directional light
from above anyway and the caustics on the underside are diffused enough to
appear to be reflected up from inside the tank.
On a related note, if you've played Zelda on the N64, there is a level
which simulates *reflected* caustics *outside* the water with a scrolling
caustic map. It looks kinda hokey, but I'm sure it's very inexpensive to do
and the level would be less immersive without it.
-Jason
> -----Original Message-----
> From: Charles Bloom [mailto:cb...@cb...]
> Sent: Thursday, August 03, 2000 12:04 PM
> To: gda...@li...
> Subject: [Algorithms] water caustics
>
>
>
> It just occurred to me that this could probably
> be hacked pretty convincingly using projective
> texturing. Any object underwater would just get
> an extra additive pass from a projective texture
> which had some fake caustic lines in it. If you
> wanted to be fancy, you could even use the
> heightmap of your water to draw some caustic
> lines that resembled the crests of the wave
> surface; totally incorrect, but probably great
> looking for games.
>
> --------------------------------------
> Charles Bloom www.cbloom.com
>
>
> _______________________________________________
> GDAlgorithms-list mailing list
> GDA...@li...
> http://lists.sourceforge.net/mailman/listinfo/gdalgorithms-list
>
|