# Rendering Natural Waters

This topic is 3835 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I am currently trying code water color equations from [S. Premoze and M. Ashikhmin / Rendering Natural Waters] : http://citeseer.ist.psu.edu/cache/papers/cs/26265/http:zSzzSzwww.cs.sunysb.eduzSz~ashzSzwaterCGF.pdf/premoze01rendering.pdf but resulting color doesn't look like ocean color. First, i use Kd (Diffuse attenuation coefﬁcient for downwelling irradiance) and b at λ0 = 514 nm (Total scattering coefﬁcient) for water Type I. I use 3 samples from the spectrum at R(650nm) G(570nm) B (475nm). // 3 samples from spectrum float3 Lambda = float3( 650, 570, 475 ); // from table 2 for water type I float3 Kd = float3( 36, 8.9, 1.8 ); // Absorption coefficient float3 aL = Kd; // Total scattering coefficient b at lambda = 514 nm for water type I // from table 3 float bL0 = 0.037; // we get b(lambda) from b(lambda0) float m = -0.00113; float i = 1.62517; // Total scattering coefficient float3 bL = bL0 * ( m * Lambda + i ) / ( m * 514 + i ); // we get bb(lambda) from b(lambda) // Backscattering coefficient float3 bbL = 0.01829 * bL + 0.00006; // Beam attenuation coefficient float3 c = aL + bL; Next, i use equation (21) to get water color. My viewer is always above water surface. L(0,θ,φ) = L(Z,θ,φ) e(−cR) + Ldf(0)(1 − e((−c+Kd cos θ)R)) Ldf(0) comes from a HDR sky cubemap value range from [0.2-1.6]. For R = -Z / cos theta, i use Z & theta as draw in figure below. For L(Z,θ,φ) i use 1.0 . Ray AC is the refraction ray. Any suggestion, explanation on equations or working piece of code is welcome. thx

1. 1
2. 2
3. 3
Rutin
15
4. 4
5. 5

• 10
• 9
• 9
• 11
• 11
• ### Forum Statistics

• Total Topics
633680
• Total Posts
3013304
×