- Absorption: follows Beer Law
$\\sigma_a$ is the absoprtion coefficient
$T$ is the transmittence, like transparency?
- therefore, the light intensity after a distance is $Light\space Source * T$
- $(background\space color + lightsource \space color)*transparency$
sample_transparency
refers to the transmittence of the light at that one point on the camera ray takes to travel along the camera ray to go back to the camera. transparency
refers to the total transmittance on the scale of the whole camera ray (refer to the plain pink ball example). By Beer Law, $e^{-distance_{total}\sigma_a} = e^{-(distance_1+distance_2+…)\sigma_a} = e^{-distance_1*\sigma_a}e^{-distance_2\sigma_a}*…$, so at the end only background color is multiplied with the total transparency. For result, each sample has been multipled by the sample_transparency
light_attenuation
refers the distance that the light source travels to get to the camera ray
- For each sample, accumulate light as if the sample is the whole box, light travel from back of the sample to the front of the sample
- absorption and out scatter are the two main source of why light is diminishing, and out scattering is also governed by Beer’s Law, so $\sigma_a + \sigma_t$ (the out scattering). $\sigma_s$, the coefficient for in-scattering, should be multiplied by the light source to account for the increase in light received.
- Phase function: how much light is scattered for a particular viewing direction and $w_{in}$
- phase function models the angular distribution of light (or radiance) scattered.
- sum to 1 over all viewing direction
- Multiply with the light intensity from the sun to the camera ray
- Russian Roulette on integration
Atmospheric scattering
- $L_{sun}(X) = Sun\space intensity * T(X, P_s) * P(V, L) * \beta_s(h)$
- $T$ is from Beer Lambert, just for transmittence
- $P$ is from phase function of Rayleigh, accounting for the amount of light scattered in the viewing direction based on the light direction and the view direction
- $\beta_s$, scattering coefficient for rayleigh
- for atmospheric scattering, the reason why we’re using this equation is because for transmittence, we’re calculating how much transmittence is from X to the camera location. For Rayleigh, scattering coefficient is a function of height. So for each height, we calculate the corresponding scattering coefficient by referencing with the scattering at sea level $\beta_e(0)$. So what’s inside the summation is referred to as optical depth. It’s essentially the same thing as the simple backward ray marching, except that for each sample, the scattering coefficient is different (because the height is different), so we calculate a different transmittence at each sample, and then sum them up.
- when integrating along the camera ray , only account for transmittence