[vtkusers] Speed up strategies for ray casting using vtkOBBTree?
daviddoria at gmail.com
Fri Nov 4 16:11:09 EDT 2016
On Fri, Nov 4, 2016 at 10:27 AM, BBerco <bebe0705 at colorado.edu> wrote:
> Dear all,
> I'm working on some ray casting applications with the help of vtkOBBTree.
> This class does a fine job as it is easy to use and does exactly what I
> want, but I was wondering if I could speed up the ray-casting process when
> large data sets are involved.
> I am dealing with ray-tracing from a LIDAR focal plane comprised of 128 x
> 128 elements to a target potentially comprised of hundreds of thousands of
> vertices (833538 in my example). Illuminating it with each of the 128 x 128
> = 16384 pixels in the focal plane takes more than 15 minutes (as my timer
> still running!). Obviously this is a computationally intensive problem, but
> I was wondering if there were some alternative strategies that could speed
> up the process.
> Specifically, because I am casting each ray by going through the focal
> rows by rows, the facet hit by the ray corresponding to pixel [i,j] should
> be pretty close to the facet hit by the ray coming from pixel[i,j+1] (if
> not the same). So here's my first question: is their a way to restrict the
> ray-facet intersect search to the neighbors of a given facet? This way,
> the very first pixel of the focal plane would require a global search
> through the vtkOBBTree: the rest of the intersects could be searched inside
> the neighbors of the impacted cells (and not inside the complete shape).
> I guess I could somehow implement manually, but i'd rather not reinvent the
> Besides this idea, if there any ray casting strategy using built-in VTK
> features more adapted to large datasets such as those I am dealing with?
If you're intersecting rays with meshes, try vtkModifiedBSPTree - it is (or
at least used to be) much faster.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vtkusers