<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Nov 4, 2016 at 10:27 AM, BBerco <span dir="ltr"><<a href="mailto:bebe0705@colorado.edu" target="_blank">bebe0705@colorado.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">Dear all,<br>
I'm working on some ray casting applications with the help of vtkOBBTree.<br>
This class does a fine job as it is easy to use and does exactly what I<br>
want, but I was wondering if I could speed up the ray-casting process when<br>
large data sets are involved.<br>
<br>
I am dealing with ray-tracing from a LIDAR focal plane comprised of 128 x<br>
128 elements to a target potentially comprised of hundreds of thousands of<br>
vertices (833538 in my example). Illuminating it with each of the 128 x 128<br>
= 16384 pixels in the focal plane takes more than 15 minutes (as my timer is<br>
still running!). Obviously this is a computationally intensive problem, but<br>
I was wondering if there were some alternative strategies that could speed<br>
up the process.<br>
<br>
Specifically, because I am casting each ray by going through the focal plane<br>
rows by rows, the facet hit by the ray corresponding to pixel [i,j] should<br>
be pretty close to the facet hit by the ray coming from pixel[i,j+1] (if<br>
not the same). So here's my first question: is their a way to restrict the<br>
ray-facet intersect search to the neighbors of a given facet? This way, only<br>
the very first pixel of the focal plane would require a global search<br>
through the vtkOBBTree: the rest of the intersects could be searched inside<br>
the neighbors of the impacted cells (and not inside the complete shape).<br>
<br>
I guess I could somehow implement manually, but i'd rather not reinvent the<br>
wheel.<br>
<br>
Besides this idea, if there any ray casting strategy using built-in VTK<br>
features more adapted to large datasets such as those I am dealing with?<br>
<br>
Thanks!<br>
<br>
Ben<br></blockquote><div><br></div>If you're intersecting rays with meshes, try vtkModifiedBSPTree - it is (or at least used to be) much faster.<div><br></div><div><a href="https://itk.org/Wiki/VTK/Examples/Cxx/DataStructures/ModifiedBSPTreeIntersectWithLine">https://itk.org/Wiki/VTK/Examples/Cxx/DataStructures/ModifiedBSPTreeIntersectWithLine</a><br></div><div class="gmail_extra"><div><div class="gmail_signature"><br></div></div></div><div>David </div></div></div></div>