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.2.tar.gz
.
File metadata
- Download URL: obj2mjcf-0.0.2.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c374df248e3125ab994aaaf07c6047ed8befbee3a5f1936f9e6275d31e8c559e |
|
MD5 | 7dca7cc3d0ae562a1f5dbfd196009fc3 |
|
BLAKE2b-256 | 7e8d6b7a9ae2f55abf6bc0a6a75e8c5b9f34169aab3942f6a99923698d955a86 |
File details
Details for the file obj2mjcf-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: obj2mjcf-0.0.2-py3-none-any.whl
- Upload date:
- Size: 6.6 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 | 2041bfd8183982217616164d45d2244a69b5151822a0c0f7e3f755234f4c02a4 |
|
MD5 | 69807cf5d57192fcd8720cacb3b21f96 |
|
BLAKE2b-256 | 127ab08e37536cd6924a8c433b8c0806eb600550e2c9cd6eb74f4393e0f8f4c7 |