POV-Ray : Documentation : 2.5.11.20 Image Pattern
  POV-Ray 3.6 Documentation Online View  
2.5.11.19 Hexagon   2.5.11.21 Leopard

2.5.11.20 Image Pattern

Instead of placing the color of the image on the object like an image_map an image_pattern specifies an entire texture item (color, pigment, normal or texture) based on the gray value at that point.
This gray-value is checked against a list and the corresponding item is then used for the texture at that particular point. For values between listed items, an averaged texture is calculated.
It takes a standard image specification and has one option, use_alpha which works similar to use_color or use_index.

Syntax:

PIGMENT:
  pigment {
    IMAGE_PATTERN
    color_map { COLOR_MAP_BODY } |
    colour_map { COLOR_MAP_BODY } | 
    pigment_map { PIGMENT_MAP_BODY }
  }

NORMAL:
  normal {
    IMAGE_PATTERN [Bump_Size]
    normal_map { NORMAL_MAP_BODY }
  }

TEXTURE:
  texture {
    IMAGE_PATTERN
    texture_map { TEXTURE_MAP_BODY }
  }

IMAGE_PATTERN
    image_pattern {
      BITMAP_TYPE "bitmap.ext"
      [IMAGE_MAP_MODS...]
    }
IMAGE_MAP_MOD:
    map_type Type | once | interpolate Type | use_alpha
ITEM_MAP_BODY:
    ITEM_MAP_IDENTIFIER | ITEM_MAP_ENTRY...
ITEM_MAP_ENTRY:
    [ GRAY_VALUE  ITEM_MAP_ENTRY... ]

It is also useful for creating texture "masks", like the following:

 texture {
   image_pattern { tga "image.tga" use_alpha }
   texture_map {
     [0 Mytex ]
     [1 pigment { transmit 1 } ]
   }
 }

Note: This pattern uses an image to get the gray values from. If you want exactly the same possibilities but need to get gray values from a pigment, you can use the pigment_pattern.

2.5.11.19 Hexagon   2.5.11.21 Leopard


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