POV-Ray : Newsgroups : povray.programming : isosurface intersection code rewrite : Re: isosurface intersection code rewrite Server Time
27 Apr 2024 04:16:35 EDT (-0400)
  Re: isosurface intersection code rewrite  
From: Lukas Winter
Date: 12 Mar 2008 11:57:18
Message: <47d80b6e@news.povray.org>
Am Wed, 12 Mar 2008 13:50:29 +0100 schrieb Christoph Hormann:
>> - Every isosurface now has a separate cache with multiple entries
>> (speeds up camera ray tests, shadow ray tests and reflection ray tests)
> 
> I am not sure how this is meant - the existing isosurface cache IIRC
> speeds up subsequent rays missing the surface.
The existing cache explicitely excludes shadow rays. It also does a poor 
job when there are several isosurfaces in the scene. The reason is that 
most of the time subsequent tests come in the same order, i.e. several 
_different_ kinds of tests repeat in a certain order but the cache only 
speeds up _similiar_ rays. So one cache entry overrides another and there 
are a lot of cache misses that could have been avoided if the cache kept 
older entries. On the other hand the cache should not be too big to avoid 
expensive tests against very old entries. I usually use 2 or 3 cache 
entries per isosurface.

>> - Intersection points are interpolated, so much smaller accuracies are
>> sufficient
> This is already in MegaPOV and i thought it also was in 3.7.
The isosurface code of beta 25 is nearly identical to that of 3.6.1. 
There are some changes to make it thread-safe and the object is now a 
class.

>> - An expensive optimisation that could speed up calculations when using
>> very slow functions (and slow down when using faster functions...)
> More details would be required on this.

The code tries to move the point where it splits the current interval in 
two intervals to a better place under some circumstances. But a speed-up 
thanks to this is very rare.

> Interpolating the intersection point should converge to the same result
> as not doing so in all well defined cases.
True. But as we just do an approximation, self-shadowed areas will look 
slightly different. In the current beta and 3.6.1 the transition between 
shadowed and lit areas will always look grainy even with high accuracies. 
With interpolation they look smooth.


Post a reply to this message

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