A CLI for processing composite Wavefront OBJ files for use in MuJoCo
Project description
obj2mjcf
obj2mjcf
is a CLI for proccessing composite Wavefront OBJ files for use in MuJoCo. It automatically:
- Splits an OBJ file into sub-meshes that are grouped by the materials referenced in the OBJ's MTL file
- Generates an MJCF XML file that is pre-filled with materials, meshes and geom elements referencing these OBJ files
- Optionally generates a collision mesh by performing a convex decomposition of the OBJ using V-HACD
obj2mjcf
was used to process model meshes for MuJoCo Menagerie:
Motivation
As of June 2022, MuJoCo does not support composite OBJ files consisting of groups or objects (o
or g
OBJ tags) and only 1 material can be assigned per mesh. This means that you have to manually split your OBJ file into sub-meshes, a process that is tedious and error-prone. This tool is meant to automate this process.
Installation
The recommended way to install this package is via PyPI:
pip install --upgrade obj2mjcf
Extra: V-HACD 4.0
We recommend installing V-HACD v4.0. If available, obj2mjcf
will leverage it to create better collision geometry for your OBJ file.
# For macOS and Linux.
bash install_vhacd.sh
Usage
Type the following at the command line for a detailed description of available options:
obj2mjcf --help
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for obj2mjcf-0.0.23-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c829e3f7dcec721cd4ecf5b2c5cae87728d02b25cec67fb036f4153eff832796 |
|
MD5 | 294c1c5ab151870af15b4f4d34a12c93 |
|
BLAKE2b-256 | b80bf75fbe6236c61e07cc6fc2efaec1677c2dd0d07a0c57f24d4e2c6f8ea410 |