![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"Bob H." <omn### [at] msn com> wrote :
>
> 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>
> }
> }
> }
I don't know about car paint, but it's a neat effect!
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/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) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Ben Chambers wrote:
>
> Does anyone know how I can make a texture vary depending on the
> angle from which it is viewed? I've thought about using a radial, but that
> isn't quite what I want... As in, the angle of incidence between the
> intersecting ray and the surface normal would act as a sort of index
> into a pigment map.
There's a soluition for you : ML-Pov, a tiny MegaPOV 7 based patch,
which has an "aoi" pattern !
http://martial.rameaux.free.fr/mael/mlpovall.zip
pigment {aoi color_map {..}}
Fabien.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
I've put an image on p.b.i which uses an angle dependant mix of two
colours. This is a one-line shader for POVMan, but it can only mix two
colours as it stands. It could probably be adapted to do other things
...
I'll post the source to the shaders and the pov file to p.b.s-f.
Bye for now,
Mike Andrews.
Ben Chambers wrote:
>
> Does anyone know how I can make a texture vary depending on the
> angle from which it is viewed? I've thought about using a radial, but that
> isn't quite what I want... As in, the angle of incidence between the
> intersecting ray and the surface normal would act as a sort of index
> into a pigment map.
>
> ...Chambers
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
I just get a gray sphere... What's it supposed to do?
...Chambers
Bill DeWitt <bde### [at] cfl rr com> wrote in message
news:3b530aab$1@news.povray.org...
>
> "Bob H." <omn### [at] msn com> wrote :
> >
> > 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>
> > }
> > }
> > }
>
>
> I don't know about car paint, but it's a neat effect!
>
>
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"Ben Chambers" <bdc### [at] hotmail com> wrote in message
news:3b54b957@news.povray.org...
> I just get a gray sphere... What's it supposed to do?
It's supposed to use MegaPOV and it helps if you give it something to
reflect.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"Bill DeWitt" <bde### [at] cfl rr com> wrote in message
news:3b54fa9c$1@news.povray.org...
>
> "Ben Chambers" <bdc### [at] hotmail com> wrote in message
> news:3b54b957@news.povray.org...
> > I just get a gray sphere... What's it supposed to do?
>
>
> It's supposed to use MegaPOV and it helps if you give it something to
> reflect.
Ha ha, yeah, sorry. I knew it needed an "environment" to expose the
different colors but I neglecting to say so. My apologies. Actually,
anything other than rgb 0 works even if just background {rgb .5} , for
example, is used.
Bob H.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Well, I have megapov, and I tried it with a plane below...
the reflection still doesn't work there. However, the plane
_above_ it reflects quite nicely.
...Chambers
Bill DeWitt <bde### [at] cfl rr com> wrote in message
news:3b54fa9c$1@news.povray.org...
>
> "Ben Chambers" <bdc### [at] hotmail com> wrote in message
> news:3b54b957@news.povray.org...
> > I just get a gray sphere... What's it supposed to do?
>
>
> It's supposed to use MegaPOV and it helps if you give it something to
> reflect.
>
>
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
In article <3b50f379@news.povray.org>, Warp <war### [at] tag povray org>
wrote:
> AFAIK patterns do not get info about the incoming ray nor the normal
> vector, so they can't produce a pattern depending on them. Not even a function
> pattern can do this.
It is possible (and fairly easy, though tedious) to make the ray
information available to patterns, I had to do so for my portal pigment
patch. I assume the POVMan and aoi pattern patches also have this
modification.
The surface normal is already available, though...it is part of the
intersection information.
--
Christopher James Huff - chr### [at] mac com, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tag povray org, http://tag.povray.org/
<><
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Ben Chambers <bdc### [at] hotmail com> wrote in message
news:3b560d9b@news.povray.org...
> Well, I have megapov, and I tried it with a plane below...
> the reflection still doesn't work there. However, the plane
> _above_ it reflects quite nicely.
>
> ...Chambers
I figured it out... the texture reflected red and blue lights. The plane
below it was green :)
...Chambers
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |