## 3.5 Textures

The `texture` statement is an object modifier which describes what the surface of an object looks like, i.e. its material. Textures are combinations of pigments, normals, and finishes. Pigment is the color or pattern of colors inherent in the material. Normal is a method of simulating various patterns of bumps, dents, ripples or waves by modifying the surface normal vector. Finish describes the reflective properties of a material.

Note: that in previous versions of POV-Ray, the texture also contained information about the interior of an object. This information has been moved to a separate object modifier called `interior`. See "Interior" for details.

There are three basic kinds of textures: plain, patterned, and layered. A plain texture consists of a single pigment, an optional normal, and a single finish. A patterned texture combines two or more textures using a block pattern or blending function pattern. Patterned textures may be made quite complex by nesting patterns within patterns. At the innermost levels however, they are made up from plain textures. A layered texture consists of two or more semi-transparent textures layered on top of one another.

Note: although we call a plain texture plain it may be a very complex texture with patterned pigments and normals. The term plain only means that it has a single pigment, normal, and finish.

The syntax for `texture` is as follows:

    TEXTURE:
        PLAIN_TEXTURE | PATTERNED_TEXTURE | LAYERED_TEXTURE
    PLAIN_TEXTURE:
        texture
        {
            [TEXTURE_IDENTIFIER]
            [PNF_IDENTIFIER...]
            [PNF_ITEMS...]
        }
    PNF_IDENTIFIER:
        PIGMENT_IDENTIFIER | NORMAL_IDENTIFIER | FINISH_IDENTIFIER
    PNF_ITEMS:
        PIGMENT | NORMAL | FINISH | TRANSFORMATION
    LAYERED_TEXTURE:
        NON_PATTERNED_TEXTURE...
    PATTERNED_TEXTURE:
        texture
        {
            [PATTERNED_TEXTURE_ID]
            [TRANSFORMATIONS...]
        } |
        texture
        {
            PATTERN_TYPE
            [TEXTURE_PATTERN_MODIFIERS...]
        } |
        texture
        {
            tiles TEXTURE tile2 TEXTURE
            [TRANSFORMATIONS...]
        } |
        texture
        {
            material_map
            {
                BITMAP_TYPE "bitmap.ext"
                [MATERIAL_MODS...] TEXTURE... [TRANSFORMATIONS...]
            }
        }
    TEXTURE_PATTERN_MODIFIER:
        PATTERN_MODIFIER | TEXTURE_LIST |
        texture_map { TEXTURE_MAP_BODY }

In the PLAIN_TEXTURE, each of the items are optional but if they are present the TEXTURE_IDENTIFIER must be first. If no texture identifier is given, then POV-Ray creates a copy of the default texture. See "The #default Directive" for details.

Next are optional pigment, normal, and/or finish identifiers which fully override any pigment, normal and finish already specified in the previous texture identifier or default texture. Typically this is used for backward compatibility to allow things like: `texture { MyPigment }` where `MyPigment` is a pigment identifier.

Finally we have optional `pigment`, `normal` or `finish` statements which modify any pigment, normal and finish already specified in the identifier. If no texture identifier is specified the `pigment`, `normal` and `finish` statements modify the current default values. This is the typical plain texture:

      texture {
        pigment { MyPigment }
        normal { MyNormal }
        finish { MyFinish }
        scale SoBig
        rotate SoMuch
        translate SoFar
    }

The TRANSFORMATIONS may be interspersed between the pigment, normal and finish statements but are generally specified last. If they are interspersed, then they modify only those parts of the texture already specified. For example:

      texture {
        pigment { MyPigment }
        scale SoBig      //affects pigment only
        normal { MyNormal }
        rotate SoMuch    //affects pigment and normal
        finish { MyFinish }
        translate SoFar  //finish is never transformable no matter what.
                         //Therefore affects pigment and normal only
    }

Texture 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.

    TEXTURE_DECLARATION:
        #declare IDENTIFIER = TEXTURE |
        #local IDENTIFIER = TEXTURE

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

The sections below describe all of the options available in "Pigment", "Normal", and "Finish" which are the main part of plain textures.. There are also separate sections for "Patterned Textures" and "Layered Textures" which are made up of plain textures.

Note: the `tiles` and `material_map` versions of patterned textures are obsolete and are only supported for backwards compatibility.

Section Contents

