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.5.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

obj2mjcf-0.0.5-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: obj2mjcf-0.0.5.tar.gz
  • Upload date:
  • Size: 6.6 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.5.tar.gz
Algorithm Hash digest
SHA256 64c61bff65a59ce1ad97d79702850e6afa871ae3648284eff1f1d8c5982187fa
MD5 5cbda2e33f4754ccd8466ee49cbd48cb
BLAKE2b-256 417d9ad82cfae13a7c2e906af444303e8af36c5afa47dd9afd0e09eb1f78772a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: obj2mjcf-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 7.1 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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 7ec37ca80fce2885ee54deaccecdd34539bf041f3ff329d5c8fdc9a09c403fb6
MD5 779dda1a8aa77778ee7fcc6837ce98a2
BLAKE2b-256 aa54a79ab99f1b1a69f85739182166027c968a504e752813c0a60bbb10defe23

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