Tuesday, February 7

Lighting and Such

A little behind on this one but here goes nothing.  I'm going to do a quick overview of lighting to make sure I know what heck I'm talking about!

Ambient:  An omni-directional light that covers everything around it.  No area has more intensity than others as it is uniform wherever the light hits.  It is based on the diffused lighting parameter multiplied by constant value to determine how much light there is.

Diffuse: Light gets more focused with diffuse, as it can be shone in a certain direction.  There are several rules that help define the properties of diffuse lighting: the illumination falling on a surface and being reflected perpendicularly is relative to the inverse square of the distance between that particular object and where the light is coming from.  The illuminance will always be proportional to cosine of the angle with the normal of whatever object the light is hitting (basically defines the reflection).  When diffuse light travels through an absorbing medium (air, water, etc), then its intensity decreases at an exponential rate from the light source.  

The intensity for diffuse is defined as the intensity of the light source x the constant factor of the light x the angle between the light and a surface normal, which can also be calculated as the dot product between them.  Additionally diffuse lighting can have an attenuation effect by diving by a couple extra parameters in the equation.  This can change the fall-off rate of the light and will change how it looks dramatically.


Specular: This type of lighting is a bit different in that it is dependant on the viewers angle.  The specular highlights will change depending on where the viewer sees the object from.  Specular lighting's equation is fairly similar though; it is the intensity of the light source x a constant factor x cos of the angle between the reflection and the viewer.  Since the angle is between the reflection and the viewer, moving will change how you see the specular highlights.  Certain models like Blinn and Phong's are just specific versions of this kind of lighting, where it will have a certain look based on the equation.

Just combine all these together with the actual emissive light and you get a final result.
 

No comments:

Post a Comment