POV-Ray : Newsgroups : povray.unofficial.patches : Photons do not go through shadowless objects? : Re: Photons do not go through shadowless objects? Server Time
2 Sep 2024 20:19:46 EDT (-0400)
  Re: Photons do not go through shadowless objects?  
From: Ron Parker
Date: 6 Aug 1999 09:26:46
Message: <37aae296@news.povray.org>
On Fri, 06 Aug 1999 00:06:03 -0400, Nathan Kopp wrote:
>One last thought... a combination of the two might be good.. and might
>help POV in general, too.  If a refracted ray is colinear with the
>previous ray (e.g. new interior has same IOR as old interior), then
>don't compute any more intersections... rather re-use the existing
>intersection stack.  Does POV already implement this?  If not, it could
>potentiall be a nice speed-up in some instances, and would definately
>help with photons and shadowless objects.

I agree that it could help, at least for any of the objects you're 
planning to hit that are of the type that return all intersections.  
Unfortunately, you'll run into a small snag in the form of there not 
being a global intersection stack.  The Intersection function finds 
and returns the smallest intersection for a given object, which the 
Trace function compares against its smallest result so far as it 
iterates over the object tree.  Intersection discards the actual 
stack it was working with for each object when it returns.  To make 
it work, you'd have to have some way to make Intersection keep the 
stack it had computed and reuse it when the ray doesn't get bent on 
transmission.  That probably means an extra field in each object to 
keep the istack in, and maybe one to keep the ray it goes with in 
as well.  Also, you'd have to make sure that lighting always computes
the transmitted ray first, before any shadow, reflected, or radiosity 
rays.


Post a reply to this message

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