|
|
So,
With regard to pigment functions, I was wondering how one might go about
[re]producing the full color [rgb] version of the the pattern.
When something like this is done:
#declare Pattern = function {pigment{bozo}}
Am I correct that this is a function that can return a vector result?
I am unfamiliar with the internals of this, but
Since pigments can be declared as functions, they can also be used in functions.
They must be declared first. When using the identifier, you have to specify
which component of the color vector should be used. To do this, the dot notation
is used: Function(x,y,z).red
#declare FOO = function {pigment { checker } }
pigment {
function { FOO(x,y,z).green }
[PIGMENT_MODIFIERS...]
}
seems to purge the vector from access, and impose the limited scalar component
as the only usable output. :(
pigment {checker} is a full-color pigment, so how does the color get passed to
the pigment statement from whatever internal function used to generate it?
Now, moving past that there's an interesting idea I had, since
gray value = Red*29.7% + Green*58.9% + Blue*11.4%
Which suggests that the rgb value may be extracted back out of the .gray value
returned by a function.
pigment {rgb <Pattern(x,y,z).gray/0.297, Pattern(x,y,z).gray/0.589,
Pattern(x,y,z).gray/0.114>}
if such a thing were possible.
Which, is not, because POV-Ray doesn't seem to be able to digest that
Parse Error: Float expected but vector or color expression found.
at File: RGBPigmentFunctionTest.pov
Which is weird, because
#debug concat ( " Pattern(x,y,z).gray = ", str (Pattern(1,2,3).gray/0.297, 3,
1), "\n")
works just fine, and str expects a float, and seems happy with the result of
Pattern(1,2,3).gray/0.297
I also tried
box {-1, 1 pigment {rgb Pattern(x,y,z)}
box {-1, 1 pigment {rgb <Pattern(x,y,z)>}
and
box {-1, 1 pigment {<Pattern(x,y,z)>}
box {-1, 1 pigment {Pattern(x,y,z)}
to no avail.
Is there a way to create a full-color pigment?
Post a reply to this message
|
|