MuJoCo Studio#
MuJoCo Studio is a Python and C++ SDK for building interactive simulations, research tools, and custom visualizers that run in a native desktop window or in a web browser with no changes to user code. It is the next iteration of the simulate application and mujoco.viewer, replacing the classic OpenGL renderer and fixed mjUI panels with Filament physically based rendering, Dear ImGui immediate-mode UI, and a modular plugin system.
Quick Start#
In the browser (zero install): Open live.mujoco.org and drag-and-drop any
.xml,.mjb, or.mjzmodel onto the canvas, or share a model URL via?model=github:<org>/<repo>/<branch>/<path>(see MuJoCo Live).Standalone desktop app: Download the latest release and open
MuJoCoStudio.appon macOS,bin\mujoco_studio.exeon Windows, orbin/mujoco_studioon Linux (see Standalone Application).From the Python CLI: Launch the Studio viewer in a native window or stream it headlessly to a browser:
python -m mujoco.studio.viewer --model=humanoid.xml # native desktop window python -m mujoco.studio.viewer --model=humanoid.xml --gfx=web # headless web viewer
Inside a Python simulation loop: Attach a non-blocking viewer (
launch_native.launchorlaunch_web.launch) without lockingmodelordata:import mujoco from mujoco.studio import app as studio_app, launch_native # or launch_web model = mujoco.MjModel.from_xml_path('humanoid.xml') data = mujoco.MjData(model) with launch_native.launch(plugins=[studio_app.App()]) as handle: while handle.is_running(): model, data = handle.sync(model, data) mujoco.mj_step(model, data)
Overview#
MuJoCo also ships self-contained agent SKILL files
under doc/skills/—including mujoco-studio and mujoco-gui—with idiomatic API patterns and common
pitfalls for both developers and AI coding assistants.
Core Components#
MuJoCo Studio is organized around five building blocks shared across C++ and Python:
Studio Viewer Application: The full-featured interactive visualizer, implemented as
mujoco::studio::App(app.h) in C++ andstudio_app.App(app/plugins.py) in Python. It provides model loading, simulation history scrubbing, step controls, performance profiling, an integrated log and warning console, and scene hierarchy inspection.Composable Plugins: Modular components that extend the viewer UI, 3D scene, and physics stepping. In Python, the standard Studio UI (studio_app.App), real-time physics stepping (StepControl), and trajectory history recording (SimHistory) are themselves implemented as ViewerPlugin and SimPlugin subclasses communicating over non-blocking message channels.
Immediate-mode UI: Powered by Dear ImGui, the immediate-mode GUI (IMGUI) paradigm minimizes superfluous state duplication, state synchronization, and UI-side state retention—making it less error-prone than traditional retained-mode interfaces and well suited for fast iteration on dynamic visualization and debugging tools that directly reflect live simulation data. Rather than touching GPU state directly, widget calls output compact vertex buffers and draw command lists that can be rendered locally or streamed remotely (see WebViewer).
Running in the Browser: Studio offers two web viewers: MuJoCo Live runs entirely in the browser and can be hosted on a static page, whereas WebViewer streams a host-driven Python simulation and UI to the browser with no GPU or display server required on the host.
Physically Based Rendering: Hardware-accelerated physically based rendering (PBR) via Filament across OpenGL, Vulkan, and WebGL, plus headless and software rasterizers for automated testing. For background on Filament and physically based rendering theory, see the Filament documentation, the online Physically Based Rendering in Filament guide, and Physically Based Rendering: From Theory to Implementation.
Legacy Visualizers#
Feature |
Legacy mujoco.viewer |
MuJoCo Studio |
|---|---|---|
GUI Framework |
Dockable Dear ImGui windows ( |
|
3D Renderer |
Fixed-function classic OpenGL ( |
Filament (OpenGL, Vulkan, WebGL, headless/software) |
Web Support |
None (requires local display or X11/VNC) |
MuJoCo Live (standalone WASM) & Python WebViewer (streamed ImGui + WASM) |
Architecture |
Monolithic loop with coupled UI and physics |
Composable ViewerPlugin / SimPlugin classes (Python) and callback plugins (C++) |
Synchronization |
Message passing in Python; internal physics mutex in C++ ( |
|
Live Iteration |
Static model reload only |
Model file watching and live Python plugin hot reload |