Skip to content

Add video_cycles_scenes to save Blender Cycles scenes of run videos - #198

Open
yichao-liang wants to merge 2 commits into
masterfrom
blender-run-videos
Open

yichao-liang wants to merge 2 commits into
masterfrom
blender-run-videos

Conversation

@yichao-liang

Copy link
Copy Markdown
Collaborator

Summary

Adds an opt-in flag that saves a Blender Cycles scene of every frame of a run's videos, to render later on a GPU node with the paper figures' materials, lighting and cameras.
The EMPIRIC project page, its X thread and the RoboDisco site now show videos rendered this way.

The flag.
--video_cycles_scenes True (default off) records a scene per frame as test and failure videos render, into <video_dir>/<video name>_cycles, so nothing that only stepping draws is lost.
A finished continual run exports its video's frames from the recorded states into <run_dir>/cycles, and scripts/continual_video.py --cycles does the same for an earlier run.
Nothing renders during a run.

Rendering.
scripts/cycles_video.py <manifest> renders the frames with Blender (bpy 4.5.3 through uv run), skipping frames already rendered so that a preempted job resumes, and assembles the videos: the run video's panel layout, the test task alone, or the scene alone for a test video.
--tasks N --task k splits the frames across jobs; on an L40S a frame takes about three seconds.

Refactor.
The scene export moves from scripts/paper_figures into predicators/run/cycles_video.py, and the paper figure scripts import it from there.
render_cycles_frames.py is the batch renderer and shares render_cycles_scene.py's scene build.
docs/RENDERING.md documents the pipeline.

README.
The Fan row still described the walled maze, the default before September 28; its preview GIF now shows the paper's ramp scene, and the row says so.

Test plan

  • tests/run/test_cycles_video.py (6 tests): a run's export matches its video frame for frame, state exports and the script, Boil's heat, the run-end hook and the offline export, the live test-video monitor, and a clean exit with the recording kept.
  • CI replay on 57acac9 in CI's Ubuntu 24.04 container (~/ci-tools): all 8 pytest shards pass, and yapf, isort 5.10.1, docformatter, mypy and pylint are clean.
  • Rendered the EMPIRIC paper runs (frame counts match the harness videos) and all 22 RoboDisco solves; the 17 non-benchmark solves were recorded live through the flag.

🤖 Generated with Claude Code

Under --video_cycles_scenes True (default off), test and failure videos
record a Blender Cycles scene of every frame as it renders, into
<video_dir>/<video name>_cycles, and a finished continual run exports
its video's frames from the recorded states into <run_dir>/cycles.
scripts/continual_video.py --cycles does the same for an earlier run.
Nothing renders during a run: scripts/cycles_video.py renders a
manifest on a GPU node with Blender (bpy 4.5.3 through uv) and
assembles the videos.

The scene export moves from scripts/paper_figures into
predicators/run/cycles_video.py, and the paper figure scripts import it
from there; render_cycles_frames.py is the batch renderer and shares
render_cycles_scene.py's scene build. The EMPIRIC project page, its X
thread and the RoboDisco site show videos rendered this way.
The Fan row still described the walled maze, the default before
September 28; its preview GIF now shows the paper's ramp scene.
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.

1 participant