VTK9 - Black viewport when using rubber band style


When using any sort of rubber band style (e.g. vtkInteractorStyleRubberBandZoom, vtkInteractorStyleRubberBandPick, etc…), the viewport turns black while dragging (the marquee selection line is visible), and goes back to normal as soon as dragging stops (marquee selection line stops being visible).
This is happening with VTK 9.0.0, Python 3.7.6, PyQt 5.9.2 and macOS 10.15.4.
Have you guys experienced this?


Could you test that on VTK master by any chance?

I could give it a try. I haven’t built VTK before, do these instruction still apply for VTK 9?:

I think those are out of date. The Qt version is too old but I think the way to specify where Qt is has changed as well. I think you set Qt5_DIR to something like for me C:/Qt/5.12.6/msvc2017_64/lib/cmake/Qt5

Apologies for the delay, life happened. I wasn’t able to build it (some gaps missing in my current setup and I don’t have the knowledge to figure it out in a reasonable amount of time). Is there any alternative?


@panicbuttonvfx, you want to build a Python wheel, right? You can do that via:




which will generate a wheel for you to pip install

Thanks Bane! I was able to build VTK in a different machine and I can confirm that the issue where the viewport goes black while dragging a selection area is not longer happening with the master branch (downloaded today).

I’ve noticed that performance was slower, but I’m not sure if it could be due to an error coming from pyvista that it was printing out in the console a bunch of times per second:

[06-18 14:20:16] p1765 {.../pyvista/utilities/errors.py:53} ERROR - Algorithm vtkSphericalHarmonics(0x7ff59b5e6c50) returned failure for request: vtkInformation (0x7ff59b5e7290)
2020-06-18 14:20:16.765 ( 192.926s) [          76251A]vtkSphericalHarmonics.c:188    ERR| vtkSphericalHarmonics (0x7ff59b5e63a0): Only 2D images with RGB attributes are supported.
[06-18 14:20:16] p1765 {.../pyvista/utilities/errors.py:53} ERROR - Only 2D images with RGB attributes are supported.
2020-06-18 14:20:16.766 ( 192.926s) [          76251A]       vtkExecutive.cxx:753    ERR| vtkCompositeDataPipeline (0x7ff59e6045c0): Algorithm vtkSphericalHarmonics(0x7ff59b5e63a0) returned failure for request: vtkInformation (0x7ff59b5e60e0)
  Debug: Off
  Modified Time: 6357573
  Reference Count: 1
  Registered Events: (none)

Btw, is there a part in 9.0.0’s code that could be edited to achieve the same result? It would be a good temporary solution for me until I can upgrade to the next release.


1 Like

@panicbuttonvfx, it’s tough to know where that error is coming from or what it means without the full context of the code you are running. If it is reproducible, do open an issue on PyVista’s GitHub repo with details

edit it’s important to note that error isn’t coming from PyVista directly but from some VTK code you might be intermixing (? I don’t think PyVista uses the vtkSphericalHarmonics alg). PyVista simply has an error handler for VTK in PyVista that makes these kinds of errors messages a bit easier to work with, so that’s what your seeing from PyVista

Yes, the PyVista error is unrelated I believe. I just mentioned it because it’s an error that’s printing out a fair amount of times per second, and that could be what was causing the performance decrease I was noticing when selecting cells.