-
Notifications
You must be signed in to change notification settings - Fork 286
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect order in foreground objects (wrong object visibility) #656
Comments
I seem to be having the same issue with plot3d points placed around a 'globe':
|
+1 for pyqt/pyside backend, testing on Debian stretch with [email protected] and [email protected] |
@jmp75 i had the same problem..could you please confirm which version of mayavi worked? |
@lhvalentini I have this working using an Anaconda 2 (python 2.7.15) on Windows 10, with the packages mayavi 4.5.0 and vtk 6.3.0. |
Folks, if this is an issue with opacity, that is a different problem. I tried the OPs code and it works correctly for me. If this is an OS specific issue it is probably an issue with your drivers as it definitely looks right for me on my Mac OS machine with VTK 8.1.1 and Mayavi from master. I doubt that anything has changed in Mayavi to fix this. |
@prabhuramachandran I will see if I can diagnose further to isolate the (a) root cause; indeed mayavi as such is not likely to be where something needs to be fixed if at all but will report in this thread if I can point to something helpful. |
I can reproduce the problem (using the colored balls example above) on RHEL 7, PyQt5, and Mayavi 4.6.2. I have been able to make it work correctly by uninstalling PyQt5 and installing wxPython. Unfortunately, I need PyQt5. On one of the two machines I am working with I can run it under VirtualGL (still using RHEL 7, PyQt5, and Mayavi 4.6.2), and the problem goes away. However, on the other machine (the production machine) VirtualGL causes Mayavi to crash. Any suggestions on how to fix this when using PyQt5? |
Does the fact that I reproduced the problem in PyQt5 but not in wxPython provide any clues? |
An update. This issue looks like a Qt5 issue on Linux. I am able to see this on my ubuntu machines but not on OS X. Not sure about windows. I do not see it with a Qt4 backend. So it looks like somehow rendering is messed up when we use Qt5 and the QVTKRenderWindowInteractor. I've reported this issue upstream to the VTK folks as well. Am not sure what the issue is. |
Same problem here. I moved back to Qt4 and everything works fine. |
I have this problem on Linux with Qt4 (activated with ipython's %gui qt4). Although maybe it's because I have Intel Graphics (something related already mentioned in the known issues). |
I had to install Qt4 too; somehow before that just putting "qt4" in the options didn't yield an error message, but used Qt5 instead. |
ok i didn't realise that qt4 was not installed on my end (indeed, @ronceray, it doesn't yield an error)... PyQt 4.12.3 didn't run, but I was able to get it to work with version 4.12.1.. Much laggier than PyQt5, but it doesn't have this foreground issue... saves me from setting up another graphics card! |
I upgraded from Fedora 27 -> Fedora 29 and installed the latest NVIDIA graphics drivers. After this, mayavi performs as expected using pyqt5. |
I have been struggling with the same problem (incorrect depth order rendering) using Python3 for the last few weeks, and thought I'd share my experience here as well (as of 2019-04-15). Just so we're on the same page, here are the versions I am looking at:
Mayavi/VTK/traits can use either the 'wx' toolkit or the 'qt4' toolkit. Wth the 'qt4' toolkit, there is the further option of specifying the QT API; the choices are 'pyqt', 'pyqt5', 'pyside', and 'pyside2'. These are specified with the environment variables ETS_TOOLKIT (set it to wx or qt4) and QT_API (set it to pyqt, pyqt5, pyside, or pyside2; only applicable if ETS_TOOLKIT is set to qt4). Under Mint 18.3 (and probably for any Ubuntu 16.04 variant), the official Python3 is 3.5.2. Some modules are available with apt/dpkg, but several require using pip to install. I could not get wxPython to install for Python3. Using Qt, the results vary:
With Mint 19.1 (and probably all Ubuntu 18.04 variants) the results are similar. The Python3 version is 3.6.7; all the modules are the same as before, except that here I was able to install wxPython (4.0.1) with pip3. In this case setting ETS_TOOLKIT=wx gives the correct depth order. As for the qt4 toolkit, the results were the same as the Mint 18.3 results (i.e., pyqt and pyside rendered correctly; pyqt5 and pyside2 did not). I tried compiling PySide2 from source and was able to get it to compile; the rendering is still wrong however. I also tried using pyenv to test different versions of Python3 (in particular 3.5.2 and 3.7.3). In both cases, I could install the necessary modules through pip3, except the official PySide code does not support Python versions higher than 3.4. PySide2 is available, as is PyQt5; neither of these work correctly. I could not get wxPython to compile. At this point, I am wondering if it is not a VTK problem, but rather a QT problem (I have given up on wxPython now). But curiously, on my work laptop (with Mint 18.3), with pyenv I had Python 3.7.3 running, and in this case, the depth order was rendered correctly -- with either PyQt5 or PySide2 (whereas on my home laptop both of the QT_API gave the wrong depth order). So what was the difference? As far as I can tell, the only difference was the OpenGL/GLX driver: my home laptops runs the SGI driver (as reported by glxinfo), while my work laptop uses the NVIDIA driver. Finally, I also tried running a couple of tests with VirtualBox (Mint 19.1 with xfce). I am still trying different combinations, but so far the results are the same. (The glxinfo reports the OpenGL/GLX driver as SGI). |
This thread on VTK ML seems to mention the same problem. Unfortunately, it was left unanswered... |
On a hunch I tried something on my Debian laptop worth reporting. This is an NVIDIA Optimus laptop as described in the Debian wiki. Basically there are two graphic cards on these systems: NVIDIA and Intel. Short story: all other things being equal the original test script I posted renders incorrectly on the Intel card but correctly on the NVIDIA hardware. environment (relevant packages):
See the Debian wiki for how to use
whereas
|
Just to add another confirmation, here on Arch Linux on a Dell Precision 5520, I see the issue running on the intel chip, but not with the nvidia card via |
Same issue, running mayavi with PyQt5 backend results in incorrect rendering order using Mesa/SGI drivers on Debian Stretch, but it works with |
I solved this by using wxPython instead of PyQt. |
This thread was just invaluable in solving the issue, many thanks for the comments. Same problem, could not make it work with wx, so installed python-pyqt4, set |
After reproducing the problem (using the colored balls example above) earlier today, I was able to resolve the problem in a conda environment that contained:
So perhaps VTK 9 fixes this issue? |
I can confirm that VTK 9.0.1 with pyqt5 and Mayavi 4.7.2 (from conda-forge) fixes this issue. |
Yes indeed, I can confirm that this issue is now resolved with VTK-9.0.1 and the latest Mayavi, although it looks like VTK is where the fix has originated. I tested on a Linux machine where this used to fail earlier. This is great. Thanks for reporting it. |
I am far from proficient with 3D viz and not sure this is a mayavi issue as such (apologies if I bark up the wrong tree), but I observe the following, unexpected behavior:
Environment:
conda, anaconda 3, installed mayavi using
pip install mayavi vtk pyqt5
rather than conda (after bumping into a similar issue to #652)Repro
The colored balls should surround the grey pipe, hiding portions of it, below.
I do get the expected behaviors with a prior version of mayavi on a different OS- Windows (mayavi version TBC, probably 4.5)
The text was updated successfully, but these errors were encountered: