Transmitting and Reflecting Light

[ LiB ]

Transmitting and Reflecting Light

The transmission and reflection of light to other surfaces can be broken into two simple categories, specular and diffuse. The movement of light to other surfaces in a scene from the point of intersection can be random, bent, or straight. In the case of photons , the power of a mirror-reflected photon is scaled by the material's specular coefficient. The transmission of light through the object is scaled by the object's opacity. The diffuse interaction and reflection of light are based on the material's diffuse coefficient. The next section takes a closer look at the reflection/transmission effects that must be simulated using photon tracing.

Diffuse Interaction and Reflection

Diffuse interaction and reflection are induced by a material's diffuse coefficient. Diffuse interaction and reflection is responsible for most of the light you observe with your eyes. When a photon interacts with a diffuse surface, it is stored in the photon map at the point of intersection and is reflected as well. Because diffuse light can randomly scatter to nearby objects in the scene, as in radiosity, you have to randomly reflect diffuse photons. Because it's a reflection effect, a new photon is yielded to randomly reflect the light in some particular direction. The direction of the reflected photon can be arbitrary from the point of intersection. You can determine the power of the new reflected pho-ton by scaling the incoming photon with the diffuse reflectance coefficient of the material. The code for performing diffuse reflection is from Chapter 3.

Specular Reflection

Specular reflections are induced by a material's specular coefficient. If a pho- ton interacts with a specular surface, one of two things can happen:

  • The photon can be reflected in the mirror direction.

  • The photon can refract in or out of the object.

Mirror Reflections

When light is incident on a perfect specular surface such as a mirror it is reflected in the opposite direction. This means that a new photon should be reflected the same way. See Figure 11.11 for an example mirror reflections.

Figure 11.11. An example of specular (or mirror) reflection of a photon interact ing a surface.

graphic/11fig11.gif


The formula for perfect specular reflection is used as in ray tracing. But instead of reflecting a ray in the opposite direction, a reflected photon is traced. The specular coefficient must also be taken into account when specu-larly reflecting a photon. If the surface were a mirror, the outgoing photon is equal to the same power of the incoming photon because the surface has very few imperfections. Recall that photons are not stored when they encounter specular surfaces; photons are only stored on diffuse surfaces. A photon can be specularly reflected multiple times by specular surfaces but is only recorded in the photon map when it finally intersects a diffuse surface.

Refraction

Recall that objects that are transparent allow light to pass (or transmit) through them. When light changes between two mediums, the speed of the light normally slows. It may also bend in order to travel to its destination. Figure 11.12 shows an example of refraction. In the case of light (a series of photons) changing mediums (such as from air into the object), the photons will travel through the object and will bend to an angle specific to the object. The new location of a refracted photon is based on the index of refraction.

Figure 11.12. Refraction of a photon changing mediums as it leaves air and travels into an object and then back out from some arbitrary direction.

graphic/11fig12.gif


NOTE

NOTE

All the effects such as diffuse interaction,diffuse reflection,specular mirror reflection,and refraction are available in photon mapping.

[ LiB ]


Focus On Photon Mapping
Focus On Photon Mapping (Premier Press Game Development)
ISBN: 1592000088
EAN: 2147483647
Year: 2005
Pages: 128
Authors: Marlon John

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net