|
![](/i/fill.gif) |
Actually, if you only want a mix of two colours dependant on the angle
then you can do this with a very simple pigment shader:
surface incoming ( float falloff = 1.0; color col1 = (1,0,0), col2 =
(0,1,0);)
{
Ci = mix(col1, col2, pow (abs(normalize(N).normalize(I)), falloff));
}
and in POVMan use a declaration such as
#declare incoming = pigment {
shader{
shader_file "incoming.slp"
"falloff" 5
"col1" <1,0.5,0>
"col2" <0,1,0.5>
}
}
This works with direct and reflected rays, you can add whatever finish
you like too.
Bye for now,
Mike Andrews.
"Bob H." wrote:
>
> "Bob H." <omn### [at] msn com> wrote in message
> news:3b52f036@news.povray.org...
> > "Michael Andrews" <M.C### [at] reading ac uk> wrote in message
> > news:3B5### [at] reading ac uk...
> > >
> > > If anyone can see another way of doing it I would also like to know ...
> >
> > What I just thought of was to use the MegaPOV angle dependent reflection
> in
> > a two layered texture, trick being to use opposing min and max color
> > vectors. Maybe that has already been mentioned, if so I didn't notice.
>
> Okay, maybe that wasn't relating to the previous message reply so much but I
> just gave it a try to see how it would look. It's close to that kind of car
> paint, since cars do reflect it's about all it might pass for becuase it
> certainly isn't a ny sort of angle dependent pigment.
>
> sphere {0,1
> texture {
> pigment {rgb .25}
> finish {
> reflection_type 0 reflection_min <.1,0,0> reflection_max <1,0,0>
> }
> }
> texture {
> pigment {rgbt .75}
> finish {
> reflection_type 0 reflection_min <0,0,1> reflection_max <0,0,.1>
> }
> }
> }
>
> Bob H.
Post a reply to this message
|
![](/i/fill.gif) |