POV-Ray : Newsgroups : povray.unofficial.patches : (simple?) Isosurface patch request Server Time
31 Oct 2024 19:15:57 EDT (-0400)
  (simple?) Isosurface patch request (Message 1 to 10 of 26)  
Goto Latest 10 Messages Next 10 Messages >>>
From: Samuel Benge
Subject: (simple?) Isosurface patch request
Date: 13 Aug 2004 16:25:11
Message: <411D2304.50603@hotmail.com>
Hello, all who frequent this group, and greetings to Wolfgang Weiser. 
I'm sorry if this request has been made by someone else; I made a real 
effort to avoid asking an already-answered question. It doesn't appear 
this is available for Windows.

My request is simple. It involves having somebody compile the POV-Ray 
3.6 for Windows executable, and for a certain piece of the code to be 
altered.

The patchwork is already done. On his webpage,
http://www.cip.physik.uni-muenchen.de/~wwieser/render/povray/patches/isoacc-patch/ 

Wolfgang describes what seems to be a perfect fix for a common problem 
with rendered isosurfaces: black spots and 'chopped up' surfaces. He 
shows which piece of POV source must be altered to allow "linear 
interpolation after the final bisection step." The results are astounding.

Normally, we are forced to lower the accuracy to make such artifacts 
disappear. This leads to longer render times and sharper edges. 
Sometimes we don't want sharp edges at all. This new patch presents us 
with a two-in-one improvement for isosurface rendering. I believe his 
code will allow us to turn an ordinary isosurface cube into a bevelled 
isosurface cube.... simply by raising the accuracy. A bevelled cube 
which renders (theoretically) faster than a sharp-edged cube!

Now, if somebody were to compile this patch, I have a kind of 
compensation planned. I will test techniques (using the patch) and 
create an HTML documenting my efforts. It will be conclusive no matter 
what: either we have another technique for bevelling iso objects, or it 
didn't work, because artifacts still appear. I doubt the artifacts will 
be too noticable, though. The page will be published either by me, or 
somebody with a more stable webspace.

I don't want to tear anybody away from 'POVComp time', but if the 
isosurface improvement is as good as I think it is, it will make POV 
look a LOT better when all the entries come streaming in. Faster 
isosurfaces :)

-Sam


Post a reply to this message

From: Christoph Hormann
Subject: Re: (simple?) Isosurface patch request
Date: 13 Aug 2004 17:45:01
Message: <cfjcgg$vkg$1@chho.imagico.de>
Samuel Benge wrote:
> 
> The patchwork is already done. On his webpage,
> http://www.cip.physik.uni-muenchen.de/~wwieser/render/povray/patches/isoacc-patch/ 
> 
> Wolfgang describes what seems to be a perfect fix for a common problem 
> with rendered isosurfaces: black spots and 'chopped up' surfaces.

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.

Christoph

-- 
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 06 Jul. 2004 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: Samuel Benge
Subject: Re: (simple?) Isosurface patch request
Date: 13 Aug 2004 18:53:44
Message: <411D45D6.5050706@hotmail.com>
Christoph Hormann wrote:

> Samuel Benge wrote:
> 
>>
>> The patchwork is already done. On his webpage,
>> http://www.cip.physik.uni-muenchen.de/~wwieser/render/povray/patches/isoacc-patch/ 
>>
>> Wolfgang describes what seems to be a perfect fix for a common problem 
>> with rendered isosurfaces: black spots and 'chopped up' surfaces.
> 
> 
> 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.
> 
> Christoph


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.

Max_gradient issues are, IMO, easy to fix. You raise the max_gradient. 
Done. No amount of that, however, can fix problems not related to 
insufficient max_gradient values....

-Sam


Post a reply to this message

From: Christoph Hormann
Subject: Re: (simple?) Isosurface patch request
Date: 14 Aug 2004 02:55:02
Message: <cfkcpl$2oc$1@chho.imagico.de>
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).

There is no speedup either but a slight slowdown in fact, the faster 
results are due to the use of a higher accuracy value which will work 
well in cases like these where the accuracy is much smaller than the 
features of the isosurface function anyway but this can't be 
generalized.  A two times speedup in all isosurface renders because of 
this change is illusory.

Christoph

-- 
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 06 Jul. 2004 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: Wolfgang Wieser
Subject: Re: (simple?) Isosurface patch request
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

From: Christoph Hormann
Subject: Re: (simple?) Isosurface patch request
Date: 14 Aug 2004 09:40:02
Message: <cfl4h7$mjb$1@chho.imagico.de>
Wolfgang Wieser wrote:
> [...]
> 
>>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". 

