POV-Ray : Newsgroups : povray.programming : Which code evaluate Math functions (ie: isosurfaces) ? : Re: Which code evaluate Math functions (ie: isosurfaces) ? Server Time
5 May 2024 23:39:23 EDT (-0400)
  Re: Which code evaluate Math functions (ie: isosurfaces) ?  
From: Warp
Date: 31 Jan 2007 12:03:11
Message: <45c0cbcf@news.povray.org>
virtualmeet <tah### [at] yahoofr> wrote:
> How about changing the raytracing technique to make it able to treat 64 rays
> at the time?

  I don't think it's possible to raytrace an isosurface 64 rays at a time
and get a speed advantage.

  There may be a speed advantage if the isosurface function is evaluated
*only once* for each ray. However, it isn't. Searching for the intersection
between the ray and the isosurface is an iterative process: the function
is evaluated many times for one intersection calculation, and each
consecutive evaluation depends on the previous evaluations (and thus
cannot be made in parallel). It's basically a refining process where
values closer and closer to the actual isosurface are obtained from
the previous calculations.

  Calculating 64 rays at a time would probably not give speed benefits:
The parameters for each function evaluation for each ray for each substep
are different, so they cannot be all calculated using the same variables.
Moreover, the amount of substeps to be done may change from ray to ray
(if I have understood the isosurface raytracing algorithm correctly).

  This would also be feasible only for the first recursion level (ie. the
rays starting from the camera). Reflected/refracted rays could not possibly
use this kind of parallelism in any reasonable way (because it's impossible
to tell which group of rays actually hit the isosurface when they have been
bouncing around the scene).

  And of course there would be problems inherent with tracing 64 rays
at a time: If part of those rays actually don't hit the isosurface (eg.
because there's another object in front), the function evaluations done
for them would go to waste.

-- 
                                                          - Warp


Post a reply to this message

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