< Zurück | Inhalt | Weiter >


The SPHERE_MAP mode is very different from the OBJECT_LINEAR or EYE_LINEAR modes in that it always generates 2D (s,t) texture coordinates irrespective of any mapping planes passed to the TexCoordGeneration constructor.

The SPHERE_MAP mode calculates texture coordinates based on the vector passing from the origin (in world coordinates) to a vertex. It creates a mapping that essentially paints an environment map onto the face of an object. Imagine that the object was a reflective sphere positioned in the center of a room. If the SPHERE_MAP texture coordinate generation mode was used, the sphere would appear to reflex the items within the room. By precomputing a spherical texture map using a ray−tracing program and using the SPHERE_MAP texture mode, a photorealistic reflective object can be created.