POV-Ray : Newsgroups : povray.beta-test : Known Bugs 14 Jan 2002 : Re: Known Bugs 14 Jan 2002 Server Time
30 Jul 2024 10:20:52 EDT (-0400)
  Re: Known Bugs 14 Jan 2002  
From: R  Suzuki
Date: 18 Jan 2002 04:34:27
Message: <3c47ec23@news.povray.org>
"Mike Williams" wrote
>That explanation was proposed in the original thread, but it didn't
>explain the fact that decreasing the max_gradient, or changing the
>amount reflection or removing three blank lines caused the scene to
>render correctly. I've got a nagging suspicion that for such very subtle
>changes to cause the scene to go from rendering correctly to being so
>badly wrong there may be something nasty deep down that might possibly
>come back and bite us later.

That subtle change is due to the "isosurface cache". Following is a simple
example.
//-------------------------
#include "functions.inc"
camera { location <0,0,-30> look_at 0 angle 50 }
light_source { <1,2,-3>*10, 1.2 }
isosurface
{
  function { abs(mod(x+10,1)-0.5)+abs(z)-0.3+select( (f_r(x,y,z/4)-0.08) ,10,
0) }
  contained_by { box{-<2,10,0.3> <2,10,0.3> } }
  max_gradient 2
  pigment { rgb 1 }
  rotate y*0
}
//---------------------------

Try this scene with several different resolutions.  If you see a large
artifact, try to change the max_gradient value or rotation angle of y-axis.

A brief explanation of the cache technique is as follows.

If the minimum function value on a ray, F_min, is a positive
value, the latter calculation will be skipped in case (the distance
from the ray) < F_min/max_gradient.

This works properly if the real maximum gradient is less than the
max_gradient.  But if not, the possibility of improper rendering becomes high.

In the above case, F_min is about 10 in a certain condition.
Then, the latter calculation will be skipped in case
(the distance from the origin) < ~5(=~10/2).

>(One, irrelevant, side effect of this scene is that the scene will
>render completely differently on a render farm than on a single machine.

Yes.  But this occurs if the real maximum gradient is much greater than
'max_gradient' in the scene file.

I've not added "cache on/off" option to the original isosurface patch because
I was not sure whether it is really required or not.
Both the original scene and my example scene do not need this option
if we use a 'truncation' (min/max) technique.

R. Suzuki


Post a reply to this message

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