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 (2)

Example 3: 'pigment_pattern' applied in 'normal'
Note: For the use of these patterns in normal statements
we can use an additional value for Bump_Size !

The pigment shown without 'normal':
#declare Pigment_1 =   //------------------
pigment{ crackle
         turbulence 0.35 scale 0.45
         color_map{
          [0.00 color rgb<1,1,1>*0]
          [0.08 color rgb<1,1,1>*0]
          [0.40 color rgb<1,0.55,0>]
          [1.00 color rgb<1,1,0.8>]
         } // end of color_map
} // end of pigment -----------------------
object{ //---------------------------------
  Round_Box(<-1,0,-1.25>,<2,2,2>,0.15,0)
  texture{ pigment{ Pigment_1  }
           finish { phong 1 }
         } // end texture
} // --------------------------------------
The pigment used as 'pigment_pattern' for 'normal':
object{ //---------------------------------
  Round_Box(<-1,0,-1.25>,<2,2,2>,0.15,0)
  texture{ pigment{ color rgb<1,1,1>*0.8 }
           normal {
             pigment_pattern{
               Pigment_1
             } // pigment_pattern
             0.5 // BUMP_SIZE
           } // end of normal
           finish { phong 1 }
         }
} // --------------------------------------

The pigment used as 'pigment' and as 'pigment_pattern':
object{ //---------------------------------
  Round_Box(<-1,0,-1.25>,<2,2,2>,0.15,0)
  texture{ pigment{ Pigment_1 }
           normal {
             pigment_pattern{
               Pigment_1
             } // pigment_pattern
             1.5 // BUMP_SIZE
           } // end of normal
           finish { phong 1 }
         }
} // --------------------------------------

Another example see here:
  'pigment_pattern' and 'normal'.
Click on the images for higher resolution (needs Javascript on!)
pattern crackle
The pattern 'crackle' used pigment.
POV-Ray scene file: pattern_crackle_normal_0.pov
pigment used as normal pigment_pattern
pigment with 'crackle' used as normal pattern.
POV-Ray scene file: pattern_crackle_normal_1.pov
pigment_pattern as pigment and normal
The pigment_pattern as pigment and normal.
POV-Ray scene file: pattern_crackle_normal_2.pov

More '3D': Use pigment function with isosurface
#declare fn_Pigment_1 =
function {pigment{ Pigment_1} }

isosurface { //----------------------------
  function{
    f_rounded_box(
        x,y,z,
        0.15, // radius of curvature
        1.5, 1.0, 1.625  // scale<x,y,z>
                 ) //
     - fn_Pigment_1(x,y,z).gray*0.1 
  } // end function
  threshold 0
  contained_by {box {<-2,-2,-3>,<2,2,3.5>}}
  max_gradient 6
  accuracy 0.0001
  texture{
     pigment{ Pigment_1 }
     normal { crackle 0.5 scale 0.045}
     finish { phong 1}
   } // end texture
  translate <0.5, 1.1, 0.375>
} // end of isosurface --------------------

pigment_pattern
Pigment function with isosurface
POV-Ray scene file: pattern_crackle_isosurface_3.pov
pigment_pattern
A variation: 'fn_Pigment_1(x,y,z).gray*0.25'
top

© Friedrich A. Lohmüller, 2013
www.f-lohmueller.de