Skip to main content

MuJoCo + Google Filament — high-fidelity, faster-than-OpenGL PBR rendering for MuJoCo

Project description

MuJoFil — MuJoCo + Google Filament

High-fidelity, physically-based rendering for MuJoCo, powered by Google Filament instead of the legacy fixed-function OpenGL path — sharper materials, real image-based lighting, and faster frames on modern GPUs.

pip install mujofil

To install the GPU/warp edition together with the base package:

pip install "mujofil[warp]"

This keeps mujofil as the main package while pulling in mujofil-warp as an optional extra dependency.

📖 Full documentation: docs/getting started, API guide, feature reference, cookbook & troubleshooting.

🚀 Running physics on the GPU? For MJWarp (thousands of GPU worlds) with zero-copy torch.cuda observations, use the GPU edition, mujofil-warp.

That's it. The Filament engine is statically compiled into the wheel and the material packages ship inside it, so there's no separate SDK, no compiler, and no PYTHONPATH setup. MuJoCo itself comes from its own pip wheel (a dependency).

⚠️ One thing pip can't install for you: a Vulkan GPU driver

MuJoFil renders on the GPU via Vulkan (with an OpenGL fallback). That driver is part of your operating system and cannot be bundled in a wheel. MuJoFil detects this for you — if it's missing you'll see a clear message on first import mujofil, and mujofil-doctor prints exactly what to install:

OS Install command
Ubuntu/Debian sudo apt install libvulkan1 mesa-vulkan-drivers vulkan-tools
Fedora sudo dnf install vulkan-loader mesa-vulkan-drivers vulkan-tools
Arch sudo pacman -S vulkan-icd-loader vulkan-tools <gpu-vulkan-driver>
macOS LunarG Vulkan SDK (MoltenVK): https://vulkan.lunarg.com/sdk/home#mac
Windows Latest GPU driver, or LunarG SDK: https://vulkan.lunarg.com

NVIDIA GPUs also need the proprietary driver. Headless/no-GPU machines can use the software rasterizer (mesa-vulkan-drivers, "lavapipe"). After installing, run mujofil-doctor to confirm.

Verify your setup

mujofil-doctor      # prints a GPU/Vulkan diagnostic; exit 0 = ready to render

Quick start

import mujoco
from mujofil import VFRenderer, RenderConfig

model = mujoco.MjModel.from_xml_path("scene.xml")
data = mujoco.MjData(model)

r = VFRenderer(model, RenderConfig(width=1920, height=1080))
mujoco.mj_step(model, data)
rgb = r.render(data)        # (H, W, 3) uint8

It's a drop-in renderer swap — same model / data / mj_step as plain MuJoCo, you just build a VFRenderer instead of mujoco.Renderer. A neutral studio HDR is loaded automatically, so even a bare .xml renders photoreal with no lighting setup.

Parallel vision-RL (one call for N environments)

For batched pixel observations, BatchRenderer renders N environments with a single GPU sync — faster than, and simpler than, looping MuJoCo's renderer:

from mujofil import BatchRenderer

datas = [mujoco.MjData(model) for _ in range(32)]
br = BatchRenderer(model, n_envs=32, width=128, height=128, camera_id=0)
obs = br.render(datas)      # (32, 128, 128, 3) uint8 — one call

More runnable scripts in examples/.

