# rendering of large #s of points as spheres and lines as tubes with varying radii-tubefilter too slow!

**URL:** https://discourse.vtk.org/t/rendering-of-large-s-of-points-as-spheres-and-lines-as-tubes-with-varying-radii-tubefilter-too-slow/15096
**Category:** Support
**Created:** [December 31, 2024, 6:26pm UTC](https://discourse.vtk.org/t/rendering-of-large-s-of-points-as-spheres-and-lines-as-tubes-with-varying-radii-tubefilter-too-slow/15096 "2024-12-31T18:26:45Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![geoffw](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/g/898d66/32.png) [@geoffw](https://discourse.vtk.org/u/geoffw)
#### Post date: [December 31, 2024, 6:26pm UTC](https://discourse.vtk.org/t/rendering-of-large-s-of-points-as-spheres-and-lines-as-tubes-with-varying-radii-tubefilter-too-slow/15096/1 "2024-12-31T18:26:45Z")

</div>

We are sometimes rendering large lattices, on the order of 6 million beams. The tube filter is too slow. I have seen that there are ways to render lines directly as tubes in OpenGL2 as in this blog post:

[https://www.kitware.com/rendering-tubes-and-spheres-in-vtk/](https://www.kitware.com/rendering-tubes-and-spheres-in-vtk/)

But it appears that the control over the width of the tubes is a single global value, whereas we need to vary the radius of each tube independently. Is there any way to do this?

---

<div class="post-metadata">

### Author: ![mau\_igna\_06](https://discourse.vtk.org/user_avatar/discourse.vtk.org/mau_igna_06/32/8064_2.png) [@mau\_igna\_06](https://discourse.vtk.org/u/mau_igna_06)
#### Post date: [January 1, 2025, 12:51am UTC](https://discourse.vtk.org/t/rendering-of-large-s-of-points-as-spheres-and-lines-as-tubes-with-varying-radii-tubefilter-too-slow/15096/2 "2025-01-01T00:51:05Z")

</div>

Please check out this example:  
[https://examples.vtk.org/site/Cxx/VisualizationAlgorithms/TubesWithVaryingRadiusAndColors/](https://examples.vtk.org/site/Cxx/VisualizationAlgorithms/TubesWithVaryingRadiusAndColors/)

HIH 🙂
