Cube Environment Mapping
Reflections
Real-time reflections have always been difficult to implement with the limitations of current hardware, but Nvidia's GeForce 256 uses cube environment mapping to create practical and accurate real-time reflections. Currently, implementing real-time reflections require complicated software algorithms, and there's a huge performance hit. Ray tracing is probably the best method for creating reflections, but ray tracing is software intensive, and current brute force hardware implementations are prohibitively expensive.
Reflection implementations such as sphere mapping have several drawbacks. Environment mapping samples from a sphere shaped map to create a spherically warped reflection. Sphere mapping does create acceptable reflections, but they're only good from a single orientation and viewpoint. Imagine taking a 2D image and wrapping it around a sphere. You get a warped image and a hole in the back of the sphere. It appears fine if you only look at it from a single calculated viewpoint.
![Nvidia GeForce 256 at IDF [ Sphere mapped sphere @ 498 x 448 ] > View Full-Size in another window.](images/sphere1-s.jpg) Sphere mapped sphere
|
|
![Nvidia GeForce 256 at IDF [ An unsightly hole in the back @ 498 x 448 ] > View Full-Size in another window.](images/sphere2-s.jpg) An unsightly hole in the back
|
|
As you move through a scene, the entire environment map has to be recalculated "on-the-fly," or else the static reflection will start looking inaccurate as you move farther from the original viewpoint.
A better method
The GeForce 256 supports real-time reflections through cube environment mapping. Imagine putting a cube around an object, and taking six 1k x 1k snapshots of the walls from inside the cube. The environment map is created with these six snapshots.
![Nvidia GeForce 256 at IDF [ Cube mapping @ 640 x 291 ] > View Full-Size in another window.](images/cube1-s.jpg) Cube mapping
|
|
![Nvidia GeForce 256 at IDF [ The concept in images @ 640 x 292 ] > View Full-Size in another window.](images/cube2-s.jpg) The concept in images
|
|
Now the environment map has an accurate image of the entire scene around the reflective object. Now you can use a single cube environment map for any viewpoint. There's no need to recalculate the map every time the view changes.
Specular Lighting
Cube environment mapping can also "look up textures given a normal or any application-specified vector, enabling a whole new set of graphical effects." It can be used to create realistic specular lighting highlights such as adding a shiny glow to a vase. "Cube Mapping allows specular lighting lookups against the cube map on a per-pixel basis, enabling seamless specular highlight effects."
Nvidia also states that "cube mapping lighting capabilities are superior to per-pixel Phong shading with an arbitrary number of lights, including extended light sources." Cube mapping sounds great, and we can't wait to see those real-time reflections and specular highlights.