Skip to content

Enable MuJoCo WASM + Filament Rendering Support in Standalone CMake#3227

Open
MatiasManevi wants to merge 1 commit into
google-deepmind:mainfrom
MatiasManevi:manevi/filament-cmake
Open

Enable MuJoCo WASM + Filament Rendering Support in Standalone CMake#3227
MatiasManevi wants to merge 1 commit into
google-deepmind:mainfrom
MatiasManevi:manevi/filament-cmake

Conversation

@MatiasManevi
Copy link
Copy Markdown
Contributor

@MatiasManevi MatiasManevi commented Apr 17, 2026

Summary (WIP - do not merge)

This PR introduces the character changes required to support Filament-based rendering within the MuJoCo WebAssembly (WASM) bindings using a standalone CMake configuration. This enables a rendering pipeline for the web without a dependency on ThreeJS.

Key changes

  • wasm/CMakeLists.txt: Included MuJoCo platform experimental sources (renderer.cc, window.cc, step_control.cc). Configured Emscripten for WebGL2 and ES3 compatibility. Implemented a CMake-native asset compilation and embedding pipeline. Added dependencies for dear_imgui, implot, and libwebp.
  • wasm/codegen/embed_assets.py: Developed a custom Python utility to convert binary .filamat and .ktx files into C++ source arrays for direct embedding into the WASM module.

Technical Status & Known Blockers

While the CMake infrastructure is now in place, external/standalone builds currently face a blocker regarding Filament host tools.

  1. Filament requires a "Host" build (native) to provide the matc material compiler to the "Target" build (WASM).
  2. Users building outside of Google3 must provide -DFILAMENT_HOST_TOOLS_PATH or -DFILAMENT_IMPORT_EXECUTABLES.
  3. Initial attempts at a standalone Filament host build identified gaps in the generation of ImportExecutables-Release.cmake in certain upstream versions.

Future work

  • Documentation for host-side Filament bootstrap instructions.
  • Automated setup for matc and necessary filament tooling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants