Add video_cycles_scenes to save Blender Cycles scenes of run videos - #198
Open
yichao-liang wants to merge 2 commits into
Open
yichao-liang wants to merge 2 commits into
yichao-liang wants to merge 2 commits into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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, andscripts/continual_video.py --cyclesdoes 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 throughuv 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 ksplits the frames across jobs; on an L40S a frame takes about three seconds.Refactor.
The scene export moves from
scripts/paper_figuresintopredicators/run/cycles_video.py, and the paper figure scripts import it from there.render_cycles_frames.pyis the batch renderer and sharesrender_cycles_scene.py's scene build.docs/RENDERING.mddocuments 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-tools): all 8 pytest shards pass, and yapf, isort 5.10.1, docformatter, mypy and pylint are clean.🤖 Generated with Claude Code