|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hi!
I'd like to do something like this:
I've got three functions f_r, f_g and f_b, which all map [0,1]^3 to
[0,1]. Now I'd like to have a rather complex object (don't worry, I know
how to make that geometry) that are all bounded by a box {<0,0,0>
<1,1,1>} where each point of that object has the color rgb <f_r(x,y,z),
f_g(x,y,z), f_b(x,y,z)>.
I'd like to declare a material for that complex object, but how do I do
that?
I already tried this:
#declare MyMaterial =
material{texture{pigment{
function {f_r(x, y, z)}
}}}
But this will only give my grayscales. How can I make colored?
f_r, f_g and f_b are nonlinear so gradients would work (I guess).
Thanks in advance,
Bernd Fuhrmann
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> But this will only give my grayscales. How can I make colored?
You can do this:
pigment {
average
pigment_map {
[1 function {f_r(x,y,z)} color_map {[0 rgb 0][1 rgb <1,0,0>*3]}]
[1 function {f_g(x,y,z)} color_map {[0 rgb 0][1 rgb <0,1,0>*3]}]
[1 function {f_b(x,y,z)} color_map {[0 rgb 0][1 rgb <0,0,1>*3]}]
}
}
- Slime
[ http://www.slimeland.com/ ]
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Wasn't it Bernd Fuhrmann who wrote:
>Hi!
>
>I'd like to do something like this:
You could use texture layering:
#declare texture3 =
texture {pigment {function {f_r(x,y,z)} color_map {[0 rgb 0][1 rgb x]}}}
texture {pigment {function {f_g(x,y,z)} color_map {[0 rgbt 1][1 rgb y]}}}
texture {pigment {function {f_b(x,y,z)} color_map {[0 rgbt 1][1 rgb z]}}}
--
Mike Williams
Gentleman of Leisure
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Slime wrote:
> You can do this:
>
> pigment {
> average
> pigment_map {
> [1 function {f_r(x,y,z)} color_map {[0 rgb 0][1 rgb <1,0,0>*3]}]
> [1 function {f_g(x,y,z)} color_map {[0 rgb 0][1 rgb <0,1,0>*3]}]
> [1 function {f_b(x,y,z)} color_map {[0 rgb 0][1 rgb <0,0,1>*3]}]
> }
> }
Works. Thanks a lot.
Bernd Fuhrmann
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|