|
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!)
The pattern 'crackle' used pigment.
POV-Ray scene file: pattern_crackle_normal_0.pov
pigment with 'crackle' used as normal pattern.
POV-Ray scene file: pattern_crackle_normal_1.pov
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 function with isosurface
POV-Ray scene file: pattern_crackle_isosurface_3.pov
A variation: 'fn_Pigment_1(x,y,z).gray*0.25'
|
|