A tool for converting Wavefront OBJ files into MuJoCo sub-meshes grouped by material.
Project description
obj2mjcf
A tool for converting Wavefront OBJ files into MuJoCo sub-meshes grouped by material.
Currently, MuJoCo does not support OBJ files with groups or objects (i.e., o
or g
). Furthermore, only 1 material can be assigned per mesh. This tool is designed to split such OBJ files into sub-meshes grouped by material. The resulting sub-meshes can then be used as a drop-in replacement for the original OBJ file. The result is vastly enhanced visuals for your model:
Before | After |
---|---|
Installation
The recommended way to install this package is via PyPI:
pip install obj2mjcf
If you additionally install V-HACD 4.0, this tool will create a convex decomposition of the mesh to use as the collision geometry.
Usage
usage: obj2mjcf [-h] --obj_dir OBJ_DIR [--use_vhacd] [--save_mtl] [--save_mjcf] [--verbose]
optional arguments:
-h, --help show this help message and exit
--obj_dir OBJ_DIR Path to a directory containing obj files.
--use_vhacd Whether to create a convex decomposition for the collision geom.
--save_mtl Whether to save the mtl files.
--save_mjcf Whether to save an example MJCF file.
--verbose Whether to print verbose output.
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
File details
Details for the file obj2mjcf-0.0.3.tar.gz
.
File metadata
- Download URL: obj2mjcf-0.0.3.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b43d3854f631a1a6dc03fe5cf059203fc6bf6038fcb4dbad14f171a75e0079ae |
|
MD5 | 249ad2615664eee34ca359b88805c83f |
|
BLAKE2b-256 | 8767cb8b8cebf04812615277b8f17bfcb8f2270d7448b93d3dee512724caded4 |
File details
Details for the file obj2mjcf-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: obj2mjcf-0.0.3-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 26a0050c4dc5d7f97b2b2c09a99b2b9ced321deefa8fcb466921779f1ba12a71 |
|
MD5 | f63ddb5725a1212436c80d24647c960d |
|
BLAKE2b-256 | b0a02796e7c75e9d1d0dc51d68d55ee5d361173f032ff3da31eea46e02ccf540 |