POV-Ray : Newsgroups : povray.unofficial.patches : (simple?) Isosurface patch request : Re: (simple?) Isosurface patch request Server Time
26 Jun 2024 01:14:16 EDT (-0400)
  Re: (simple?) Isosurface patch request  
From: Wolfgang Wieser
Date: 14 Aug 2004 08:53:12
Message: <411e0b37@news.povray.org>
Christoph Hormann wrote:
> Samuel Benge wrote:
>>>
>>> That is not true.  Black spots on isosurfaces can have multiple
>>> reasons, the most common being an insufficient max_gradient.  The idea
>>> of using interpolation for the final root position is good but it is
>>> not a panacea for all kind of isosurface problems.  In other words it
>>> will only improve the results if the isosurface root finder has
>>> already successfully found the root.
>> 
>> I understand this, but did you look at the comparison images?
>> Interpolation after the last step 'glues' the isosurface together, so it
>> doesn't have holes that really shouldn't be there in the first place.
>> The isosurface renders up to (and more than) two_times_faster. His patch
>> sure seems like a bug fix to me.
> 
> No, the examples Wolfgang shows on his page show the patch improving the
> results in cases of self shadowing and intersecting surfaces.  None of
> the samples shows a case where the root is not found reliably (no holes
> in any of the images).
> 
What Christoph said here and in the previous posting is certainly correct. 
Once a isosurface root is found, the linear interpolation step gives us 
a better guess of the true postion of the root (expect one or two orders 
of magnitude for well-behaved functions). 
This means: 
(1) It is not meant as a way to generate bevel edges. 
(2) It cannot make black regions disappear which occur because of 
   not found roots (such as missed roots due to incorrect max_gradient). 
(3) It does greatly improve the actual surface accuracy. While the current 
   code will have the real root depth within the specified accuracy, the 
   patched code will have it within 1/10 to 1/100 (typ.) of the accuracy. 
   This in turn means, that one can render equally-well images with smaller 
   accuracy and hece faster. See below, too. 
(4) The black dots on my images are IMO due to the shadow rays (i.e. the 
   ones from the light source to the object) come _really_ flat above 
   the surface. I did no detailed investigation on why exactly the black dots 
   disappear with my patch. However, a linear interpolation after a bisection 
   algorithm is the most common way to go numerically and there is no reason 
   why we should not do that here. 

> There is no speedup either but a slight slowdown in fact, 
>
Well, the overhead can really be neglected. 

> the faster results are due to the use of a higher accuracy value
>
("higher value" = "less accuracy", i.e. 1e-3 instead of 1e-5)
>
> which will work 
> well in cases like these where the accuracy is much smaller than the
> features of the isosurface function anyway 
>
This is correct. If you really want the _isosurface_ of a function to get 
plottet in a numerically usable way, you need to have 
"accuracy" < "characteristic surface feature grain size". 

It seems that you are/were using hyper fine structure in some landscape/... 
renderings with structure size about as large as accuracy (?). 
But from the numerical point of view, this does not make much sense. 
It's more like "art produced by numerical errors from the solver" in case 
it is visible at all. 

> but this can't be 
> generalized.  A two times speedup in all isosurface renders because of
> this change is illusory.
> 
Not for "all" but for "a lot of real-life relevant" isosurfaces. 
And after all, I cannot see major disadvantages from using it. 

BTW, talking about isosurface speed, I very much like the idea of your 
patch presented here: 
http://www-public.tu-bs.de:8080/~y0013390/fast_iso/patch.html

Will this patch be made available sometimes somewhere (such as in 
the next megapov version)?

Wolfgang


Post a reply to this message

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