mmatl / pyrender

Easy-to-use glTF 2.0-compliant OpenGL renderer for visualization of 3D scenes.
http://pyrender.readthedocs.io/
MIT License
1.31k stars 226 forks source link

How to use pyrender.Viewer under SSH? #196

Open HaFred opened 3 years ago

HaFred commented 3 years ago

For SSH, seems like the only way is to do the rendering with a visualizer is offscreen rendering. However, I need to do viewer = pyrender.Viewer because I need to do viewer.render_lock.acquire(), whereas the pyrender.OffscreenRenderer class does not have it for me. So I am wondering is it possible to keep using viewer = pyrender.Viewer, while using a headless server with SSH?
Thank you!

HaFred commented 3 years ago

I tried to follow the osmesa installation here. But errors as:

$ ./configure --prefix=/home/zhongad/Downloads/mesa_installation/
configure: error: Direct rendering requires libdrm >= 2.4.75

and to install libdrm I had:

$ sudo apt-get install libdrm-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libdrm-dev : Depends: libdrm2 (= 2.4.101-2) but 2.4.102-1ubuntu1~20.04.1 is to be installed
              Depends: libdrm-intel1 (= 2.4.101-2) but 2.4.102-1ubuntu1~20.04.1 is to be installed
              Depends: libdrm-radeon1 (= 2.4.101-2) but 2.4.102-1ubuntu1~20.04.1 is to be installed
              Depends: libdrm-nouveau2 (= 2.4.101-2) but 2.4.102-1ubuntu1~20.04.1 is to be installed
              Depends: libdrm-amdgpu1 (= 2.4.101-2) but 2.4.102-1ubuntu1~20.04.1 is to be installed
E: Unable to correct problems, you have held broken packages.

In fact I have installed all these dependencies... Is it possible to install and use osmesa for pyrender under Ubuntu 20.04? @mmatl Thank you very much!