Skip to main content

A tool for converting Wavefront OBJ files into MuJoCo sub-meshes grouped by material.

Project description

obj2mjcf

PyPI Python Version PyPI version

A tool for converting Wavefront OBJ files to multiple MuJoCo 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

obj2mjcf-0.0.4.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

obj2mjcf-0.0.4-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file obj2mjcf-0.0.4.tar.gz.

File metadata

  • Download URL: obj2mjcf-0.0.4.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for obj2mjcf-0.0.4.tar.gz
Algorithm Hash digest
SHA256 37ec96d682c7d6c3f6e8f721540c0d63d0b198ed1f50411ba67945febd6520f8
MD5 ff6ff017c5db574d2e3859425501fcdc
BLAKE2b-256 3ed36975ee0e67c62ae894fddec26485b865056995c0ad8f9d746aad6a5586fe

See more details on using hashes here.

File details

Details for the file obj2mjcf-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: obj2mjcf-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for obj2mjcf-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 87a554489154fe54b25c8d02bcaf12cb068164539cd293ff051c7ae1fdc2a098
MD5 0761f72b59313e8bd54872ff44c642c3
BLAKE2b-256 eeea6d514703e85fc886b86b14203cadf9d3a98176c7331ef8c13cb01f465551

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page