|
|
And, despite the fog of fatigue, I managed to work it out bit by bit today.
The issue is that POV-Ray defines a default pigment_map for certain patterns,
and in order to get a normal "full-spectrum" pigment_map, you have to define one
to override the default.
I guess I _thought_ I was doing this when assigning a texture_map, but of
course, that's a texture_map for the pattern, not a pigment_map for the pigment.
The first clue was that WP's function trick was throwing an error.
So I simplified the pigment to just pigment {wood} and I got the same result.
It should have somehow clicked then, but - foggy brain.
So I decided: lemme write my own pigment function for wood. Which reminded me
that there's an f_wood function.
So I rendered two radius 3 cylinders with:
#declare Wood = texture {
pigment {function{f_wood(x,y,z)}}
}
#declare Hyp = function {sqrt(pow(x,2)+pow(y,2))}
#declare Rings = pigment {function {1-(2*abs(mod(Hyp(x,y,0),1)-0.5))}}
#declare Wood2 = texture {
pigment {Rings}}
and that seemed to go pretty well, and then I added just a plain pigment {wood}
cylinder, and got the characteristic rings - just the TWO default colors. At
some point, the meaning of the pattern description in the documentation became
clear, and I tried:
pigment {
wood
pigment_map {
[0.00 rgb 0]
[1.00 rgb 1]
}
Which neatly solved the problem.
{Whew.}
And now, for your enjoyment and edification:
Post a reply to this message
Attachments:
Download 'woodlabel.png' (238 KB)
Preview of image 'woodlabel.png'
|
|