POV-Ray : Documentation : 2.5.1 Pigment
  POV-Ray 3.6 Documentation Online View  
2.5 Textures Solid Color Pigments

2.5.1 Pigment

The color or pattern of colors for an object is defined by a pigment statement. All plain textures must have a pigment. If you do not specify one the default pigment is used. The color you define is the way you want the object to look if fully illuminated. You pick the basic color inherent in the object and POV-Ray brightens or darkens it depending on the lighting in the scene. The parameter is called pigment because we are defining the basic color the object actually is rather than how it looks.

The syntax for pigment is:

    pigment {
    image_map { 
        BITMAP_TYPE "bitmap.ext" [IMAGE_MAP_MODS...]
    color_map { COLOR_MAP_BODY } | colour_map { COLOR_MAP_BODY } | 
    pigment_map { PIGMENT_MAP_BODY } | quick_color COLOR |
    quick_colour COLOR

Each of the items in a pigment are optional but if they are present, they must be in the order shown. Any items after the PIGMENT_IDENTIFIER modify or override settings given in the identifier. If no identifier is specified then the items modify the pigment values in the current default texture. The PIGMENT_TYPE fall into roughly four categories. Each category is discussed the sub-sections which follow. The four categories are solid color and image map patterns which are specific to pigment statements or color list patterns, color mapped patterns which use POV-Ray's wide selection of general patterns. See "Patterns" for details about specific patterns.

The pattern type is optionally followed by one or more pigment modifiers. In addition to general pattern modifiers such as transformations, turbulence, and warp modifiers, pigments may also have a COLOR_LIST, PIGMENT_LIST, color_map, pigment_map, and quick_color which are specific to pigments. See "Pattern Modifiers" for information on general modifiers. The pigment-specific modifiers are described in sub-sections which follow. Pigment modifiers of any kind apply only to the pigment and not to other parts of the texture. Modifiers must be specified last.

A pigment statement is part of a texture specification. However it can be tedious to use a texture statement just to add a color to an object. Therefore you may attach a pigment directly to an object without explicitly specifying that it as part of a texture. For example instead of this:

  object { My_Object texture {pigment { color Red } } }

you may shorten it to:

  object { My_Object pigment {color Red } }

Doing so creates an entire texture structure with default normal and finish statements just as if you had explicitly typed the full texture {...} around it.

Pigment identifiers may be declared to make scene files more readable and to parameterize scenes so that changing a single declaration changes many values. An identifier is declared as follows.

    #declare IDENTIFIER = PIGMENT |

Where IDENTIFIER is the name of the identifier up to 40 characters long and PIGMENT is any valid pigment statement. See "#declare vs. #local" for information on identifier scope.

More about "Pattern Modifiers"

2.5 Textures Solid Color Pigments

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