Environment Mapping and Shadows
Environment Mapping
We first saw environment mapping during NVIDIA's GeForce 256 launch. Environment mapping is used to add reflections that mirror the environment to an object. Confused? Okay, picture a shiny metal ball sitting in the middle of a room in front of a couch. If your viewpoint is between the sphere and the couch, you should be able to see a reflection of the couch on the sphere. In addition, you should also be able to see a reflection of the floor and the ceiling in the sphere. Environment mapping will allow developers to add these types of reflections to objects.
Both Pixel Tapestry and the GeForce have support for cube environment mapping. Basically, you take the images from the six sides of a cube surrounding an object, and apply those images to the object to create an accurate reflection of the entire room. Fill rate and memory requirements make cube environment mapping unwieldy, but it's a cool effect nonetheless.
![GDC 2000 ATI [ Dual-paraboloid @ 472 x 584 ] > View Full-Size in another window.](images/dualparab-s.gif) Dual-paraboloid
|
In addition to Cube Environment Mapping, Pixel Tapestry also supports spherical and dual-paraboloid environment mapping. You can check out our description of spherical environment mapping here. Dual-paraboloid environment mapping uses two texture maps, one for the front and another for the back, so you don't have to worry about having a gaping hole in the back of an object as with the drawback in the spherical method.
Priority Buffer
A priority buffer is kind of like a z-buffer for polygons instead of pixels. "A priority buffer stores polygons and/or objects according to priority, which is determined by how close the object is to the viewpoint. The closest object or polygon would be assigned a value of 1 in the priority buffer, the next closest a value of 2, and so on." Why is this important? Shadows, my friend, the shadows are everywhere…
![GDC 2000 ATI [ Shadows @ 623 x 469 ] > View Full-Size in another window.](images/shadows-s.gif) Shadows
|
"Using a light source as a viewpoint, a scene is rendered to a priority buffer so that the closest shadow casting object has the highest priority, the next closest has the second-highest priority, and so on. Background objects that do not cast shadows have the lowest priority. A shadow texture is then generated by rendering silhouettes of each shadow casting object, in the order defined by the priority buffer. Finally, the shadow texture is projected on to the scene from the light source." Nice, huh? ATI was quick to point out that characters will be able to cast shadows on themselves. The shadow of an arm will be able to fall on the leg.