A Sphere environment texture uses a single image to store the intensity information for all possible directions. However, in order to create the spherical map, the system actually uses a square texture map. If you consider wrapping a square texture map onto a sphere, you will see an immediate problem; you can’t wrap a whole square onto a sphere and have the side edges match without either shrinking the square image vertically or having a lot of overlap at the poles. This is because the texture map goes 360 degrees around the sphere at the sides, but vertically it only covers the sphere from pole to pole, which is 180 degrees. To overcome this problem, the middle half of the square texture map is used and the information of the top and bottom 1/4 of the map is discarded, as shown in the following illustration.
The best way to create a spherical environment map is to generate a ramp image and then paint objects onto it that avoid the poles and the edges.
Consider the case of the default transformation and an eye point on the positive x-axis looking at the origin. If the spherical environment map is used directly as a background, the edge join will be visible. However, if a surface is viewed that has been reflection mapped, the join will be behind the surface and hardly visible.
Also consider the resolution of spherical reflection maps and how crisp they will appear. The horizontal resolution corresponds to 360 degrees. A 5122 image will have one pixel every 1/2 degree. Flat surfaces that are reflection mapped will appear as blurred indistinct reflections. Higher resolution images may be used, but they are difficult to paint and use a lot of memory. It is better to use rounded geometry instead.
Argument Name | Absolute Range | Useful Range | Default | Description |
image | no default | Name of pix file for reflection maps | ||
flip | 0, 1 | 0 | Flag to indicate whether to swap u, v | |
shear_v | -infinity, infinity | -5, 5 | 0.0 | Change of u for change in v |
shear_u | -infinity, infinity | -5, 5 | 0.0 | Change of v for change in u |
source_texture | no default | Texture to be used as the image |
“Sphere” is an environment texture.