home *** CD-ROM | disk | FTP | other *** search
- The 'material_map' special texture extends the concept of 'image_map' to
- apply to entire textures rather than solid colors. A material_map allows
- you to wrap a 2-D bitmapped texture pattern around your 3-D objects.
-
- Instead of placing a solid color of the image on the shape like an image
- _map, an entire texture is specified based on the index or color of the
- image at that point. You must specify a list of textures to be used like a
- 'texture palette' rather than the usual color palette.
-
- When used with mapped file types such as GIF, the index of the pixel is
- used as an index into the list of textures you supply. For unmapped file
- types such as TGA, the 8-bit value of the red component in the range 0-255
- is used as an index.
-
- If the index of a pixel is greater than the number of textures in your
- list then the index is taken modulo N where N is the length of your list of
- textures.
-
- The syntax for material_map is:
- texture {
- material_map {
- FILE_TYPE 'filename'
- MODIFIERS...
- texture {...} // First used for index 0
- texture {...} // Second texture used for index 1
- texture {...} // Third texture used for index 2
- texture {...} // Fourth texture used for index 3
- ...
- }
- TRANSFORMATION...
- }
-
- If particular index values are not used in an image then it may be neces-
- sary to supply dummy textures. It may be necessary to use a paint program
- or other utility to examine the map file's palette to determine how to ar-
- range the texture list.
-
- In the syntax above, FILE_TYPE is one of the following keywords 'gif',
- 'tga', 'iff' or 'dump'. This is followed by the name of the file in quotes.
- Several optional modifiers may follow the file specification. The modifiers
- are described below.
-
- NOTE: Earlier versions of POV-Ray allowed some modifiers before the FILE
- _TYPE but that syntax is being phased out in favor of the syntax described
- here.
-
- Filenames specified in the material_map statements will be searched for
- in the home (current) directory first, and if not found, will then be sear-
- ched for in directories specified by any '-L' (library path) options active.
- This would facilitate keeping all your material maps files in a separate
- subdirectory, and giving an '-L' option on the command line to where your
- library of material maps are.
-
- By default, the material is mapped onto the X-Y plane. The material is
- 'projected' onto the object as though there were a slide projector somewhere
- in the -Z direction. The material exactly fills the square area from x,y
- coordinates (0,0) to (1,1) regardless of the material's original size in
- pixels. If you would like to change this default, you may translate, rotate
- or scale the normal or texture to map it onto the object's surface as desi-
- red.
-
- If you would like to change this default orientation, you may translate,
- rotate or scale the texture to map it onto the object's surface as desired.
-
- NOTE: No other pigment, normal or finish statements may be added to the
- texture outside the material_map. This is illegal:
- texture {
- material_map {
- gif 'matmap.gif'
- texture { T1 }
- texture { T2 }
- texture { T3 }
- }
- finish { phong 1.0 }
- }
-
- The finish must be individually added to each texture.
-
- NOTE: Earlier versions of POV-Ray allowed such specifications but they
- were ignored. The above restrictions on syntax were necessary for various
- bug fixes. This means some POV-Ray 1.0 scenes using material_maps many need
- minor modifications that cannot be done automatically with the version com-
- patibility mode.
-
- The textures within a material_map texture may be layered but material
- _map textures do don't work as part of a layered texture. To use a layered
- texture inside a material_map you must declare it as a texture identifier
- and invoke it in the texture list.
-