Problem : transparent brain with plot_alignment.

External Email - Use Caution

Hi MNE team !

I have a problem with "mne.viz.plot_alignment". The function plots a transparent brain, and I don't manage to change the transparency level. The weird thing is that I don't reproduce the ECOG figure from the MNE website.
--> I used the script available on the website here : https://mne.tools/dev/auto_examples/visualization/plot_3d_to_2d.html#sphx-glr-auto-examples-visualization-plot-3d-to-2d-py
--> This is what I get :

[cid:c08c09e0-0824-4678-9aba-4e2d453c8d20]

For info :
My system is Ubuntu 18.04.4 LTS
MNE is 0.20.0
mayavi is 4.7.1
matplotlib is 3.1.3

Thanks a lot !
Jacques.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20200610/eee475e0/attachment-0001.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Outlook-cxejw4ya.png
Type: image/png
Size: 186883 bytes
Desc: Outlook-cxejw4ya.png
Url : http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20200610/eee475e0/attachment-0001.png

External Email - Use Caution

Hello Jacques,

Do you mind sharing the full report?

python -c "import mne; mne.sys_info()"

We expect more information especially PyQt5, VTK and PyVista.

Personally, I think that this kind of transparency issue is not unknown with mayavi
and the origin can range from an incompatibility issue with intel integrated graphic
cards, the gpu driver version or the behaviour of vtk around opacity in general.

The easiest way i know to fix this for mayavi is to enable depth peeling:

https://github.com/enthought/mayavi/issues/574

But this comes at the price of slightly heavier rendering operations.

Another option is to change the 3d backend to pyvista before the plot:

mne.viz.set_3d_backend("pyvista")

Hopefully this helps,

Guillaume

De: "Jacques Pesnot" <jacques.pesnot at hotmail.fr>
?: "mne analysis" <mne_analysis at nmr.mgh.harvard.edu>
Envoy?: Mercredi 10 Juin 2020 12:05:38
Objet: [Mne_analysis] Problem : transparent brain with plot_alignment.

External Email - Use Caution

Hi MNE team !

I have a problem with "mne.viz.plot_alignment". The function plots a transparent
brain, and I don't manage to change the transparency level. The weird thing is
that I don't reproduce the ECOG figure from the MNE website.
--> I used the script available on the website here : [
https://mne.tools/dev/auto_examples/visualization/plot_3d_to_2d.html#sphx-glr-auto-examples-visualization-plot-3d-to-2d-py
>
https://mne.tools/dev/auto_examples/visualization/plot_3d_to_2d.html#sphx-glr-auto-examples-visualization-plot-3d-to-2d-py
]
--> This is what I get :

For info :
My system is Ubuntu 18.04.4 LTS
MNE is 0.20.0
mayavi is 4.7.1
matplotlib is 3.1.3

Thanks a lot !
Jacques.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20200610/6400ad81/attachment-0001.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Outlook-cxejw4ya.png
Type: image/png
Size: 186883 bytes
Desc: Outlook-cxejw4ya.png
Url : http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20200610/6400ad81/attachment-0001.png

External Email - Use Caution

Thanks a lot Guillaume for your (super quick !) answer !

I tried what you have suggested but did not manage to solve the problem ... So I spent the last 4 hours -_-' trying different things and found that the problem was coming from Ubuntu driver. So for the record, I installed the NVIDIA driver and disabled the "nouveau" default driver as indicated here : https://linuxconfig.org/how-to-install-the-nvidia-drivers-on-ubuntu-18-04-bionic-beaver-linux

[cid:f394ffe9-abb9-493e-b5f0-8310bf7035f4]

For info, my "mne.sys_info()" was :

Platform: Linux-5.3.0-53-generic-x86_64-with-debian-buster-sid
Python: 3.7.6 (default, Jan 8 2020, 19:59:22) [GCC 7.3.0]
Executable: /home/jacques/anaconda3/bin/python
CPU: x86_64: 16 cores
Memory: 31.3 GB

mne: 0.20.0
numpy: 1.18.5 {blas=openblas, lapack=openblas}
scipy: 1.4.1
matplotlib: 3.1.3 {backend=module://ipykernel.pylab.backend_inline}

sklearn: 0.22.1
numba: 0.48.0
nibabel: 3.1.0
cupy: Not found
pandas: 1.0.1
dipy: Not found
mayavi: 4.7.1 {qt_api=pyqt5, PyQt5=5.15.0}
pyvista: 0.25.3
vtk: 8.1.2

Have a nice weekend !
Jacques.