# Point Cloud Rendering

**URL:** https://discourse.vtk.org/t/point-cloud-rendering/14405
**Category:** Support
**Tags:** code
**Created:** [August 13, 2024, 6:39am UTC](https://discourse.vtk.org/t/point-cloud-rendering/14405 "2024-08-13T06:39:00Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![metamurk](https://discourse.vtk.org/user_avatar/discourse.vtk.org/metamurk/32/9665_2.png) [@metamurk](https://discourse.vtk.org/u/metamurk)
#### Post date: [August 13, 2024, 6:39am UTC](https://discourse.vtk.org/t/point-cloud-rendering/14405/1 "2024-08-13T06:39:00Z")

</div>

Hello together,

I need to render large point clouds with vtk 9.3. on a quite modern graphics device.  
The point cloouds have up to 15 million points. Any tips or suggestions how to achieve reasonable render performance?

---

<div class="post-metadata">

### Author: ![lgivord](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lgivord/32/3543_2.png) [@lgivord](https://discourse.vtk.org/u/lgivord)
#### Post date: [August 13, 2024, 7:01am UTC](https://discourse.vtk.org/t/point-cloud-rendering/14405/2 "2024-08-13T07:01:50Z")

</div>

Hello @metamurk,

It depends on your gpu of course but render 15 millions points with a “reasonable” performance should already be possible with the classic OpenGL integration of VTK.

Note that there is some on going work regarding point cloud rendering with WebGPU ([https://gitlab.kitware.com/vtk/vtk/-/merge\_requests/11361](https://gitlab.kitware.com/vtk/vtk/-/merge_requests/11361)), but in your case I don’t think you need it for now

---

<div class="post-metadata">

### Author: ![metamurk](https://discourse.vtk.org/user_avatar/discourse.vtk.org/metamurk/32/9665_2.png) [@metamurk](https://discourse.vtk.org/u/metamurk)
#### Post date: [August 13, 2024, 8:10am UTC](https://discourse.vtk.org/t/point-cloud-rendering/14405/3 "2024-08-13T08:10:18Z")

</div>

I use a RTX 2000 Ada Laptop GPU.  
Ok, I mean fast.  
Are there any good examples implemtenting culling, LODs or any other improvements for PCs in vtk?

---

<div class="post-metadata">

### Author: ![lgivord](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lgivord/32/3543_2.png) [@lgivord](https://discourse.vtk.org/u/lgivord)
#### Post date: [August 13, 2024, 8:22am UTC](https://discourse.vtk.org/t/point-cloud-rendering/14405/4 "2024-08-13T08:22:51Z")

</div>

By default any renderer has a frustum culler. There is also a LOD but you will need to use the [vtkLODProp3D](https://vtk.org/doc/nightly/html/classvtkLODProp3D.html) in this case, there is also an example about how to use it: [https://examples.vtk.org/site/Cxx/Visualization/LODProp3D/](https://examples.vtk.org/site/Cxx/Visualization/LODProp3D/)

---

<div class="post-metadata">

### Author: ![metamurk](https://discourse.vtk.org/user_avatar/discourse.vtk.org/metamurk/32/9665_2.png) [@metamurk](https://discourse.vtk.org/u/metamurk)
#### Post date: [August 13, 2024, 8:36am UTC](https://discourse.vtk.org/t/point-cloud-rendering/14405/5 "2024-08-13T08:36:54Z")

</div>

Would it be usefull to pre-sort the points in some gpu relatd way?

---

<div class="post-metadata">

### Author: ![lgivord](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lgivord/32/3543_2.png) [@lgivord](https://discourse.vtk.org/u/lgivord)
#### Post date: [August 13, 2024, 8:54am UTC](https://discourse.vtk.org/t/point-cloud-rendering/14405/6 "2024-08-13T08:54:05Z")

</div>

> Would it be usefull to pre-sort the points in some gpu relatd way?

I don’t think you need to do that for 15 millions of points.

VTK will not have a huge gain if you do that as the vtk mapper cannot reuse it directly, if you still want to do that you’ll need to write your own point cloud mapper with a first pass of depth sorting

Note that this approach was already done in another vtk based app named F3D for gaussian splatting support, here is the related mapper: [f3d/vtkext/private/module/vtkF3DPointSplatMapper.h at master · f3d-app/f3d · GitHub](https://github.com/f3d-app/f3d/blob/master/vtkext/private/module/vtkF3DPointSplatMapper.h)

---

<div class="post-metadata">

### Author: ![metamurk](https://discourse.vtk.org/user_avatar/discourse.vtk.org/metamurk/32/9665_2.png) [@metamurk](https://discourse.vtk.org/u/metamurk)
#### Post date: [August 14, 2024, 7:08am UTC](https://discourse.vtk.org/t/point-cloud-rendering/14405/7 "2024-08-14T07:08:29Z")

</div>

thank you very much. At the moment performance is quite good, but I suppose these guys will come around the corner with 30 million points next week 🙂

What is the best approach for picking points from the cloud fast?

---

<div class="post-metadata">

### Author: ![lgivord](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lgivord/32/3543_2.png) [@lgivord](https://discourse.vtk.org/u/lgivord)
#### Post date: [August 14, 2024, 7:19am UTC](https://discourse.vtk.org/t/point-cloud-rendering/14405/8 "2024-08-14T07:19:52Z")

</div>

Nice!

> At the moment performance is quite good, but I suppose these guys will come around the corner with 30 million points next week 🙂

I don’t know how much points we can support exactly with fast performance by default, so don’t hesitate to share your result 🙂

> What is the best approach for picking points from the cloud fast?

There is few picker in vtk indeed but I think the best one for your case is the [vtkPointPicker](https://vtk.org/doc/nightly/html/classvtkPointPicker.html#details) (and his example is [here](https://examples.vtk.org/site/Cxx/Interaction/PointPicker/))

---

<div class="post-metadata">

### Author: ![bistek](https://discourse.vtk.org/user_avatar/discourse.vtk.org/bistek/32/2344_2.png) [@bistek](https://discourse.vtk.org/u/bistek)
#### Post date: [August 16, 2024, 10:26am UTC](https://discourse.vtk.org/t/point-cloud-rendering/14405/9 "2024-08-16T10:26:55Z")

</div>

Hello, our experience is that VTK is extremely efficient at visualising point clouds. For instance on the same machine it is faster than CloudCompare visualising point clouds of tens to hundreds million points. We just use PolyData with cells set as vertices and a standard viewer,

---

<div class="post-metadata">

### Author: ![lgivord](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lgivord/32/3543_2.png) [@lgivord](https://discourse.vtk.org/u/lgivord)
#### Post date: [October 3, 2024, 9:59am UTC](https://discourse.vtk.org/t/point-cloud-rendering/14405/10 "2024-10-03T09:59:55Z")

</div>

thanks for these interesting insight, for your information I published recently a blog post regarding point cloud rendering with WebGPU you might be interested 🙂

[https://www.kitware.com/achieving-interactivity-with-a-point-cloud-of-2-billion-points-in-a-single-workstation/](https://www.kitware.com/achieving-interactivity-with-a-point-cloud-of-2-billion-points-in-a-single-workstation/)
