diff --git a/src/body_visualizer/tools/vis_tools.py b/src/body_visualizer/tools/vis_tools.py index d422b20..96b1f16 100644 --- a/src/body_visualizer/tools/vis_tools.py +++ b/src/body_visualizer/tools/vis_tools.py @@ -25,13 +25,12 @@ import cv2 import os import trimesh -# import platform -# if 'Ubuntu' in platform.version(): -# print('In Ubuntu, using osmesa mode for rendering') -# os.environ['PYOPENGL_PLATFORM'] = 'osmesa' -# else: -# print('In other system, using egl mode for rendering') -os.environ['PYOPENGL_PLATFORM'] = 'egl' + +# Depending on operating system, one may need to set this environment variable, like this: +# os.environ['PYOPENGL_PLATFORM'] = 'egl' +# See related issues that may provide leads to fix it if needed: +# https://github.com/mkocabas/VIBE/issues/101 +# https://github.com/MPI-IS/mesh/issues/49#issuecomment-705194582 colors = { @@ -179,7 +178,7 @@ def meshes_as_png(meshes, outpath=None, view_angles=[0, 180]): imw = 800 imh = 800 - mv = MeshViewer(imh, imw) + mv = MeshViewer(width=imw, height=imh) mv.set_cam_trans([0, -.5, 1.75]) images = np.zeros([len(meshes), len(view_angles), 1, imw, imh, 3]) for mIdx, mesh in enumerate(meshes):