pyrender
pyrender copied to clipboard
color image have similar values on all channels
I tried to run it with the view'er and it looks correct, but running it offscreen just gives the rgb values [38,38,38] where the object should be. The background has the correct color, and the depth image also looks correct.
Which offscreen renderer are you using (pyglet, EGL, osmesa)?
I tried egl and osmesa.
I just tried using the script and model from the quickstart "minimal example of offscreen rendering" and when i run it using either egl or osmesa i get the following error
OpenGL.error.NullFunctionError: Attempt to call an undefined function glGenVertexArrays, check for bool(glGenVertexArrays) before calling
maybe i did not install something correctly?
Sorry for the rookie questions - 3D rendering is a new area for me.
No stress! Make sure to follow the instructions for installing OSMesa if you're using that (see here: https://pyrender.readthedocs.io/en/latest/install/index.html#getting-pyrender-working-with-osmesa). For EGL, some NVIDIA drivers work with it, while some don't - it can be a bit finnicky.
@flugenheimer Were you able to fix your issue?
Hi @mmatl ,
I ran into the same problem. Attached is my code: py_render.txt
-
It gives following error when I use a monitor:
File "/home/user/anaconda3/lib/python3.7/site-packages/OpenGL/platform/baseplatform.py", line 407, in call self.name, self.name, OpenGL.error.NullFunctionError: Attempt to call an undefined function glGenVertexArrays, check for bool(glGenVertexArrays) before calling
-
It gives following errors when I use SSH:
File "/home/user/anaconda3/lib/python3.7/site-packages/pyrender/viewer.py", line 347, in init self._init_and_start_app() File "/home/user/anaconda3/lib/python3.7/site-packages/pyrender/viewer.py", line 995, in _init_and_start_app height=self._viewport_size[1]) File "/home/user/anaconda3/lib/python3.7/site-packages/pyglet/window/xlib/init.py", line 170, in init super(XlibWindow, self).init(*args, **kwargs) File "/home/user/anaconda3/lib/python3.7/site-packages/pyglet/window/init.py", line 592, in init config = screen.get_best_config(config) File "/home/user/anaconda3/lib/python3.7/site-packages/pyglet/canvas/base.py", line 197, in get_best_config raise window.NoSuchConfigException() pyglet.window.NoSuchConfigException
Could you please help to give some advice? Thanks.
@mmatl: I tried installing osmesa again first by using the .deb file, which did not solve the issue, and then by building it from source, which also did not help.
so i am still kind of stuck - is there another way to test if it has been installed correctly?
Also tried it on another pc with a GTX 1080, with driver: 390.116
could not get EGL to work
Hi @mmatl ,
I ran into the same problem. Attached is my code: py_render.txt
- It gives following error when I use a monitor: File "/home/user/anaconda3/lib/python3.7/site-packages/OpenGL/platform/baseplatform.py", line 407, in call self.name, self.name, OpenGL.error.NullFunctionError: Attempt to call an undefined function glGenVertexArrays, check for bool(glGenVertexArrays) before calling
- It gives following errors when I use SSH: File "/home/user/anaconda3/lib/python3.7/site-packages/pyrender/viewer.py", line 347, in init self._init_and_start_app() File "/home/user/anaconda3/lib/python3.7/site-packages/pyrender/viewer.py", line 995, in _init_and_start_app height=self._viewport_size[1]) File "/home/user/anaconda3/lib/python3.7/site-packages/pyglet/window/xlib/init.py", line 170, in init super(XlibWindow, self).init(*args, **kwargs) File "/home/user/anaconda3/lib/python3.7/site-packages/pyglet/window/init.py", line 592, in init config = screen.get_best_config(config) File "/home/user/anaconda3/lib/python3.7/site-packages/pyglet/canvas/base.py", line 197, in get_best_config raise window.NoSuchConfigException() pyglet.window.NoSuchConfigException
Could you please help to give some advice? Thanks.
hello, have you solved the second error, I got the same error and don't know solve it.
os.environ['PYOPENGL_PLATFORM'] = 'egl'
For those who try to do offscreen like me with this line, might get this error above. Removing this line helps.