- 3.5.1 Pigment
  - 3.5.1.1 Solid Color Pigments
  - 3.5.1.2 Color List Pigments
  - 3.5.1.3 Color Maps
  - 3.5.1.4 Pigment Maps and Pigment Lists
  - 3.5.1.5 Image Maps
    - 3.5.1.5.1 Specifying an Image Map
    - 3.5.1.5.2 The Filter and Transmit Bitmap Modifiers
    - 3.5.1.5.3 Using the Alpha Channel
  - 3.5.1.6 Quick Color
- 3.5.2 Normal
  - 3.5.2.1 Slope Maps
    - 3.5.2.1.1 Normals, Accuracy
  - 3.5.2.2 Normal Maps and Normal Lists
  - 3.5.2.3 Bump Maps
    - 3.5.2.3.1 Specifying a Bump Map
    - 3.5.2.3.2 Bump_Size
    - 3.5.2.3.3 Use_Index and Use_Color
  - 3.5.2.4 Scaling normals
- 3.5.3 Finish
  - 3.5.3.1 Ambient
  - 3.5.3.2 Diffuse Reflection Items
    - 3.5.3.2.1 Diffuse
    - 3.5.3.2.2 Brilliance
    - 3.5.3.2.3 Crand Graininess
  - 3.5.3.3 Highlights
    - 3.5.3.3.1 Phong Highlights
    - 3.5.3.3.2 Specular Highlight
    - 3.5.3.3.3 Metallic Highlight Modifier
  - 3.5.3.4 Specular Reflection
  - 3.5.3.5 Conserve Energy for Reflection
  - 3.5.3.6 Iridescence
- 3.5.4 Halo
- 3.5.5 Patterned Textures
  - 3.5.5.1 Texture Maps
  - 3.5.5.2 Tiles
  - 3.5.5.3 Material Maps
    - 3.5.5.3.1 Specifying a Material Map
- 3.5.6 Layered Textures
- 3.5.7 UV Mapping
  - 3.5.7.1 Supported Objects
  - 3.5.7.2 UV Vectors
- 3.5.8 Triangle Texture Interpolation
- 3.5.9 Interior Texture
- 3.5.10 Cutaway Textures
- 3.5.11 Patterns
  - 3.5.11.1 Agate
  - 3.5.11.2 Average
  - 3.5.11.3 Boxed
  - 3.5.11.4 Bozo
  - 3.5.11.5 Brick
  - 3.5.11.6 Bumps
  - 3.5.11.7 Cells
  - 3.5.11.8 Checker
  - 3.5.11.9 Crackle Patterns
  - 3.5.11.10 Cylindrical
  - 3.5.11.11 Density_File
    - 3.5.11.11.1 df3 file format
  - 3.5.11.12 Dents
  - 3.5.11.13 Facets
  - 3.5.11.14 Fractal Patterns
  - 3.5.11.15 Function as pattern
    - 3.5.11.15.1 What can be used
  - 3.5.11.16 Function Image
  - 3.5.11.17 Gradient
  - 3.5.11.18 Granite
  - 3.5.11.19 Hexagon
  - 3.5.11.20 Image Pattern
  - 3.5.11.21 Leopard
  - 3.5.11.22 Marble
  - 3.5.11.23 Object Pattern
  - 3.5.11.24 Onion
  - 3.5.11.25 Pigment Pattern
  - 3.5.11.26 Planar
  - 3.5.11.27 Quilted
  - 3.5.11.28 Radial
  - 3.5.11.29 Ripples
  - 3.5.11.30 Slope
  - 3.5.11.31 Spherical
  - 3.5.11.32 Spiral1
  - 3.5.11.33 Spiral2
  - 3.5.11.34 Spotted
  - 3.5.11.35 Waves
  - 3.5.11.36 Wood
  - 3.5.11.37 Wrinkles
- 3.5.12 Pattern Modifiers
  - 3.5.12.1 Transforming Patterns
  - 3.5.12.2 Frequency and Phase
  - 3.5.12.3 Waveforms
  - 3.5.12.4 Noise Generators
  - 3.5.12.5 Turbulence
  - 3.5.12.6 Warps
    - 3.5.12.6.1 Black Hole Warp
    - 3.5.12.6.2 Repeat Warp
    - 3.5.12.6.3 Turbulence versus Turbulence Warp
    - 3.5.12.6.4 Turbulence Warp
    - 3.5.12.6.5 Mapping using warps
  - 3.5.12.7 Bitmap Modifiers
    - 3.5.12.7.1 The once Option
    - 3.5.12.7.2 The map_type Option
    - 3.5.12.7.3 The interpolate Option

More about "Interior"

- 3.6.1 Interior in 3.6 Interior & Media & Photons
- 3.8.9.3 Interior in 3.8.9 Object Modifiers