|
![](/i/fill.gif) |
Rodolphe <rod### [at] infonie fr> wrote...
> a small simpler example studied.
> un petit exemple plus simple a etudier
> best regard
I've found (and fixed) the problem. The problem is a percision problem.
During shadow testing on the height_field, POV shoots a ray from the
height_field to the light. If POV is using the light buffer, it my try
another ray to see if it finds a closer intersection. The problem is that
it hits the same spot again and again and again. Each time, the
intersection depth is incorrect and reports 1e-7 as the depth instead of
zero.
I would think that this would affect the official version as well, but there
are two differences between MegaPov and the official version that could
cause this: 1) MegaPov is compiled with VC++ and 3.1g used Watcom; 2)
MegaPov has a smaller EPSILON in config.h (I have not tried changing EPSILON
so I don't know if this was the origin of the problem).
The solution was to utilize a Small_Tolerance value to determine if a
precision error is occuring. Small_Tolerance and SHADOW_TOLERANCE (two
#defines) are used in a variety of places in POV for this vary reason. For
some reason, though, they were not used in the function Intersect_Light_Tree
in lbuffer.c.
-Nathan
Post a reply to this message
|
![](/i/fill.gif) |