Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions src/body_visualizer/tools/vis_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -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):
Expand Down