Reference:Object Pattern

From POV-Wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

The object pattern takes an object as input. It generates a, two item, color list pattern. Whether a point is assigned to one item or the other depends on whether it is inside the specified object or not.

Object's used in the object pattern cannot have a texture and must be solid - these are the same limitations as for bounded_by and clipped_by.

Syntax:

object {
  OBJECT_IDENTIFIER | OBJECT {}
  LIST_ITEM_A, LIST_ITEM_B
  }

Where OBJ_IDENTIFIER is the target object (which must be declared), or use the full object syntax. LIST_ITEM_A and LIST_ITEM_B are the colors, pigments, or whatever the pattern is controlling. LIST_ITEM_A is used for all points outside the object, and LIST_ITEM_B is used for all points inside the object.

Example:

pigment {
  object {
    myTextObject 
    color White 
    color Red
    }
  turbulence 0.15
  }

Note: This is a block pattern which cannot use wave types, color_map, or slope_map modifiers.