[vtkusers] Depth peeling and Qt
Ignacio Fernández Galván
jellby at yahoo.com
Fri Jan 12 07:45:40 EST 2018
Hi all,
I'm trying to get depth peeling and Qt interface to work together with
VTK 6.2.0 (Ubuntu 16.04) and python, and I'm not having much success.
Depth peeling with "plain" VTK works fine
(http://vtk.1045678.n5.nabble.com/Enable-depth-peeling-after-initialization-td5746070.html),
but then problems start
I can't try PyQt4 because "import vtk" crashes (see
https://gitlab.kitware.com/vtk/vtk/issues/16009).
So I modified
https://www.vtk.org/Wiki/VTK/Examples/Python/Widgets/EmbedPyQt to work
with PyQt5. I also modified QVTKRenderWindowInteractor to use PyQt5 and
configure the RenderWindow with:
self._RenderWindow.SetMultiSamples(0)
self._RenderWindow.SetAlphaBitPlanes(1)
but (a): the sphere looks weird, like some facets being inside out and
not being rendered, and (b): depth peeling is not enabled with the
translucent object that works without Qt.
If I use an external (non-Qt) render window, it works fine, but then the
event loop conflicts with Qt and I get a working VTK window and a frozen
Qt interface.
I would appreciate some help or a working example, or even the assertion
that it will never work.
Thanks,
Ignacio
More information about the vtkusers
mailing list