What ships in the wheel

  • mujofil/_vf_mujoco_native.*.so — the Filament renderer (Filament linked statically; only libc++/libunwind bundled alongside via auditwheel).
  • mujofil/materials/*.filamat — precompiled Filament material packages.
  • Pure-Python API (VFRenderer, RenderConfig, VFRenderWrapper).

MuJoCo is not bundled — the bindings read mjModel/mjData through pointers and call no MuJoCo functions, so the mujoco pip package satisfies it at runtime.

Optional: USD / GLB asset tooling

pip install "mujofil[usd]" adds converters that turn a USD or GLB environment into a visual GLB plus a MuJoCo collision MJCF — so you can drop a robot into a photoreal scene and have it actually collide with the geometry:

python -m mujofil.tools.usd_to_assets scene.usd --name kitchen

The heavy usd-core / trimesh deps are only pulled by the [usd] extra; the base import mujofil never loads them.

Requirements

  • A GPU with a working Vulkan (preferred) or OpenGL driver — same as any realtime renderer. For headless CI, a software Vulkan (e.g. lavapipe) works.
  • Linux x86-64 (manylinux wheels). macOS / Windows wheels are produced by the same cibuildwheel config.

Building from source

export FILAMENT_DIR=/path/to/filament      # a Filament release
pip install .                              # scikit-build-core + CMake

Multi-platform release wheels are built in CI with cibuildwheel.

License

Apache 2.0 License

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

mujofil-0.1.5.tar.gz (2.2 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

mujofil-0.1.5-cp313-cp313-manylinux_2_34_x86_64.whl (8.9 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

mujofil-0.1.5-cp312-cp312-manylinux_2_34_x86_64.whl (8.9 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

mujofil-0.1.5-cp311-cp311-manylinux_2_34_x86_64.whl (8.9 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

mujofil-0.1.5-cp310-cp310-manylinux_2_34_x86_64.whl (8.9 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

File details

Details for the file mujofil-0.1.5.tar.gz.

File metadata

  • Download URL: mujofil-0.1.5.tar.gz
  • Upload date:
  • Size: 2.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mujofil-0.1.5.tar.gz
Algorithm Hash digest
SHA256 f95abcb22cd0f124238fcc6de0e74a6a4a6029316491128591eb16e748c15c47
MD5 e2d28219e537978d91dc860cc802cb0d
BLAKE2b-256 17e9ced2d93d4f76d811698cfc5e19c0de6581626682acb2f06986a79f115e03

See more details on using hashes here.

Provenance

The following attestation bundles were made for mujofil-0.1.5.tar.gz:

Publisher: wheels.yml on tau-intelligence/MuJoCo-Filament

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mujofil-0.1.5-cp313-cp313-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for mujofil-0.1.5-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 8cdeaca9236dbcb754891271388bc22866d101584170541d9f45846b76213d5d
MD5 e05048f838d9bc2886bf3fab12fc9bd9
BLAKE2b-256 020dd33053a7771177c09db01af432b6a51f632dc68cc9e74242524f621ee7b7

See more details on using hashes here.

Provenance

The following attestation bundles were made for mujofil-0.1.5-cp313-cp313-manylinux_2_34_x86_64.whl:

Publisher: wheels.yml on tau-intelligence/MuJoCo-Filament

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mujofil-0.1.5-cp312-cp312-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for mujofil-0.1.5-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 1e3f5128d72d68360ed164accecfb4bf621964be072a295f5780b783f663e841
MD5 229230bb554b85f2f29a0adeaa507fec
BLAKE2b-256 a149e07a3b57810a3abb4f9ca26aabab07f4ce44c1b87b2f071c56cf8231ffe6

See more details on using hashes here.

Provenance

The following attestation bundles were made for mujofil-0.1.5-cp312-cp312-manylinux_2_34_x86_64.whl:

Publisher: wheels.yml on tau-intelligence/MuJoCo-Filament

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mujofil-0.1.5-cp311-cp311-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for mujofil-0.1.5-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 ad579dceefe38f7c91e5efd41557fbb5d489b29fa5a687828d171acd1ea1960e
MD5 5e30b89786ecdba59894515d190afda9
BLAKE2b-256 511025ee6673c41eb9131638a84338f9484c0e5d4dd739e21659271d83f5d2a9

See more details on using hashes here.

Provenance

The following attestation bundles were made for mujofil-0.1.5-cp311-cp311-manylinux_2_34_x86_64.whl:

Publisher: wheels.yml on tau-intelligence/MuJoCo-Filament

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mujofil-0.1.5-cp310-cp310-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for mujofil-0.1.5-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 68c7354fada3a1aad7ee4f1a4b2463981f019a513c6156d66a4e07a99dd12f43
MD5 5ebef8c5eba53e2dd744814ddbd26aca
BLAKE2b-256 01f417bc26d1ccdd3f0d2c1fc11a7401eb4b2e4287097de78d68efe50daf252d

See more details on using hashes here.

Provenance

The following attestation bundles were made for mujofil-0.1.5-cp310-cp310-manylinux_2_34_x86_64.whl:

Publisher: wheels.yml on tau-intelligence/MuJoCo-Filament

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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