Your numbers what factor you can reduce the accuracy settings are quite 
wild guesses.  It depends on how well the linear interpolation 
approximates the real change of the function in the final interval.  If 
it does this badly you won't have such a gain (factor 10 would already 
be extremely good).  Also note the normal vector calculation uses the 
accuracy value as well so by increasing the accuracy setting you also 
influence the calculation of the normal vector.

> 
> 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 

Sure, some time.

> (such as in 
> the next megapov version)?

No.

Christoph

-- 
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 06 Jul. 2004 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: Wolfgang Wieser
Subject: Re: (simple?) Isosurface patch request
Date: 14 Aug 2004 09:58:52
Message: <411e1a9b@news.povray.org>
Christoph Hormann wrote:
> Wolfgang Wieser wrote:
>> [...]
>> 
>>>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".
> 
> Your numbers what factor you can reduce the accuracy settings are quite
> wild guesses.  It depends on how well the linear interpolation
> approximates the real change of the function in the final interval.  
>
This is certainly correct. That's why I put the "well-behaved" in there :)
It turns out that the "wild guesses" are fulfilled quite good for smooth 

if one is rendering the Mars topography since the function in question 
is a linearly interpolated image map itself. 

> If 
> it does this badly you won't have such a gain (factor 10 would already
> be extremely good).  
>
Yes. But OTOH it is _very_ unlikely to get below factor 2. 
(And actually no reason not to use it.)

> Also note the normal vector calculation uses the 
> accuracy value as well so by increasing the accuracy setting you also
> influence the calculation of the normal vector.
> 
Yes, I saw that because my initial guess for the reson of the black dots 
was problems in the numerical differentiaion. And actually, numerical 
diff is one of the most critical things. There simply isn't a perfect 
solution for the problem -- especially no cheap one. 

> Sure, some time.
> 
Well... "some time"... 
Do you mean I need to code it myself if I want functionality like that 
this year?

Wolfgang


Post a reply to this message

From: Christoph Hormann
Subject: Re: (simple?) Isosurface patch request
Date: 14 Aug 2004 11:20:01
Message: <cfla9q$sc6$1@chho.imagico.de>
Wolfgang Wieser wrote:
> 
>>Sure, some time.
>>
> 
> Well... "some time"... 
> Do you mean I need to code it myself if I want functionality like that 
> this year?

I don't know but don't conclude from the fact that the technique can be 
explained in a few paragraphs that it is simply to implement.

Christoph

-- 
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 06 Jul. 2004 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: Samuel Benge
Subject: Re: (simple?) Isosurface patch request
Date: 14 Aug 2004 13:11:09
Message: <411E25C9.4050703@hotmail.com>
Wolfgang Wieser wrote:
<snip>

> 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. 


I understand this. But if we *can* get bevelled edges using higher 
accuracy values, why not let people use it that way? My preliminary 
tests (without the patch) indicate that a simple min(..) of two 
functions can be bevelled, saving lots of csg-coding time. Incidentally, 
it would render faster, too, because of the high accuracy values.

> (2) It cannot make black regions disappear which occur because of 
>    not found roots (such as missed roots due to incorrect max_gradient). 


I don't have this problem. Some people might, but I seem to always be 
able to find the right max_gradient early on.


> (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. 


This is what's really frustrating me.... I know the patch is better when 
it comes to accuracy. With the 'official' isosurface, we have to use 
accuracy values which are MUCH SMALLER than the needed 'grain size', or 
resolution of the isosurface to rid ourselves of the black dots.


> (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. 


Can I give you an example isosurface statement, to test my theory on 
this? I've seen the problems; I believe your patch fixes them. If we 
break even on render time, so be it. A fix is a fix.

>>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. 


I can only see advantages.

 
> 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


*Sigh* I wish I knew how to compile POV's source code... :c/

-Sam


Post a reply to this message

From: Christoph Hormann
Subject: Re: (simple?) Isosurface patch request
Date: 14 Aug 2004 13:25:05
Message: <cflht3$u8$1@chho.imagico.de>
Samuel Benge wrote:
> 
> This is what's really frustrating me.... I know the patch is better when 
> it comes to accuracy. With the 'official' isosurface, we have to use 
> accuracy values which are MUCH SMALLER than the needed 'grain size', or 
> resolution of the isosurface to rid ourselves of the black dots.
> 

You should really better show an example.  Black dots are nearly always 
an indication of unsuccessful root finding and then this patch would not 
help as explained.

Christoph

-- 
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 06 Jul. 2004 _____./\/^>_*_<^\/\.______


Post a reply to this message

Goto Latest 10 Messages Next 10 Messages >>>

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