|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Okay. I'm newly returning to Pov, and this is a stupid simple question,
so I figure I can post this under "new users". :-P
I can create a user-defined function from a pigment. Is it possible to
create a pigment from a function? The documentation isn't clear to me,
but seems to say "no".
--
William Tracy
afi### [at] gmailcom -- wtr### [at] calpolyedu
(09:52:19 PM) _markt: well, nobody's ever accused me of being normal
(09:52:28 PM) dkirker: _markt: you are normal
-- seen on #cplug
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
William Tracy <wtr### [at] calpolyedu> wrote:
> Okay. I'm newly returning to Pov, and this is a stupid simple question,
> so I figure I can post this under "new users". :-P
>
> I can create a user-defined function from a pigment. Is it possible to
> create a pigment from a function? The documentation isn't clear to me,
> but seems to say "no".
You can use a function as a pattern (see "3.5.11.15 Function as pattern") and
therefore, in some sense, as a pigment; however, to use a *pigment* function as
a pigment again, preserving all colors, you will probably have to do some
trickery, like:
pigment {
average
pigment_map {
[ 1
function { myFunc(x,y,z).red }
color_map {
[ 0 color red*0 ]
[ 1 color red*3 ]
}
]
[ 1
function { myFunc(x,y,z).green }
color_map {
[ 0 color green*0 ]
[ 1 color green*3 ]
}
]
[ 1
function { myFunc(x,y,z).blue }
color_map {
[ 0 color blue*0 ]
[ 1 color blue*3 ]
}
]
}
}
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
William Tracy wrote:
> Okay. I'm newly returning to Pov, and this is a stupid simple question,
> so I figure I can post this under "new users". :-P
>
> I can create a user-defined function from a pigment. Is it possible to
> create a pigment from a function? The documentation isn't clear to me,
> but seems to say "no".
>
Just to cover one base ...
http://www.econym.demon.co.uk/isotut/pigfun.htm
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Jim Charter nous illumina en ce 2009-04-06 19:29 -->
> William Tracy wrote:
>> Okay. I'm newly returning to Pov, and this is a stupid simple
>> question, so I figure I can post this under "new users". :-P
>>
>> I can create a user-defined function from a pigment. Is it possible to
>> create a pigment from a function? The documentation isn't clear to me,
>> but seems to say "no".
>>
>
> Just to cover one base ...
> http://www.econym.demon.co.uk/isotut/pigfun.htm
For any function based on a pigment that don't have a colour_map, using .x .y or
.z is essentialy the same as .gray, but faster as you don't compute the
ponderated average of the tree colour chanels.
In the sample that use the obion and leopard patterns, using .x (or .red, .y,
.z, .green, .blue) would render the same.
wood, agate and bozo have an internal colour_map and need .gray.
--
Alain
-------------------------------------------------
You know you've been raytracing too long when you invented glasses that can be
configured to use variable resolution (eg. 320x240, 640x480, etc.), with POV-Ray
style switches for other effects (eg. anti-aliasing, radiosity, etc.)
Vimal N. Lad / Gautam N. Lad
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|