Thursday, November 21, 2013

[Note] Rendering Equation




Differential Solid Angle:
Since light is measured as energy per unit surface area, when we talk about incoming light, we actually mean the amount of light from a small region instead of a beam with single direction.

Differential solid angle is used here for this purpose.
(radius equals to 1 so it's ignored)
it can be treated as a tiny flat region on the unit hemisphere of the object surface element , and because it's tiny and flat, we can assume this region is uniformly illuminated.

The region where the lights come from doesn't have to be on the hemisphere, it can be from some other surface area in the scene. In this case, the differential solid angle formula needs to be changed a bit:

 

 

BRDF:
BRDF is used to describe how much light is reflected. It's defined as a ratio of reflected light in direction Wo to the amount of light hitting the surface element from direction Wi.

if incoming light is from a region on the hemisphere:

dw is the differential solid angle, and remember it's a tiny area that is uniformly illuminated, so we multiply it by Li to get the total amount of light from that region. And because we need to know the amount of light hitting the object surface element, we have to project light from that region onto the surface element. That's where the cosine comes from.

From this BRDF formula, we can get a basic reflection equation:
Lo = BRDF * Li * cos(theta) * dw

if incoming light is from other surface in the scene which mostly is the case, we need to replace the differential solid angle with the one just mentioned above:

 
 

here we get G (geometry factor) =  

so reflection equation becomes Lo = BRDF * Li * G * V * dA
V here stands for visibility between 2 surface points.

OK, all the formulas above are based on one area of light in and one light out. However, in reality, there should be countless lights from every direction contributing to the final reflected light in the direction of an observer. So no doubt, integral !!

 

fr function inside integral is BRDF


Rendering Equation:
Finally time to get the rendering equation!! Basically, we just need to grab the reflection equation above, and add emitted radiance in it because the surface element itself may also be an emitter:

 

No comments:

Post a Comment