MuJoCo Rendering Scripts
Render videos for the Hybrid Field–Graph World Model playbook.
Setup (Windows)
pip install mujoco numpy imageio imageio-ffmpeg
Requires Python 3.9+ and MuJoCo 3.x (pure pip install, no separate binary needed).
Scripts
1. render_exp1_push.py — The Indistinguishable Pair
Renders two identical red cubes being pushed with the same force. Steel cube barely moves. Foam cube slides across the table.
python render_exp1_push.py
Outputs:
exp1_push_2N.mp4— Side-by-side push at 2Nexp1_push_5N.mp4— Side-by-side push at 5Nexp1_push_sweep.mp4— Animated force sweep 0.5N → 5N
2. render_exp2_estimation.py — Material Estimation Interactions
Renders a sequence of push interactions on a single object.
python render_exp2_estimation.py
Outputs:
exp2_wood_interactions.mp4exp2_metal_interactions.mp4
3. render_exp3_grasp.py — Grasp Force Demo
Renders grasp attempts at different forces on different materials.
python render_exp3_grasp.py
Outputs:
exp3_grasp_egg.mp4— Egg: success vs crushexp3_grasp_rubber.mp4— Rubber: easy grasp
4. render_scene_overview.py — Multi-object tabletop
Renders a rotating camera view of the full 5-object tabletop scene.
python render_scene_overview.py
Outputs:
scene_overview.mp4
Parameters
Each script has configurable parameters at the top:
WIDTH,HEIGHT— resolution (default 1280×720)FPS— frame rate (default 60)CAMERA_*— camera position and angle
Notes
- All rendering uses MuJoCo's built-in OpenGL renderer (offscreen)
- On Windows, this uses EGL or WGL automatically
- If you get OpenGL errors, try setting
MUJOCO_GL=eglenvironment variable - Videos are encoded as H.264 MP4 via imageio-ffmpeg