RE: [Algorithms] Water and RGB
Brought to you by:
vexxed72
From: Bretton W. <bre...@mi...> - 2001-04-30 22:05:43
|
I have the absorption factors by frequency, which you would have to convert to RGB, probably via an XYZ conversion. I could supply you with code for this as well. Please reply privately if you are interested. Roughly speaking, water absorbs red quite rapidly, reducing it to near 0 in only 10 meters of clean water. Blue transmits much more readily. The absorption spectrum is similar, but not identical to, a 10,000K blackbody emission spectrum. There are several good sources on light transport in water, including ones which model scattering due to detritus and plankton in seawater. The best one I found was the Handbook of Optics, which you'll almost certainly have to go to a university library to find. The problem I think you'll run into is that in order to do it "right", you'll have to integrate along the ray through the volume of water (as you say, assume you want uniform water and you can do that pretty simply relative to the distance), but you'll have to do it on a wavelength dependant basis, converting the color after you do the attenuation. Just doing it in RGB space looks terrible, but you might be able to do something reasonable with just 5 or 6 spectral samples. I'll bet you could make a pretty good shader using a depth buffer as input... -- Noz Moe King (aka Bretton Wade) =20 > It's my understanding that water absorbs or reflects different > frequencies of light, and I'm hoping to use this information to attenuate > lighting in underwater environments based on the distance the light must > travel through the water. I'm hoping to find some information on how much > red, green, and blue light are absorbed by water, and at what rate > (linear, > exponential?). Anyone know where I can find some info on this? More > generally, I'm interested in the color absorption of a variety of > light-passing media. |