 |
 |
|
 |
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Ben Chambers <bdc### [at] hotmail com> 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.
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.
I don't know how the shaders of the povman patch work, but that might be
one solution.
--
#macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
],13),8)-3,10>#end blob{N(array[6]{11117333955,
7382340,3358,3900569407,970,4254934330},0)}// - Warp -
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Perhaps if you built your own mesh to describe the surface you could apply a
color calculation to individual triangles.
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Ben Chambers wrote in message <3b50f264@news.povray.org>...
>Does anyone know how I can make a texture vary depending on the
>angle from which it is viewed
Sounds like what you want is anisotropic shading. Check out RenderMan
shaders and the POV-MAN unofficial version of POV-Ray.
--
Mark
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Unfortunately, then the colors would be fixed. What I want is similar to
those cars that change color based on the angle from which you view them.
Its not a real high priority for me right now, so I'm not too sure I want to
try out POV-Man for it yet, but when I _do_ really need it now I know
where to go.
...Chambers
jim charter <jrc### [at] aol com> wrote in message
news:3B5152F4.5ACF52FA@aol.com...
> Perhaps if you built your own mesh to describe the surface you could apply
a
> color calculation to individual triangles.
>
> 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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Ben Chambers wrote:
>
> jim charter wrote:
>
> > 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.
> >
> > Perhaps if you built your own mesh to describe the surface you could
> > apply a color calculation to individual triangles.
>
> Unfortunately, then the colors would be fixed. What I want is similar
> to those cars that change color based on the angle from which you view
> them. Its not a real high priority for me right now, so I'm not too
> sure I want to try out POV-Man for it yet, but when I _do_ really need
> it now I know where to go.
If the colors were calculated based on the current camera settings,
and the .INC file called only after the camera settings were made,
then it should be no difficulty animating it.
Regards,
John
--
ICQ: 46085459
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
But what if it showed up in a reflection or a refraction? Then the
rays wouldn't even be coming from the camera. Of course, you
could work around this (avoid reflections and refractions, or render
the image in two portions with and without the reflection, and other
such tricks) but it would be easier to give the texture information on
the angle of incidence (is that the correct term?).
...Chambers
John VanSickle <van### [at] erols com> wrote in message
news:3B51FEDE.2FFD6732@erols.com...
> If the colors were calculated based on the current camera settings,
> and the .INC file called only after the camera settings were made,
> then it should be no difficulty animating it.
>
> Regards,
> John
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
The way I'd have done it with a POVMan shader would be something like
#declare incoming = pigment {
shader{
shader_file "incoming.slp"
"falloff" 5
shadow_type shader_shadow
}
}
sphere { 0,5
pigment {
pigment_pattern { incoming }
pigment_map {
[0.5 granite colour_map {[0 rgb x][1 rgb y]} ]
[0.5 bozo colour_map {[0 rgb z][1 rgb 1]} ]
}
}
finish { ambient 1 diffuse 0 specular 0 metallic }
}
where the shader just returns the dot product between I (the incoming
ray) and N (the surface normal).
Unfortunately, POVMan seems to count the pigment_pattern interior as a
non-object pigment definition so neither I nor N are defined. I'm having
to assume this from the fact that it does not work; usually it warns you
about an incomplete initialization (when a shader is used in a warp, for
instance) but in this case the pigment_pattern simply returns a value of
1 without any warnings.
If anyone can see another way of doing it I would also like to know ...
Bye for now,
Mike Andrews.
Ben Chambers wrote:
>
> But what if it showed up in a reflection or a refraction? Then the
> rays wouldn't even be coming from the camera. Of course, you
> could work around this (avoid reflections and refractions, or render
> the image in two portions with and without the reflection, and other
> such tricks) but it would be easier to give the texture information on
> the angle of incidence (is that the correct term?).
>
> ...Chambers
>
> John VanSickle <van### [at] erols com> wrote in message
> news:3B51FEDE.2FFD6732@erols.com...
> > If the colors were calculated based on the current camera settings,
> > and the .INC file called only after the camera settings were made,
> > then it should be no difficulty animating it.
> >
> > Regards,
> > John
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"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.
Bob H.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"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
|
 |
|  |
|  |
|
 |
|
 |
|  |