POV-Ray : Newsgroups : povray.unofficial.patches : height-field Krach : Re: height-field Krach Server Time
2 Nov 2024 05:18:29 EDT (-0400)
  Re: height-field Krach  
From: Nathan Kopp
Date: 6 Feb 2000 18:06:14
Message: <389dfe66@news.povray.org>
Rodolphe <rod### [at] infoniefr> 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

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