Open eyllanesc opened 2 years ago
Hey Edwin, I also ran into the issue that I get RGB instead of RGBA, specifically when I use osmesa on mac (running with the normal graphics adaptor I got RGBA as expected). I validated that running on linux with osmesa, the issue is indeed resolved, thank you!
On mac with osmesa however, I tried using this branch and it indeed produced an RGBA image, but it's cut so I see only the lower-left quarter. Here's a snippet of my code
scene = pyrender.Scene.from_trimesh_scene(self.glb, bg_color=[0] * 4, ambient_light=[255] * 3)
scene.add(self._camera(), pose=self.glb.camera_transform)
renderer = pyrender.OffscreenRenderer(width, height)
thumbnail, _ = renderer.render(scene, RenderFlags.RGBA)
thumbnail_filename = self._thumbnail_filename(destination)
Image.fromarray(thumbnail).save(thumbnail_filename)
There's another issue about this, specifically with osmesa https://github.com/mmatl/pyrender/issues/137
Attaching an example image produced by this code, when run with PYOPENGL_PLATFORM=osmesa
it's cut, but without the environment variable it's not cut.
Any progress here?
Fixes #209