glue-viz / glue

Linked Data Visualizations Across Multiple Files
http://glueviz.org
Other
728 stars 152 forks source link

3D plots not able to show properly #2337

Open xiaohanzai opened 1 year ago

xiaohanzai commented 1 year ago

I installed via pip install glueviz pip install glue-wwt pip install PyQt5

I tried conda install first but it always gets stuck at solving environment, so I had to use pip. When I try doing 3D scatter, the plot cannot show up properly, but instead shows something like a mirror of the entire glue window: IMG_1946

By default the vispy version is 0.11.0, and the error messages are WARNING: Could not create NSOpenGLContext with shared context, falling back to unshared context. WARNING:vispy:Could not create NSOpenGLContext with shared context, falling back to unshared context. WARNING: Error drawing visual <glue_vispy_viewers.compat.text.TextVisual object at 0x18d234e50> WARNING:vispy:Error drawing visual <glue_vispy_viewers.compat.text.TextVisual object at 0x18d234e50> WARNING: Traceback (most recent call last): ...... RuntimeError: Shader compilation error in GL_FRAGMENT_SHADER: WARNING: 0:3: extension 'GL_OES_element_index_uint' is not supported WARNING: 0:4: extension 'GL_OES_standard_derivatives' is not supported on line 1482: Invalid call of undeclared identifier 'CatRom' rgb = CatRom(u_font_atlas, u_font_atlas_shape, uv); WARNING:vispy:Traceback (most recent call last): ...... ERROR: Invoking <bound method SceneCanvas.on_draw of <SceneCanvas (PyQt5) at 0x7faa83371d00>> for DrawEvent ERROR:vispy:Invoking <bound method SceneCanvas.on_draw of <SceneCanvas (PyQt5) at 0x7faa83371d00>> for DrawEvent WARNING: Error drawing visual <glue_vispy_viewers.compat.text.TextVisual object at 0x7faa833a6100> WARNING:vispy:Error drawing visual <glue_vispy_viewers.compat.text.TextVisual object at 0x7faa833a6100> ERROR: Invoking <bound method SceneCanvas.on_draw of <SceneCanvas (PyQt5) at 0x7faa83371d00>> repeat 2 ERROR:vispy:Invoking <bound method SceneCanvas.on_draw of <SceneCanvas (PyQt5) at 0x7faa83371d00>> repeat 2 WARNING: Error drawing visual <glue_vispy_viewers.compat.text.TextVisual object at 0x7faa833a6100> WARNING:vispy:Error drawing visual <glue_vispy_viewers.compat.text.TextVisual object at 0x7faa833a6100> WARNING: Error drawing visual <glue_vispy_viewers.compat.text.TextVisual object at 0x7faa833a6100> WARNING:vispy:Error drawing visual <glue_vispy_viewers.compat.text.TextVisual object at 0x7faa833a6100> ERROR: Invoking <bound method SceneCanvas.on_draw of <SceneCanvas (PyQt5) at 0x7faa83371d00>> repeat 4 ERROR:vispy:Invoking <bound method SceneCanvas.on_draw of <SceneCanvas (PyQt5) at 0x7faa83371d00>> repeat 4

I tried installing vispy 0.9.6 and 0.10.0 instead. Then there's no error message anymore, just warnings, but the 3D plots are still not able to show.

My python version is 3.10.6 (pip installed everything in /usr/local/lib/python3.10/site-packages), and my system is MacOS Monterey 12.6.

xiaohanzai commented 1 year ago

Update:

I tried removing everything and installing again, with conda install. Now 3D plots managed to work. vispy version is 0.9.3. I still get errors when moving 3D scatter around with mouse, but that's probably ok. Now glue-wwt doesn't work though. It's just black. I get these warnings still which I don't know if relevant:

WARNING: QCocoaGLContext: Falling back to unshared context. WARNING:vispy:QCocoaGLContext: Falling back to unshared context.

dhomeier commented 1 year ago

Thank you for reporting this. I think this is primarily an issue of the glue-vispy-viewers package installed with glueviz. I could reproduce problems with vispy 0.11.0, just showing an empty cube, but not with 0.9.6 or 0.10. This should hopefully be fixed by glue-viz/glue-vispy-viewers#373.

Could you report the version info you have currently installed with pip show glue-vispy-viewers, and if < 1.0.5, try to upgrade with pip install --upgrade glue-vispy-viewers==1.0.5? Then perhaps try to install vispy from conda with conda install vispy=0.10 (this is the version I tested; the pip wheels might not work as well under Monterey).

If possible, you might also try the development with the above fix from pip install --upgrade git+https://github.com/glue-viz/glue-vispy-viewers.git to see if that resolves the failures with vispy 0.11.0.

xiaohanzai commented 1 year ago

Hi, sorry for my late reply! I managed to install glue again via conda, and now 3D plots are able to work out. But wwt doesn’t work anymore — it just appears to be black. Attached are screenshots.

The versions are: glueviz 1.2.0 glue-wwt 0.5 vispy 0.9.3

(This bug doesn’t bother me right now because I’m only using 3D plots, not wwt yet.)

Xiaohan

Screenshot 2022-11-06 at 6 55 40 PM Screenshot 2022-11-06 at 6 55 32 PM

On Oct 21, 2022, at 12:15 PM, Derek Homeier @.***> wrote:

Thank you for reporting this. I think this is primarily an issue of the glue-vispy-viewers package installed with glueviz. I could reproduce problems with vispy 0.11.0, just showing an empty cube, but not with 0.9.6 or 0.10. Could you report the version info you have currently installed with pip show glue-vispy-viewers, and if < 1.0.5, try to upgrade with pip install --upgrade glue-vispy-viewers==1.0.5? If possible, you might also try the latest version in development from pip install --upgrade git+https://github.com/glue-viz/glue-vispy-viewers.git. Then perhaps try to install vispy from conda with conda install vispy=0.10 (this is the version I tested; the pip wheels might not work as well under Monterey).

— Reply to this email directly, view it on GitHub https://github.com/glue-viz/glue/issues/2337#issuecomment-1287173619, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHGEI5MCZG2HQWHQFH2HHPLWEK6QTANCNFSM6AAAAAARGTJSQA. You are receiving this because you authored the thread.