This is a minimal, framework-free skeleton for a multi-agent "video world" system:
WorldStateholds a dictionary ofObjectStateentries keyed by object idDirectorbroadcastsSceneObjectivemessages toObjectAgentinbox queues (asyncio.Queue)- Each
ObjectAgentruns an async state machine (idle→acting→stopped) and uses an injectedJSONLLMto propose the next 24 frames as structured JSON
python3 -m mvg.demoblender/world_executor.py reads a per-frame WorldState buffer (JSONL or JSON), applies object transforms, and renders a visible headless frame sequence.
If a compositor tree is available, it also writes technical passes; otherwise it falls back to RGB frames so the demo still produces visible output.
This produces a world.jsonl buffer (one frame per line) that you can feed into the Blender executor.
python3 -m mvg.demo_pipeline --out-jsonl /tmp/mvg_world.jsonl --frames 24Example JSONL (one line per frame):
{"frame":1,"objects":{"car_1":{"id":"car_1","position":[0.0,0.0],"velocity":[1.0,0.0],"current_action":"moving"}}}Run headless:
blender -b --factory-startup -P blender/world_executor.py -- \
--worldstate-jsonl /abs/path/world.jsonl \
--output-dir /abs/path/out \
--frame-start 0 --frame-end 23Outputs:
out/rgb/rgb_####.pngwhen running without a compositor treeout/depth/depth_####.exrout/normal/normal_####.exrout/mask/object_index_####.exr(object-id segmentation via Blender Object Index pass)
scripts/v2v_infer.py is a checkpoint-agnostic PyTorch inference harness that:
- conditions generation on Depth + Object Mask (ControlNet-style)
- conditions on a text prompt
- carries the previous frame latent as a simple “Temporal KV Cache” for temporal consistency
It expects a Torch file (.pt) with tensors:
{"depth": Float[T,H,W], "mask": Long[T,H,W]}Run:
python3 scripts/v2v_infer.py \
--gbuffer-pt /abs/path/gbuffer.pt \
--prompt "photoreal, cinematic lighting" \
--out-dir /abs/path/out \
--checkpoint /abs/path/model.ptNotes:
- The included model is a minimal ControlNet-style stub; photorealistic output requires your trained weights/model swap.
- Output frames are written as
.ppmto avoid extra image dependencies.