|
|
clipka <ano### [at] anonymousorg> wrote:
> Am 12.01.2018 um 14:53 schrieb Motive17:
>
> > Maybe a trivial question but...about the values x,y,z in the definition of the
> > function Fn:
> >
> > Fn = function(x,y,z) {
> > FnDist(x-xC,y-yC,z-zC) +
> > FnDist(x-xL,y-yL,z-zL)
> >
> > what do they represent for POV-ray?
>
> They represent the x, y and z coordinates for whatever point the pigment
> based on the funciton is evaluated for.
>
>
> > I was thinking I could introduce a such function directly as a light attenuation
> > function in the definition of light source.
> >
> > What do you think about?
>
> That wouldn't fly: The distance-based attenuation of light sources only
> affects the brightness based on the distance between the light source
> and the surface. The distance between the surface and the camera isn't
> affecting the brightness at all.
In order to be more clear I'll write down some details...
I was thinking to define this function, based on your advices :
#declare FnDist = function(x,y,z) { sqrt(x*x + y*y + z*z) }
#declare Fn = function(x,y,z) {
FnDist(x-xC,y-yC,z-zC) +
FnDist(x-xL,y-yL,z-zL)
}
l
ight_source {
<0,0,0>
color rgb <255,255,255>*1/Fn
fade_distance 1
fade_power 0
media_interaction off
media_attenuation off
}
Unlickely, It doesn't fly.
I did not understand which is the reason in this case.
I cannot define a function in the definition of light source?
Post a reply to this message
|
|