# MuJoCo Rendering Scripts Render videos for the Hybrid Field–Graph World Model playbook. ## Setup (Windows) ```bash 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. ```bash python render_exp1_push.py ``` Outputs: - `exp1_push_2N.mp4` — Side-by-side push at 2N - `exp1_push_5N.mp4` — Side-by-side push at 5N - `exp1_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. ```bash python render_exp2_estimation.py ``` Outputs: - `exp2_wood_interactions.mp4` - `exp2_metal_interactions.mp4` ### 3. `render_exp3_grasp.py` — Grasp Force Demo Renders grasp attempts at different forces on different materials. ```bash python render_exp3_grasp.py ``` Outputs: - `exp3_grasp_egg.mp4` — Egg: success vs crush - `exp3_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. ```bash 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=egl` environment variable - Videos are encoded as H.264 MP4 via imageio-ffmpeg