# RenderPointsAsSpheresOn vertice doesn't show

**URL:** https://discourse.vtk.org/t/renderpointsassphereson-vertice-doesnt-show/13455
**Category:** Support
**Created:** [March 5, 2024, 9:17pm UTC](https://discourse.vtk.org/t/renderpointsassphereson-vertice-doesnt-show/13455 "2024-03-05T21:17:25Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![Flagada](https://discourse.vtk.org/user_avatar/discourse.vtk.org/flagada/32/273_2.png) [@Flagada](https://discourse.vtk.org/u/Flagada)
#### Post date: [March 5, 2024, 9:17pm UTC](https://discourse.vtk.org/t/renderpointsassphereson-vertice-doesnt-show/13455/1 "2024-03-05T21:17:25Z")

</div>

Hi all

I am facing a problem on a new computer.  
In my application I highlight the node selection using a dedicated actor where I put :  
GetProperty().SetPointSize(10.0)  
and  
GetProperty().RenderPointsAsSpheresOn()

But on my new computer (which uses the internal graphic of an AMD Ryzen 5600G) the vertices doesn’t show at all.  
If I delete the RenderPointsAsSpheresOn then it works and if I try with a mesa opengl32.dll it also works.  
It seems to be an opengl related problem but do you have any idea on how to solve it?

I already checked that I well have latest graphic drivers.  
My application is coded in python using pyside2 and a QVTKRenderWindowInteractor.

Thanks in advance for any help

---

<div class="post-metadata">

### Author: ![Paulo\_Carvalho](https://discourse.vtk.org/user_avatar/discourse.vtk.org/paulo_carvalho/32/370_2.png) [@Paulo\_Carvalho](https://discourse.vtk.org/u/Paulo_Carvalho)
#### Post date: [March 6, 2024, 4:03pm UTC](https://discourse.vtk.org/t/renderpointsassphereson-vertice-doesnt-show/13455/2 "2024-03-06T16:03:41Z")

</div>

Hello,

What is rendered instead of spheres?

best,

PC

---

<div class="post-metadata">

### Author: ![Flagada](https://discourse.vtk.org/user_avatar/discourse.vtk.org/flagada/32/273_2.png) [@Flagada](https://discourse.vtk.org/u/Flagada)
#### Post date: [March 6, 2024, 6:24pm UTC](https://discourse.vtk.org/t/renderpointsassphereson-vertice-doesnt-show/13455/3 "2024-03-06T18:24:12Z")

</div>

Hi,  
Just nothing is shown, like there : [QVTKOpenGLWidget: Vertices disappear when RenderPointsAsSpheresON()](https://discourse.vtk.org/t/qvtkopenglwidget-vertices-disappear-when-renderpointsassphereson/1007)

---

<div class="post-metadata">

### Author: ![Paulo\_Carvalho](https://discourse.vtk.org/user_avatar/discourse.vtk.org/paulo_carvalho/32/370_2.png) [@Paulo\_Carvalho](https://discourse.vtk.org/u/Paulo_Carvalho)
#### Post date: [March 6, 2024, 6:27pm UTC](https://discourse.vtk.org/t/renderpointsassphereson-vertice-doesnt-show/13455/4 "2024-03-06T18:27:48Z")

</div>

Try using `QVTKOpenGLNativeWidget` instead of `QVTKOpenGLWidget`.

---

<div class="post-metadata">

### Author: ![Flagada](https://discourse.vtk.org/user_avatar/discourse.vtk.org/flagada/32/273_2.png) [@Flagada](https://discourse.vtk.org/u/Flagada)
#### Post date: [March 6, 2024, 6:35pm UTC](https://discourse.vtk.org/t/renderpointsassphereson-vertice-doesnt-show/13455/5 "2024-03-06T18:35:51Z")

</div>

Thanks for your answer,  
unless there is something I don"t understand I don’t use any QVTKOpenGLWidget, I use a QVTKRenderWindowInteractor

---

<div class="post-metadata">

### Author: ![Paulo\_Carvalho](https://discourse.vtk.org/user_avatar/discourse.vtk.org/paulo_carvalho/32/370_2.png) [@Paulo\_Carvalho](https://discourse.vtk.org/u/Paulo_Carvalho)
#### Post date: [March 7, 2024, 11:00am UTC](https://discourse.vtk.org/t/renderpointsassphereson-vertice-doesnt-show/13455/6 "2024-03-07T11:00:14Z")

</div>

Do you get spheres elsewhere? I mean, try to run the code in another hardware. It is also possible that it is a graphics card driver bug. So, make sure you have the latest version installed.

Unfortunately, `QVTKRenderWindowInteractor` doesn’t seem to have a way to set surface format (if it is using the OpenGL backend) which would be a solution according to [QVTKOpenGLWidget: Vertices disappear when RenderPointsAsSpheresON()](https://discourse.vtk.org/t/qvtkopenglwidget-vertices-disappear-when-renderpointsassphereson/1007).

Perhaps you could take this issue to developers of `QVTKRenderWindowInteractor`, since there is a solution to your issue in the C++ API.

---

<div class="post-metadata">

### Author: ![Flagada](https://discourse.vtk.org/user_avatar/discourse.vtk.org/flagada/32/273_2.png) [@Flagada](https://discourse.vtk.org/u/Flagada)
#### Post date: [March 7, 2024, 9:04pm UTC](https://discourse.vtk.org/t/renderpointsassphereson-vertice-doesnt-show/13455/7 "2024-03-07T21:04:08Z")

</div>

Hi,  
The behavior is correct on all other computers I have tested, I already checked that I use the latest graphic drivers :-/ I can imagine some opengl problems on old computers but mine is really recent.  
I managed to make something that works by using a vtkGlyph3D and a vtkSphereSource but this is less efficient when selecting a large amount of nodes. Especially if I want spheres to keep a constant screen size I added a SetScaleFactor(self.camera.GetParallelScale()) in RenderEvent which become really slow if a lot of spheres are displayed.

---

<div class="post-metadata">

### Author: ![Paulo\_Carvalho](https://discourse.vtk.org/user_avatar/discourse.vtk.org/paulo_carvalho/32/370_2.png) [@Paulo\_Carvalho](https://discourse.vtk.org/u/Paulo_Carvalho)
#### Post date: [March 7, 2024, 9:23pm UTC](https://discourse.vtk.org/t/renderpointsassphereson-vertice-doesnt-show/13455/8 "2024-03-07T21:23:34Z")

</div>

> [@Flagada](#):
>
> The behavior is correct on all other computers I have tested, I already checked that I use the latest graphic drivers :-/ I can imagine some opengl problems on old computers but mine is really recent.

So the issue occurs in your computer, right? If this is the case, you should contact the graphics card vendor and report a bug in their driver.

---

<div class="post-metadata">

### Author: ![marcomusy](https://discourse.vtk.org/user_avatar/discourse.vtk.org/marcomusy/32/95_2.png) [@marcomusy](https://discourse.vtk.org/u/marcomusy)
#### Post date: [March 7, 2024, 10:16pm UTC](https://discourse.vtk.org/t/renderpointsassphereson-vertice-doesnt-show/13455/9 "2024-03-07T22:16:23Z")

</div>

I’ve seen the same problem on 3 different machines (a very new OSX and Windows).  
Also [others reported](https://github.com/marcomusy/vedo/issues/1039#issue-2106943146) about it in vedo.

---

<div class="post-metadata">

### Author: ![Paulo\_Carvalho](https://discourse.vtk.org/user_avatar/discourse.vtk.org/paulo_carvalho/32/370_2.png) [@Paulo\_Carvalho](https://discourse.vtk.org/u/Paulo_Carvalho)
#### Post date: [March 7, 2024, 10:43pm UTC](https://discourse.vtk.org/t/renderpointsassphereson-vertice-doesnt-show/13455/10 "2024-03-07T22:43:07Z")

</div>

I also suggest taking a look here: [[vtkusers] VTK7.1: render points as spheres does not work when coloring by cell data](https://vtkusers.public.kitware.narkive.com/lw5BH3ZB/vtk7-1-render-points-as-spheres-does-not-work-when-coloring-by-cell-data) and check whether that solution applies:

> In the example that I send before, the sphere has a double array added to  
> the cell data and set as the active scalar. The mapper is set to  
> ScalarModeToUseCellData. On the property of the actor both  
> RenderLinesAsTubesOn and RenderPointsAsSpheresOn are set. However, only the  
> tubes are shown, the spheres for the vertices are not.
> 
> If I comment out line 36
> 
> sphereSource-\>GetOutput()-\>GetCellData()-\>SetActiveScalars(“doubleValues”);
> 
> then both tubes and vertex spheres are shown, but of course the cells are  
> not colored by their data array.

It’s from old VTK 7.1, but it could be a bug that is back.

---

<div class="post-metadata">

### Author: ![toddy](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/t/edb3f5/32.png) [@toddy](https://discourse.vtk.org/u/toddy)
#### Post date: [March 9, 2024, 11:43pm UTC](https://discourse.vtk.org/t/renderpointsassphereson-vertice-doesnt-show/13455/11 "2024-03-09T23:43:15Z")

</div>

I don’t know if this is relevant. I raised an issue with sphere rendering 6 years ago.

[https://vtk.org/pipermail/vtk-developers/2018-June/036204.html](https://vtk.org/pipermail/vtk-developers/2018-June/036204.html)

---

<div class="post-metadata">

### Author: ![pcermak](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/p/b19c9b/32.png) [@pcermak](https://discourse.vtk.org/u/pcermak)
#### Post date: [July 30, 2024, 8:01am UTC](https://discourse.vtk.org/t/renderpointsassphereson-vertice-doesnt-show/13455/12 "2024-07-30T08:01:08Z")

</div>

Hi, is there an update on this issue? I have Thinkpad with Radeon 15E7 graphics (Ryzen 7730U), latest FW 24.7.1, opengl api 4.6 and I have the same problem. Just simple app showing a dot shows nothing when RenderPointsAsSpheres = True, no error produced.  
On many other laptops and PC it is working without any problems so it’s probably radeon related.

Any ideas for solution? Using vtkSphereSource is possible but super slow for large number of points and other proposed solutions does not work.
