POV-Ray : Newsgroups : povray.unofficial.patches : Bug in glow calculation? : Re: Bug in glow calculation? Server Time
2 Sep 2024 04:13:33 EDT (-0400)
  Re: Bug in glow calculation?  
From: Nathan Kopp
Date: 18 Oct 2000 22:32:13
Message: <39ee5d2d$1@news.povray.org>
"Chris Huff" <chr### [at] maccom> wrote...
> Warp <war### [at] tagpovrayorg> wrote:
>
> >   Perhaps the distance used in the calculation should not be taken from
> > the current ray only, but from the total distance travelled by the ray
> > sent from the camera (and bounced from reflecting objects or refracted
> > from transparent objects).
> >   Or would this be too hard?
>
> The total distance travelled would be useful for other things, like the
> pigmented light source patch,

Interestingly enough, MegaPov has a variable in it, "Total_Depth," which
keeps track of just that sort of thing (total distance that a ray has
traveled from the camera to the curren intersection point).  There is also a
variable "photonDepth" which is in the photon-tracing stuff which keeps
track of the same thing, but for photons.  I'd like to combine the two into
one variable.  "Total_Depth" has not been tested, but it follows the same
principle as "photonDepth," which has been tested.

The variables are set to zero before the root ray is traced, and then they
are increased/decreased in "Determine_Apparant_Colour".  There may be a
better place to put the incrrease/decrease code, but that seemed to work
well.

-Nathan


-Nathan


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.