Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Shading
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Distance falloff=== {{multiple image | align = left | total_width = 600 | image1 = 2squares-1.jpg | caption1 = Two boxes rendered with [[OpenGL]] (Note that the color of the two front faces is the same even though one is farther away.) | image2 = 2squares-2.jpg | caption2 = The same model rendered using [[ARRIS CAD]], which implements ''distance falloff'' to make surfaces that are closer to the eye brighter }} {{clear}} Theoretically, two surfaces which are [[Parallel (geometry)|parallel]] are illuminated virtually the same amount from a ''distant'' unblocked light source such as the sun. The distance falloff effect produces images which have more shading and so would be realistic for proximal light sources. The left image doesn't use distance falloff. Notice that the colors on the front faces of the two boxes are ''exactly'' the same. It may appear that there is a slight difference where the two faces directly overlap, but this is an [[optical illusion]] caused by the vertical edge below where the two faces meet. The right image does use distance falloff. Notice that the front face of the closer box is brighter than the front face of the back box. Also, the floor goes from light to dark as it gets farther away. ==== Calculation ==== Distance falloff can be calculated in a number of ways: * ''Power of the distance'' β For a given point at a distance <var>x</var> from the light source, the light intensity received is proportional to {{math|1/<var>x</var><sup><var>n</var></sup>}}. ** ''None'' ({{math|<var>n</var> {{=}} 0}}) β The light intensity received is the same regardless of the distance between the point and the light source. ** ''Linear'' ({{math|<var>n</var> {{=}} 1}}) β For a given point at a distance <var>x</var> from the light source, the light intensity received is proportional to {{math|1/<var>x</var>}}. ** ''Quadratic'' ({{math|<var>n</var> {{=}} 2}}) β This is how light intensity decreases in reality if the light has a free path (i.e. no [[fog]] or any other thing in the air that can [[Absorption (electromagnetic radiation)|absorb]] or [[Scattering#Electromagnetics|scatter]] the light). For a given point at a distance <var>x</var> from the light source, the light intensity received is proportional to {{math|1/<var>x</var><sup>2</sup>}}. * Any number of other [[Function (mathematics)|mathematical functions]] may also be used.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)