You've now rendered your first picture but it is somewhat boring. Let's
add some fancy features to the texture.
sphere {
<0, 1, 2>, 2
texture {
pigment {color Yellow} // Yellow is pre-defined in COLORS.INC
finish {phong 1}
}
}
Now render this the same way you did before. The phong keyword adds a
highlight the same color of the light shining on the object. It adds a lot
of credibility to the picture and makes the object look smooth and shiny.
Here's the result.
sphere {
<0, 1, 2>, 2
texture {
pigment {color Yellow}
normal {bumps 0.4 scale 0.2}
finish {phong 1}
}
}
This tells POV-Ray to use a bump pattern to modify the surface normal. The
value 0.4 controls the apparent depth of the bumps. Usually the bumps are
about 1 unit wide which doesn't work very well with a sphere of radius 2.
The scale makes the bumps 1/5th as wide but does not affect their depth.
The picture will look something like this.
sphere {
<0, 1, 2>, 2
texture {
pigment {
wood
color_map {
[0.0 color DarkTan]
[0.9 color DarkBrown]
[1.0 color VeryDarkBrown]
}
turbulence 0.05
scale <0.2, 0.3, 1>
}
finish {phong 1}
}
}
The keyword "wood" specifies a pigment pattern of concentric rings like
rings in wood. The color_map specifies that the color of the wood should
blend from DarkTan to DarkBrown over the first 90% of the vein and from
DarkBrown to VeryDarkBrown over the remaining 10%. The turbulence slightly
stirs up the pattern so the veins aren't perfect circles and the scale
factor adjusts the size of the pattern.
Here's the picture.
sphere {
<0, 1, 2>, 2
texture {
pigment {
DMFWood4 // Pre-defined from textures.inc
scale 4 // Scale by the same amount in all
// directions
}
finish {Shiny} // This finish defined in textures.inc
}
}
The pigment identifier DMFWood4 has already been scaled down quite small
when it was defined. For this example we want to scale the pattern larger.
Because we want to scale it uniformly we can put a single value after the
scale keyword rather than a vector of x,y,z scale factors.
Here's what you get.
sphere {
<0, 1, 2>, 2
texture { PinkAlabaster }
}
Click to see the picture.
Last modified: Tue Oct 8 12:29:52 1996