# Not understanding the lighting equation for volumetric cloud rendering

I've been looking The Real-time Volumetric Cloudscapes of Horizon-Zero Dawn, but I'm very confused by a few terms.

The presentation mentions "The Henyey-Greenstein phase function" on page 54, however does not mention how it is used nor what parameters are needed for it. In fact they act like it is a constant, but it doesn't appear as if it is. I've seen a couple different formulations of the same equation, and I don't understand how to use it. If theta corresponds to the scattering angle, I'm not sure what actually constitutes the scattering angle in our rendering. Is it the initial ray march angle, or light source marching angle? If theta corresponds to the light source march angle, that would be confusing since there isn't just one angle, there are 6 that they randomly select in a cone progressively further out according to page 83.

Additionally the final equation used on page 77 is e^(-d*r)*HG*P. Where I assume P is powder equation (1.0 - e^(-d *2)), HG is Henyey-Greenstein, and where d corresponds with "depth", but normally combines both depth and density and where it looks like r is "absorption increasing for rain clouds" otherwise it just came out of nowhere.

I'm further confused by how they use the equations, they seem to sample alpha with forward marching, then sample energy with the light cone/ light direction marching. The lack of a separate depth and density coefficient is what is concerning.

Going off of the presentation and other sources, my perception of the approach is as follows (ignoring the optimizations of the coarse steps, the fine grained steps, and the cone method for shadow marching):

• Forward march with a fixed size until you have a non zero density.

• Then march in the direction of the light accumulating the density values at each step.

• plugin this summed density into the equation as d, e^(-d*r)*HG*(1.0 - e^(-d *2))

• multiply this product by our current forward marched density

• multiply this value by some sort of transmittance value which is a function of how much "stuff" we've gone through in our cloud.

• return this value of transmittance, and the value of the light intensity as our final result, transmittance will represent our alpha in some form (either as the actual value, or 1.0 - transmittance) with range 0.0 to 1.0.

Are these steps correct and what does theta correspond to for this application in Henyey-Greenstein HG and which form of the HG equation do I need to use?

• theta is the angle between the view vector and the light vector. In volume rendering Henyey-Greenstein its used to describe the probability of forward scattering, isometric scattering, or backward scattering – Nadir Apr 11 '18 at 23:26
• @Nadir, but then what version of the equation is used? Additionally they use that wierd conal sampling and accumulate to a single value, and they use it as if its one angle then? – whn Apr 12 '18 at 18:14
• sorry for the delay, I recently implemented this clouds. The equation used is the standard equation (1) which you can find here astro.umd.edu/~jph/HG_note.pdf . About the cone sampling, the only angle used is that between the raymarch direction and the light vector at the point you start cone-sampling – Nadir May 25 '18 at 17:08