<div dir="ltr"><br clear="all"><div><div style="font-size:12.8px">Hiya folks,</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">I have been playing with rendering point clouds using some LOD and multithreading techniques. One result of this is vtkLODPointCloudMapper and two supporting filters that reorganize the data into a better format for rendering. I have placed these items into a VTK remote module (<a href="http://www.vtk.org/Wiki/VTK/Remote_Modules" target="_blank">http://www.vtk.org/Wiki/VTK/Remote_Modules</a>) and have attached the cmake file to pull it below.  This module does rely on Will's vtkPointCloud module so make sure you have that and it is up to date first. This module includes a test which generates a synthetic point cloud. This test can be easily modified to adjust the number of points generated. In the image below I used 100 million points and included the vtkPointFillPass to fill small holes in the cloud, followed by a vtkEDLShadingPass to produce lighting effects based on the depth buffer. Sort of an interesting example of mixing point clouds with some render passes.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">The LOD Shader itself only implements a very small subset of VTKs capabilities as it was designed to test out some different approaches to rendering. I have included the description from the header file below to give you some idea of what the class does.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"><br></div><img src="cid:ii_1541a9f2d13df2e9" alt="Inline image 1" width="540" height="562"><br><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Thanks!</div><div style="font-size:12.8px">Ken</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"><div>// This mapper only implements a very small subset of VTK's features.</div><div>// Consider it experimental and as a starting point for other uses. This</div><div>// mapper is designed to take a multiblock point cloud of the form</div><div>// typically produced by vtkHierachicalBinningFilter and run through</div><div>// vtkPointCloudToMultiBlock followed by vtkMultiBlockToCompressed. If</div><div>// the compressed stage is skipped it will be done by the mapper</div><div>// internally.</div><div>//</div><div>// The result of these filters should be a multiblockdataset where the</div><div>// first block contains a sampling of the points from the entire point</div><div>// cloud.  Additional blocks will contain smaller subdivisions. A common</div><div>// arrangement is 1 grandparent + 8 parents + 64 children in an octree</div><div>// arrangement for a total of 73 blocks.</div><div>//</div><div>// This mapper uses unsigned shorts to store the XYZ values and uses</div><div>// either 3 unsigned chars for color or one unsigned short for single</div><div>// valued scalars.  When using single valued scalars the lookup table is</div><div>// hardcoded. When there is no color or scalars a blue to yellow pseudo</div><div>// coloring is done based on depth.</div><div>//</div><div>// This mapper uses timing and coverage metrics to determine what blocks</div><div>// to draw  and how much of any given block to draw to maintain the</div><div>// desired render rate. On a laptop with a nvidia 2Gig 960M (midrange</div><div>// card) I see around one billion points/sec for a dataset of 140</div><div>//  million points with RGB color</div><div>//</div><div>// While this mapper can be fed through a normal VTK pipeline, it also</div><div>// supports  being fed data one piece at a time using the SetDataForPiece</div><div>// method. The intent is that the file IO can be handled in one thread, a</div><div>// piece at a time, while the rendering  is handled in another thread.</div><div>// SetDataForPiece is what you would use to  pass data from the file IO</div><div>// thread to the rendering thread.</div></div></div>-- <br><div class="gmail_signature">Ken Martin PhD<div>Chairman & CFO<br>Kitware Inc.<br>28 Corporate Drive<br>Clifton Park NY 12065<br>518 371 3971<div><br></div><div><span style="font-size:10pt;font-family:Tahoma,sans-serif">This communication,
including all attachments, contains confidential and legally privileged
information, and it is intended only for the use of the addressee.  Access to this email by anyone else is
unauthorized. If you are not the intended recipient, any disclosure, copying,
distribution or any action taken in reliance on it is prohibited and may be
unlawful. If you received this communication in error please notify us
immediately and destroy the original message. 
Thank you.</span></div></div></div>
</div>