Monday, December 11, 2017

12/6/17 MATH / BLOG

Recently, I've been tinkering with Unreal Engine 4's built in lighting and rendering, trying to get a nice looking product. A lot of math goes into the lighting, and there are several variables that you can change. First of all, I believe the most important thing is the light falloff. The light falloff is defined as "the rate at which light loses its energy as it travels away from its source." The falloff can be separated into two categories, a Falloff Exponent, and an Inverse Square Falloff. The Falloff Exponent is a very simple lighting system that produces a light who's brightness is based on an exponent.
4.1 - Falloff Exponent

The inverse square falloff, however is much closer to reaching realism in lighting. It uses the Inverse-Square Law, which is defined as "The inverse-square law, in physics, is any physical law stating that a specified physical quantity or intensity is inversely proportional to the square of the distance from the source of that physical quantity. " So in lighting, this would mean that the intensity of the light radiating from a point source is inversely proportional to the square of the distance from the source.


4.2 - Inverse Square Falloff

For an example, we have the Intensity of the light (I), the Brightness of the light (P), and the area of a sphere of radius (A, or 4𝝅r²), and the distance(r).



{\displaystyle I={\frac {P}{A}}={\frac {P}{4\pi r^{2}}}.\,}

The intensity decreases (divided by 4) as the distance r is doubled.

No comments:

Post a Comment