Previous:Bounded_By   Main Index   Next:Inverse


One of the changes in POV-Ray 3.1 was remove several items from texture{finish{...}} and to move them to the new interior statement. The halo statement, formerly part of texture, are now renamed media and made a part of the interior. This split was deliberate and purposeful (see "Why are Interior and Media Necessary?") however beta testers have pointed out that it makes it difficult to entirely describe the surface properties and interior of an object in one statement that can be referenced by a single identifier in a texture library.

The result is that we created a "wrapper" around texture and interior which we call material. The syntax is:


For example:

  #declare MyGlass=material{texture{Glass_T} interior{Glass_I}}

  object{MyObject material{MyGlass}}

Internally, the "material" isn't attached to the object. The material is just a container that brings the texture and interior to the object. It is the texture and interior itself that is attached to the object. Users should still consider texture and interior as separate items attached to the object. The material is just a "bucket" to carry them.

If the object already has a texture, the material texture is layered over it. If the object already has an interior, the material interior fully replaces it and the old interior is destroyed.

Transformations inside the material affect only the textures and interiors which are inside the material{} wrapper and only those textures or interiors specifed are affected. For example:




      scale 4         //affects texture but not object or interior


      translate 5*x   //affects texture and interior, not object



Note: The material statement has nothing to do with the material_map statement. A material_map is not a way to create patterned material. See "Material Maps" for explanation of this unrelated, yet similarly named, older feature.

Previous:Bounded_By   Main Index   Next:Inverse