pyrender icon indicating copy to clipboard operation
pyrender copied to clipboard

color image have similar values on all channels

Open flugenheimer opened this issue 5 years ago • 9 comments

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.

flugenheimer avatar Apr 27 '19 20:04 flugenheimer

Which offscreen renderer are you using (pyglet, EGL, osmesa)?

mmatl avatar Apr 28 '19 21:04 mmatl

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.

flugenheimer avatar Apr 29 '19 07:04 flugenheimer

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.

mmatl avatar Apr 29 '19 17:04 mmatl

@flugenheimer Were you able to fix your issue?

mmatl avatar May 07 '19 16:05 mmatl

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.

staceycy avatar May 09 '19 07:05 staceycy

@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?

flugenheimer avatar May 10 '19 09:05 flugenheimer

Also tried it on another pc with a GTX 1080, with driver: 390.116

could not get EGL to work

flugenheimer avatar May 15 '19 11:05 flugenheimer

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.

liwenssss avatar Aug 06 '19 02:08 liwenssss

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.

HaFred avatar Dec 05 '22 16:12 HaFred