Descriptions and Examples for the POV-Ray Raytracer by Friedrich A. Lohmüller
Design of Surfaces by "texture" with POV-Ray -
Deutsch Deutsch
Italiano Italiano
Français français

Home
- POV-Ray Tutorial

  Design of Surfaces
  - Colors and Textures
    Index

    texture Syntax
    Ready-made Textures
    Do-it-yourself Colors
    Patterns
    - pattern types
      Regular patterns
    - checker, hexagon
    - square, triangular
    - brick
    - object pattern (1)
    - object pattern (2)
    - object pattern (3)
    - tiling
    - pavement
      Stripe Patterns
    - color_map{...}
      Patterns by pigments
   > pigment_pattern (1)
    - pigment_pattern (2)
    Patterns Lists
    - Regular Patterns
    - Random Patterns
    - Fractal Patterns
    - Other Patterns
    Warps
    - warp mapping
    uv_mapping
    Mapping
    Superpositions

    Your own Textures
 
                                           
  pigment_pattern (1)
// Syntax for 'pigment_pattern':
pigment{ //-----------------------------
  pigment_pattern{ PIGMENT_BODY }
     color_map{ COLOR_MAP_BODY }
     | pigment_map{ PIGMENT_MAP_BODY }
} //------------------------------------
// Syntax for 'texture':
texture{ //-----------------------------
   pigment_pattern{ PIGMENT_BODY }
     texture_map{ TEXTURE_MAP_BODY }
} //------------------------------------
// Syntax for 'normal':
normal{ //------------------------------
       pigment_pattern { PIGMENT_BODY }
      [Bump_Size]
       normal_map { NORMAL_MAP_BODY }
} //------------------------------------

This pattern gets the 3D gray values
from any pigment as a pattern for
color_map, pigment_map,
textur_map or normal_map.

We can use it with patterned pigment,
from simple to very complicated nested.




Note: For the use of these patterns in normal statements
we can use an additional value for Bump_Size !
Example 1: 'pigment_pattern' applied on pigments
#declare Pigment_0 =
pigment{
  pavement
    number_of_sides 4// 3tri,4quadrat,6hexgon
    number_of_tiles 1//  (1 to 5 or 6)
    pattern 1 // from 1~max. relevant value
    //corners: 0=sharp,1=bevelled,2=rounded
    exterior 0 // 0, 1 or 2; Not for hexagon
    interior 0 // 0, 1 or 2
    form 0//  0, 1, 2
    color_map{
     [ 0.00 color rgb<1,1,1>*0 ]
     [ 0.75 color rgb<1,1,1>*0 ]
     [ 1.00 color rgb<1,1,1>*1 ]
    } // end color_map
  scale 0.255
} // end pigment ----------------------------
//-------------------------------------------
#declare Pigment_1 =
pigment{
  leopard scale 0.075  turbulence 0
    color_map{
     [0.00 color rgb<0,0,0>]
     [0.2  color rgb<0,0,0>]
     [0.2  color rgb<1,1,1>]
     [1.00 color rgb<1,1,1>]
    }//end of color_map (optionnal)
  rotate<45,0,0>
} // end of pigment
//-------------------------------------------

object{
   Round_Box(<-1,0,-1>,<1,1,0.99>,0.02,0)
   texture{
     pigment{
       pigment_pattern{
         Pigment_0
         scale<1.07,1,1.03>*0.9
       } // end pigment_pattern
       pigment_map{
        [ 0.00  color White ]
        [ 0.50  Pigment_1 scale 0.08]
        [ 1.00  Pigment_1 scale 0.08]
       } // pigment_map
       scale 1.02
       translate<-0.11,0.02,-0.14>
     } // pigment
     finish { phong 1 }
     scale  1
   } // texture
 rotate<0, 0,0> translate<0,0,0>
} // ----------------------------------------
Click on the images for higher resolution (needs Javascript on!)
pigment used as a pattern
The pigment 'Pigment_0' used as a pattern.
POV-Ray scene file: pattern_pavement_quadrat_0.pov
pigment used with pattern
The pigment 'Pigment_1' used with pattern.
POV-Ray scene file: pattern_leopard_0.pov
pigment_pattern
The pigment using pigment_pattern.
POV-Ray scene file: pigment_pattern_0.pov

Example 2: pigment_pattern - a variation
#declare Pigment_2 =
pigment{
  pavement
    number_of_sides 4//3tri,4quadrat,6hexagon
    number_of_tiles 1 //  (1 to 5 or 6)
    pattern 1 // from 1~max.relevant value
    //corners: 0=sharp, 1=bevelled, 2=rounded
    exterior 2 // 0, 1 or 2; Not for hexagon.
    interior 0 // 0, 1 or 2
    form 0//  0, 1, 2
    color_map{
     [ 0.00 color rgb<1,1,1>*1 ]
     [ 0.65 color rgb<1,1,1>*0.5 ]
     [ 1.00 color rgb<1,1,1>*0 ]
    } // end color_map
} // end pigment
//------------------------------------
#declare Pigment_3 =
pigment{
  leopard scale 0.075  turbulence 0
    color_map{
     [0.00 color rgb<0,0,0>]
     [0.20 color rgb<0,0,0>]
     [0.20 color rgb<0.7,0,0>]
     [1.00 color rgb<1,1,1>]
    }//end color_map
  rotate<45,0,0>
} // end pigment
//------------------------------------
object{
  Round_Box(<-1,0,-1>,<1,1,0.99>,0.02,0)
  texture{
    pigment{
      pigment_pattern{
        Pigment_2 scale 0.65
        translate<0.15,0,0.10>
      } // pigment_pattern
      pigment_map{
       [ 0.00 color rgb<0.8,0.6,1>   ]
       [ 0.50 Pigment_3 scale 0.08]
       [ 1.00 Pigment_3 scale 0.08]
      } // pigment_map
      scale 1.02
      translate<-0.11,0.02,-0.14>
    } // pigment
    finish { phong 1 }
    scale  1
  } // texture
  rotate<0, 0,0>  translate<0,0,0>
} // -------------------------------

pigment_pattern
A variation of pigment_pattern
POV-Ray scene file: pigment_pattern_1.pov
top

© Friedrich A. Lohmüller, 2012
http://www.f-lohmueller.de