[vtkusers] 30 million points and Render
Ken Martin
ken.martin at kitware.com
Tue Apr 19 10:55:28 EDT 2016
Here is my code as a remote module for VTK master along with some other
info... - Ken
Hiya folks,
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 (
http://www.vtk.org/Wiki/VTK/Remote_Modules) 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 cloudswith some render passes.
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.
[image: Inline image 1]
Thanks!
Ken
// This mapper only implements a very small subset of VTK's features.
// Consider it experimental and as a starting point for other uses. This
// mapper is designed to take a multiblock point cloud of the form
// typically produced by vtkHierachicalBinningFilter and run through
// vtkPointCloudToMultiBlock followed by vtkMultiBlockToCompressed. If
// the compressed stage is skipped it will be done by the mapper
// internally.
//
// The result of these filters should be a multiblockdataset where the
// first block contains a sampling of the points from the entire point
// cloud. Additional blocks will contain smaller subdivisions. A common
// arrangement is 1 grandparent + 8 parents + 64 children in an octree
// arrangement for a total of 73 blocks.
//
// This mapper uses unsigned shorts to store the XYZ values and uses
// either 3 unsigned chars for color or one unsigned short for single
// valued scalars. When using single valued scalars the lookup table is
// hardcoded. When there is no color or scalars a blue to yellow pseudo
// coloring is done based on depth.
//
// This mapper uses timing and coverage metrics to determine what blocks
// to draw and how much of any given block to draw to maintain the
// desired render rate. On a laptop with a nvidia 2Gig 960M (midrange
// card) I see around one billion points/sec for a dataset of 140
// million points with RGB color
//
// While this mapper can be fed through a normal VTK pipeline, it also
// supports being fed data one piece at a time using the SetDataForPiece
// method. The intent is that the file IO can be handled in one thread, a
// piece at a time, while the rendering is handled in another thread.
// SetDataForPiece is what you would use to pass data from the file IO
// thread to the rendering thread.
On Tue, Apr 19, 2016 at 10:47 AM, alihadim <ali.hadimogullari at netcad.com.tr>
wrote:
> Thank you answer. If you possible can you sent me your code.
> I would like to compare with my code.
>
> Thanks again.
>
>
>
> --
> View this message in context:
> http://vtk.1045678.n5.nabble.com/30-million-points-and-Render-tp5737692p5737773.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>
--
Ken Martin PhD
Chairman & CFO
Kitware Inc.
28 Corporate Drive
Clifton Park NY 12065
518 371 3971
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160419/a27fb008/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.jpg
Type: image/jpeg
Size: 154273 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160419/a27fb008/attachment-0001.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vtkLODPointCloudMapper.remote.cmake
Type: application/octet-stream
Size: 249 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160419/a27fb008/attachment-0001.obj>
More information about the vtkusers
mailing list