Skip to main content

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


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.3.tar.gz (6.3 kB view hashes)

Uploaded Source

Built Distribution

obj2mjcf-0.0.3-py3-none-any.whl (6.8 kB view hashes)

Uploaded Python 3

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