POV-Ray : Documentation : 1.2.5.4 Pre-defined Textures
  POV-Ray 3.6 Documentation Online View  
1.2.5.3 Creating Color Patterns   1.2.6 Using the Camera

1.2.5.4 Pre-defined Textures

POV-Ray has some very sophisticated textures pre-defined in the standard include files glass.inc, metals.inc, stones.inc and woods.inc. Some are entire textures with pigment, normal and/or finish parameters already defined. Some are just pigments or just finishes.

We change the definition of our sphere to the following and then re-render it:

  sphere {
    <0, 1, 2>, 2
    texture {
      pigment {
        DMFWood4       // pre-defined in textures.inc
        scale 4        // scale by the same amount in all
                       // directions
      }
      finish { Shiny } // pre-defined in finish.inc
    }
  }

The pigment identifier DMFWood4 has already been scaled down quite small when it was defined. For this example we want to scale the pattern larger. Because we want to scale it uniformly we can put a single value after the scale keyword rather than a vector of x, y, z scale factors.

We look through the file textures.inc to see what pigments and finishes are defined and try them out. We just insert the name of the new pigment where DMFWood4 is now or try a different finish in place of Shiny and re-render our file.

Here is an example of using a complete texture identifier rather than just the pieces.

  sphere {
    <0, 1, 2>, 2
    texture { PinkAlabaster }
  }
1.2.5.3 Creating Color Patterns   1.2.6 Using the Camera


Copyright 2003-2004 Persistence of Vision Raytracer Pty. Ltd.