http://www.opengl.org/resources/code/samples/sig99/advanced99/notes/node156.html
Next: 11.1.0.1 Accelerated Reflection and Up: 11. Scene Realism Previous: 11. Scene Realism
11.1 Reflections and Refractions
In both rendering and interactive computer graphics, substantial effort has been devoted to the modeling of reflected and refracted light. This is not surprising - almost all the light perceived in the world is reflected. This section describes several ways to create the effects of reflection and refraction using OpenGL beginning with a very brief review of the relevant physics. Pointers to more detailed descriptions are provided.
From elementary physics, the angle of reflection of a ray is equal to the angle of incidence of the ray (Figure 52). This property is known as the Law of Reflection [21]. The reflected ray lies in the plane defined by the incident ray and the surface normal.
Refraction is defined as the ``change in the direction of travel as light passes from one medium to another'' [21]. This change in direction is caused by the difference in the speed of light traveling through the two media. The refractivity of a material is characterized by the index of refraction of the material, or the ratio of the speed of light in the material to the speed of light in a vacuum [21].
The direction of a light ray after it passes from one medium to another is computed from the direction of the incident ray, the normal of the surface at the intersection of the incident ray, and the indices of refraction of the two materials. The behavior is shown in Figure 52. The first medium through which the ray passes has an index of refraction n1 and the second has an index of refraction n2. The angle of incidence, , is the angle between the incident ray and the surface normal. The refracted ray forms the angle with the normal. The incident and refracted rays are coplanar. The relationship between the angle of incidence and the angle of refraction is stated as Snell's Law[21]:
(4)
If n1 > n2 (light is passing from a more refractive material to a less refractive material), past some critical angle the incident ray will be bent so far that it will not cross the boundary. This phenomenon is known as total internal reflection and is illustrated in Figure 53 [21].
When a ray hits a surface, some light is reflected off the surface and some is transmitted. The weighting of the transmitted and reflected light is determined by the Fresnel equations.
More details about reflection and refraction can be gleaned from most college physics books. For more details on the reflection and transmission of light from a computer graphics perspective, consult one of several general computer graphics books or books on radiosity or ray tracing [17], [32], [45].
11.1.0.1 Accelerated Reflection and Refraction
11.1.1 Techniques for Rendering Reflections
11.1.2 Planar Reflectors
11.1.2.1 Planar Reflections Using the Stencil Buffer
11.1.2.2 Planar Reflections using Clip Planes
11.1.2.3 Planar Reflections using Texture Mapping
11.1.3 Curved Reflectors
11.1.3.1 Implicit and Extruded Reflectors
11.1.3.2 Arbitrary Curved Reflectors
11.1.3.3 Convex Reflectors
11.1.3.4 Concave Reflectors
11.1.3.5 Reflectors of Mixed Convexity
11.1.3.6 Conclusions and Issues
11.1.4 Refraction
11.1.5 Further Realism
11.1.5.1 Interreflections
11.1.5.2 Blurry Reflection
Next: 11.1.0.1 Accelerated Reflection and Up: 11. Scene Realism Previous: 11. Scene Realism
David Blythe
1999-08-06