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)
> image_pattern
Patterns Lists
- Regular Patterns
- Random Patterns
- Fractal Patterns
- Other Patterns
Warps
- warp mapping
uv_mapping
Mapping
Superpositions
Your own Textures
|
image_pattern - pattern by images
|
// Syntax for 'image_pattern':
pigment{ //-----------------------------
image_pattern{BITMAP_TYPE "bitmap.ext"}
color_map{ COLOR_MAP_BODY }
| pigment_map{ PIGMENT_MAP_BODY }
} //------------------------------------
// Syntax for 'texture':
texture{ //-----------------------------
image_pattern{BITMAP_TYPE "bitmap.ext"}
texture_map{ TEXTURE_MAP_BODY }
} //------------------------------------
// Syntax for 'normal':
normal{ //------------------------------
image_pattern{BITMAP_TYPE "bitmap.ext"}
[Bump_Size]
normal_map { NORMAL_MAP_BODY }
} //------------------------------------ |
|
This pattern gets the 3D gray values
from any image as a pattern for
color_map, pigment_map,
textur_map or normal_map.
The gray values of the image are
interpreted as declared by the according map.
Values between items in the map are averaged.
Note: For the use of these patterns
in normal statements, we can use
an additional value for Bump_Size !
|
|
Example 1: 'image_pattern'
// -----------------------------------
#declare Texture_1 =
texture{
image_pattern{
jpeg "Pattern2D_01.jpg"
interpolate 2
once
} //
texture_map{
[0.0 pigment{color rgbf<1,1,1,1>}]
[0.7 pigment{color rgbf<1,0.6,0.1>}]
[1.0 pigment{color rgb<1,0.1,0.3>}]
} // end texture_map
}// end texture
// -----------------------------------
// -----------------------------------
box{ <0,0,0>,<1,1,0.00001>
texture{ Texture_1 }
scale <1,1,1>
translate<0,0,0>
} // ------------------------------
// ----------------------------------- |
|
|
|
Example 2: 'image_pattern'
// -----------------------------------
#declare Texture_1 =
texture{
image_pattern{
jpeg "Spherical_01.jpg"
interpolate 2
// once
} //
texture_map{
[0.0 pigment{color rgbf<1,1,1,0.8>}]
[0.7 pigment{color rgb<0.5,0,0.1>}]
[1.0 pigment{color rgb<0.5,0,0.1>}]
} // end texture_map
}// end texture
// -----------------------------------
// -----------------------------------
box{ <0,0,0>,<1,1,0.00001>
texture{ Texture_1 }
scale <1,1,1>
translate<0,0,0>
} // ------------------------------
// ----------------------------------- |
|
The image used here as image_pattern:
Spherical_01.jpg (512x512 pixels)
POV-Ray scene file: Image_pattern_02.pov,
needs the above image: Spherical_01.jpg ! *)
*) Note: Save the according image files in the same
subdirectory like the scene files or
in any other subdirctory in your include file paths.
|
|
|