body_visualizer icon indicating copy to clipboard operation
body_visualizer copied to clipboard

Remove Hardcoded Platform in `PYOPENGL_PLATFORM`

Open tempoxylophone opened this issue 1 year ago • 0 comments

Hello,

Thank you for your amazing work on this repository! I have been trying to use the visualization tools in src/body_visualizer/tools/vis_tools.py and encountered issues with PyOpenGL. The fix was to follow this here: https://github.com/MPI-IS/mesh/issues/66

When installing this library with pip, pip install git+https://github.com/nghorbani/body_visualizer, the code within the file that overwrites the environment variable PYOPENGL_PLATFORM to always be egl can cause issues. Like in the linked issue, we needed the platform to be set at osmesa for our render code to work.

I've also add the small change in the function meshes_as_png in the same file. The change makes no functional difference, but the argument order in the constructor of MeshViewer was flipped so that width was height and height was width. This is just so that future readers of this code may save a minute or two figuring out why their images look odd if they change the height and width to other values that are not square.

tempoxylophone avatar Jan 25 '24 03:01 tempoxylophone