-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[BUG] 3d points with opacity < 1 are invisible #7977
Comments
I should note this is a problem for both mayavi and pyvista backends. here is the output from the new sys_info:
|
I cannot replicate on my mac but I guess it's expected
… |
This is almost certainly a MESA bug, but VTK might give us some way to force the rendering to work. @bloyl instead of making both opaque, can you check instead if setting the head surface opacity to 0.999 works? |
if I set the opacity of the surface < 1 it disappears. |
Any way you can upgrade your MESA version? You have 18.3.4 and 18.3.6 is what CircleCI uses, and it produces all of our rendered docs... |
That is just what I was hoping to hear! |
... and if you want to try something else quicker before that, try running the same If you're already using software rendering with the same options as CircleCI, no point in trying that, though. You can also try CircleCI's LIBGL_DEBUG line and see if the output is the same. But based on the rendering info from PyVista, it should be. |
@bloyl any luck here? |
Unfortunately no. I don't have admin on the system in question so can't
really dig into it my self. I do have an open ticket with IS to look at it.
But I can't imagine it's high on their priority list.
Feel free to close if you want. I can always reopen if their are mne
changes that would help.
…On Mon, Aug 10, 2020, 12:21 PM Eric Larson ***@***.***> wrote:
@bloyl <https://github.com/bloyl> any luck here?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#7977 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABKTXHNIQ63A3N2MPLGUFYDSAAM75ANCNFSM4OUPVSFA>
.
|
You could probably compile an osmesa/software rendered version locally in your home directory somewhere and then launch an Xvfb instance that uses it for OpenGL. For example:
You can cut out the vncviewer business if you're doing it remotely. But these are the sorts of commands I'd use to test on a system that actually has a display. I think I've used this sort of thing before on my Ubuntu 20.04 system with NVIDIA graphics to spin up a Mesa/swrast-rendered So maybe you "just" need to compile a newer version of Mesa yourself locally... |
Locally (Ubuntu 20.04) I can run this:
And from there, use my NVIDIA drivers:
Or the builtin Ubuntu 20.04 mesa:
And the 18.3.6 one I just built almost works when I use an env with VTK 8.1.2:
I can keep hacking at this, but before I put more effort into it, let me know if you can even get the necessary For example, VTK9 fails with an informative error that GLSL1.5.0 must be supported, so building a newer 19.x or 20.x might work better... |
This is what I got from IT: We’re running CentOS Linux release 7.8.2003 (Core) As for the MESA drivers, the are fairly current for the distribution since they got patched when the OS was patched: |
I am also running some version of redhat/centos 7 so I suspect my setup is similar to @olafhauk 's . I'm able to duplicate the steps from @larsoner (above) to build and try it using xvfb-run: getting similar results. Interestingly I also tried building mesa.18.3.4 using the same steps and received the same error. I suspect that we'll need to try to reinstall vtk against mesa.18.3.6. I'm not too familar with using xvfb and xvfb-run but I might play with it some this weekend. |
I'm not sure what this means. VTK should just use whatever OpenGL libraries are available, and these should be set by using xvfb-run (or not), and what LD_LIBRARY_PATH and such are. Hence why I'm optimistic that some local compilation plus xvfb-run should work... |
you are probably correct.
Even if I attempt to force the issue it doesn't work.
I can't find any suggestions on configuring mesa, so i'm not sure what the best next step is. |
From #7977 (comment), I see that |
vtk 8.1.2 I don't think is available for the python currently in the environment (3.8.3). I could try to roll things back but at the end of the day I'm not sure if its worth it. I'm currently leaning towards a docker approach, to just skip these types of issues. although If i could find the magic config flags for mesa that would solve it I'd probably do that too :) |
@bloyl it looks like the real problem is that we aren't setting the paths properly -- the llvmpipe driver is elsewhere. Check this out: $ MESA_GL_VERSION_OVERRIDE=3.3 LIBGL_DRIVERS_PATH="${PWD}/lib/gallium" LD_LIBRARY_PATH="$PWD/lib/gallium" xvfb-run glxinfo | grep -i opengl
OpenGL vendor string: VMware, Inc.
OpenGL renderer string: llvmpipe (LLVM 16.0, 256 bits)
OpenGL core profile version string: 3.3 (Core Profile) Mesa 18.3.6
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.3 (Compatibility Profile) Mesa 18.3.6
OpenGL shading language version string: 3.30
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.0 Mesa 18.3.6
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00
OpenGL ES profile extensions: And no compliants from PyVista, which does some VTK stuff that complains with the commands above: $ MESA_GL_VERSION_OVERRIDE=3.3 LIBGL_DRIVERS_PATH="${PWD}/lib/gallium" LD_LIBRARY_PATH="$PWD/lib/gallium" xvfb-run python -c "import pyvista; print(pyvista.Report())"
--------------------------------------------------------------------------------
Date: Thu Oct 08 12:42:46 2020 EDT
Linux : OS
8 : CPU(s)
x86_64 : Machine
64bit : Architecture
62.8 GB : RAM
Python : Environment
VMware, Inc. : GPU Vendor
llvmpipe (LLVM 16.0, 256 bits) : GPU Renderer
3.3 (Core Profile) Mesa 18.3.6 : GPU Version
Python 3.8.5 (default, Jul 28 2020, 12:59:40) [GCC 9.3.0]
0.26.0 : pyvista
9.0.1 : vtk
1.20.0.dev0+eec0aa2 : numpy
2.9.0 : imageio
1.4.3 : appdirs
0.5.1 : scooby
4.0.8 : meshio
3.3.1.post1016+gb4fd83cf7 : matplotlib
0.2.0 : pyvistaqt
5.15.0 : PyQt5
7.15.0 : IPython
1.6.0.dev0+d38e9cb : scipy
4.48.0 : tqdm
-------------------------------------------------------------------------------- @olafhauk you can try the lines above (adapted; apt-get will not work on CentOS) to build these drivers, then the line in this comment to see if PyVista will produce a report. If it does, you should be good to go by doing some variant of setting these env vars on your system. |
(I figured this out after trying a bunch of stuff that didn't work, then noticing in one of the links I hit in my searches https://docs.mesa3d.org/osmesa.html#building-osmesa it mentions that the Gallium-based driver is one directory deeper...) |
And actually it looks like the |
... scratch that, it does help the non-core profile case, which might matter (?). |
Hi - is there an update on this? I still couldn't get it to work in the development version, and am still talking to our IT guys to find out more about our graphics set up. Is it working for everyone else? |
@olafhauk something like this should work (you'll need to use the
If this says it's using Mesa I made an Ubuntu 18.04 VM yesterday so that I could make VTK9 wheels. I actually already have a CentOS VM I could try the above procedure on. I'll give it a shot and if it works, I could probably bundle the |
@olafhauk @bloyl in my year-or-so-out-of-date CentOS 7 VM I did:
Then I did a variant of the compile commands above:
I In order to actually try MNE commands I need to update the OS using |
Okay doing:
Replicated the translucency problem, there are no points shown: Then doing the build instructions above were not quite enough. I adjusted them based on this site to install and use LLVM properly, and to include EGL and GLES (why not):
seemed to fix things: I've updated the link to the archive of the |
this info should probably make its way into the advanced install docs... I think there's already a section on troubleshooting 3Dviz, it should go there. Any volunteers? |
Hi, |
it seems you updated vtk since you setup your MNE environment.
I would recommend you create a fresh / new env following:
https://mne.tools/dev/install/mne_python.html#installing-mne-python-and-its-dependencies
let me know if I can help.
… |
But I did it yesterday! |
@LeilaNS what is your |
@larsoner |
Closing as I think we have fixed bugs with 3D option setting, improved the docs on how to deal with at least some of these issues, and warn if an old version of MESA is used |
On (some?) linux virtual machines that use mesa_gl rendering, you can't visualize 3d points with any level of opacity. This affects
mne coreg
,plot_alignment
etc.You can recreate the issue by running https://mne.tools/dev/auto_examples/visualization/plot_eeg_on_scalp.html#sphx-glr-auto-examples-visualization-plot-eeg-on-scalp-py.
the figure below shows 2 plots. On the right is the default plot. and on the left is after I manually adjust the opacity using mayavi settings.
this is with
export MESA_GL_VERSION_OVERRIDE=3.3
and isn't affected byMNE_3D_OPTION_ANTIALIAS
.This is most likely a vtk bug with old versions of LLVM but it would be good to figure out a minimum version of LLVM.
From looking at #7976 it seems one of our test systems is close to my system. I wonder if we could evaluate this there?
The text was updated successfully, but these errors were encountered: