
                    REFLECTION MAPPING

This technique allows to render quite realistic reflecting 
surfaces in a very short time provided you have got a
textured polygon routine. The idea is to use the normal 
vector at each vertex of the surface for generating texture
domain coordinates. The U,V texture coordinates are set to
the projection of the normal vector on a given plane. In
'rotate', I use a plane parallel to the screen in order
to speed-up calculations. The choice of a texture image 
dramatically affects the quality of resulting image.

Here are a few tricks for generating image maps:

An image map must have highlights and some shapes, as if the
object was reflecting "something". 3DS's 'refmap.tga' can be
a good starting point for generating image maps by hand. 
It is important to know that only a circular portion of the
image will be taken into account, so there is no need to
draw details in the corners.
Another method is the one I have used with 'sunset2.tga' :
Start from an image that has the right colors, that is
contrasted enough, and that has highlights (a sunset image
is quite a good candidate), map it on a sphere using 
'rotate', rotate the sphere until the highlight is far
away from the center of the image. Capture the image with
'xv'. 'crop' the image, and resize it to a power of two.
Save it to a '.tga' form using the '24 bit Targa' format.
Another solution is to raytrace a reflection map using
'povray' for instance. This is what I have done for
'raytrace.tga'. I think that this result can be improved.
You can use 'pov/raytrace.pov' as a starting point.
As colors are not interpolated between texels, it may be
a good idea to prefilter the maps using the 'blur' command
of 'xv'.

Have fun !
