home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 16 / CD_ASCQ_16_0994.iso / news / 2555 / povhlp / material.hlp < prev    next >
Encoding:
Text File  |  1994-07-06  |  4.1 KB  |  89 lines

  1.     The 'material_map' special texture extends the concept of 'image_map' to
  2.  apply to entire textures rather than solid colors.  A material_map allows
  3.  you to wrap a 2-D bitmapped texture pattern around your 3-D objects.
  4.  
  5.     Instead of placing a solid color of the image on the shape like an image
  6.  _map, an entire texture is specified based on the index or color of the
  7.  image at that point.  You must specify a list of textures to be used like a
  8.  'texture palette' rather than the usual color palette.
  9.  
  10.     When used with mapped file types such as GIF, the index of the pixel is
  11.  used as an index into the list of textures you supply.  For unmapped file
  12.  types such as TGA, the 8-bit value of the red component in the range 0-255
  13.  is used as an index.
  14.  
  15.     If the index of a pixel is greater than the number of textures in your
  16.  list then the index is taken modulo N where N is the length of your list of
  17.  textures.
  18.  
  19.     The syntax for material_map is:
  20.        texture {
  21.           material_map {
  22.              FILE_TYPE 'filename'
  23.              MODIFIERS...
  24.              texture {...}        // First used for index 0
  25.              texture {...}        // Second texture used for index 1
  26.              texture {...}        // Third texture used for index 2
  27.              texture {...}        // Fourth texture used for index 3
  28.              ...
  29.           }
  30.           TRANSFORMATION...
  31.        }
  32.  
  33.     If particular index values are not used in an image then it may be neces-
  34.  sary to supply dummy textures.  It may be necessary to use a paint program
  35.  or other utility to examine the map file's palette to determine how to ar-
  36.  range the texture list.
  37.  
  38.     In the syntax above, FILE_TYPE is one of the following keywords 'gif',
  39.  'tga', 'iff' or 'dump'.  This is followed by the name of the file in quotes.
  40.  Several optional modifiers may follow the file specification.  The modifiers
  41.  are described below.
  42.  
  43.     NOTE: Earlier versions of POV-Ray allowed some modifiers before the FILE
  44.  _TYPE but that syntax is being phased out in favor of the syntax described
  45.  here.
  46.  
  47.     Filenames specified in the material_map statements will be searched for
  48.  in the home (current) directory first, and if not found, will then be sear-
  49.  ched for in directories specified by any '-L' (library path) options active.
  50.  This would facilitate keeping all your material maps files in a separate
  51.  subdirectory, and giving an '-L' option on the command line to where your
  52.  library of material maps are.
  53.  
  54.     By default, the material is mapped onto the X-Y plane.  The material is
  55.  'projected' onto the object as though there were a slide projector somewhere
  56.  in the -Z direction.  The material exactly fills the square area from x,y
  57.  coordinates (0,0) to (1,1) regardless of the material's original size in
  58.  pixels.  If you would like to change this default, you may translate, rotate
  59.  or scale the normal or texture to map it onto the object's surface as desi-
  60.  red.
  61.  
  62.     If you would like to change this default orientation, you may translate,
  63.  rotate or scale the texture to map it onto the object's surface as desired.
  64.  
  65.     NOTE: No other pigment, normal or finish statements may be added to the
  66.  texture outside the material_map.  This is illegal:
  67.        texture {
  68.           material_map {
  69.              gif 'matmap.gif'
  70.              texture { T1 }
  71.              texture { T2 }
  72.              texture { T3 }
  73.           }
  74.           finish { phong 1.0 }
  75.        }
  76.  
  77.     The finish must be individually added to each texture.
  78.  
  79.     NOTE: Earlier versions of POV-Ray allowed such specifications but they
  80.  were ignored.  The above restrictions on syntax were necessary for various
  81.  bug fixes.  This means some POV-Ray 1.0 scenes using material_maps many need
  82.  minor modifications that cannot be done automatically with the version com-
  83.  patibility mode.
  84.  
  85.     The textures within a material_map texture may be layered but material
  86.  _map textures do don't work as part of a layered texture.  To use a layered
  87.  texture inside a material_map you must declare it as a texture identifier
  88.  and invoke it in the texture list.
  89.