|
|
Line 1: |
Line 1: |
| In [[computer graphics]], '''sphere mapping''' (or '''spherical environment mapping''') is a type of [[reflection mapping]] that approximates reflective surfaces by considering the environment to be an infinitely far-away spherical wall. This environment is stored as a texture depicting what a mirrored sphere would look like if it were placed into the environment, using an [[orthographic projection]] (as opposed to one with [[perspective (graphical)|perspective]]). This texture contains reflective data for the entire environment, except for the spot directly behind the sphere. (For one example of such an object, see Escher's drawing [[Hand with Reflecting Sphere]].)
| | I'm Federico (18) from Mannheim Schonau, Germany. <br>I'm learning Swedish literature at a local high school and I'm just about to graduate.<br>I have a part time job in a the office.<br><br>my web blog: [http://www.caliberid.com/surl/backupplugin53567 wordpress backup] |
| | |
| To use this data, the [[surface normal]] of the object, view direction from the object to the camera, and/or reflected direction from the object to the environment is used to calculate a texture coordinate to look up in the aforementioned texture map. The result appears like the environment is reflected in the surface of the object that is being rendered.
| |
| | |
| == Usage example ==
| |
| In the simplest case for generating texture coordinates, suppose:
| |
| * The map has been created as above, looking at the sphere along the z-axis.
| |
| * The texture coordinate of the center of the map is (0,0), and the sphere's image has radius 1.
| |
| * We are rendering an image in the same exact situation as the sphere, but the sphere has been replaced with a reflective object.
| |
| * The image being created is orthographic, or the viewer is infinitely far away, so that the view direction does not change as one moves across the image.
| |
| At texture coordinate <math>(x,y)</math>, note that the depicted location on the sphere is <math>(x,y,z)</math> (where z is <math>\sqrt{1 - x^2 - y^2}</math>), and the normal at that location is also <math><x,y,z></math>. However, we are given the reverse task (a normal for which we need to produce a texture map coordinate). So the texture coordinate corresponding to normal <math><x,y,z></math> is <math>(x,y)</math>.
| |
| | |
| == See also ==
| |
| * [[Cube mapping]]
| |
| * [[Skybox (video games)]]
| |
| * [[Reflection mapping]]
| |
| * [[HEALPix]], mapping with little distortion, arbitrary precision, and equal-sized fragments
| |
| | |
| [[Category:Texture mapping]]
| |
| | |
| {{compu-graphics-stub}}
| |
I'm Federico (18) from Mannheim Schonau, Germany.
I'm learning Swedish literature at a local high school and I'm just about to graduate.
I have a part time job in a the office.
my web blog: wordpress backup