Back to Feed
Computer Vision / Multimodal

Generating Consistent Videos Using Code Simulation

Original: VideoCoCo: Code-as-CoT for Physically-Consistent Video Generation via an Agentic Dual-Engine System

Listen to the summary

Uses a voice available on your device

Audio options
On this page

Key Takeaways

  • VideoCoCo overcomes Causal Opacity by synthesizing a self-contained Blender Python program to explicitly specify scene dynamics.
  • The system uses a dual-engine design combining an executable simulation engine and a generative video engine.
  • On PhyGenBench, VideoCoCo achieves the best overall average score of 0.558, outperforming the strongest open baseline.
  • The LoRA-Tune adaptation strategy outperforms full fine-tuning while updating far fewer parameters.

Summary & Methodology Analysis

Text-to-video models often struggle to generate physically consistent dynamics because the temporal evolution of a scene must be inferred implicitly from a highly compressed text prompt, a mismatch the paper calls Causal Opacity. Existing reasoning approaches for video use non-executable or temporally sparse intermediates, which limits their ability to control the complete process. To solve this, the authors introduce VideoCoCo, an agentic dual-engine system. In the first engine, a coding agent takes a text prompt and synthesizes a self-contained Blender Python program that explicitly specifies the scene, objects, physical properties, and temporal evolution. This program is executed in an isolated environment to produce a deterministic, temporally dense low-fidelity white-clay draft.

In the second engine, an instruction agent reads the original prompt and the rendered draft to compose an appearance-focused editing instruction describing target subjects, materials, lighting, and cinematic style without redefining the motion. The draft and instruction are then fed jointly into a draft-conditioned video editor to produce the final video, where the draft anchors spatiotemporal structure and the instruction specifies photorealistic appearance. To train this editor, the authors construct the VideoCoCo-3K dataset consisting of three-part triplets generated via a teacher editor. They explore adaptation strategies including full fine-tuning and parameter-efficient LoRA, which updates a small subset of parameters.

Despite its strong performance, the approach has limitations. It introduces additional inference latency and is bounded by the expressiveness of the underlying Blender simulator, meaning highly complex phenomena such as turbulent fluids remain challenging to synthesize zero-shot. Furthermore, the distinctive white-clay simulation style of the draft lies outside the training distribution of off-the-shelf editors, and full fine-tuning is prone to overfitting the limited triplet data and drifting away from the base generator's visual priors.

Interactive System Flowchart

Click diagram to expand and zoom

Cross-Examination & FAQs

A deeper dive clarifying mechanics, constraints, and baseline evaluations.

Q1. What is the main problem addressed by the paper?

Text-to-video models struggle to generate physically consistent dynamics because the temporal evolution must be inferred implicitly from a compressed text prompt, a mismatch the paper calls Causal Opacity.

Q2. What is the core solution proposed in the paper?

The paper proposes VideoCoCo, an agentic dual-engine system that uses code simulation to explicitly specify scene dynamics before generating the final video.

Q3. How does VideoCoCo perform compared to existing baselines?

VideoCoCo improves the OmniWeaving baseline from 0.475 to 0.558 on PhyGenBench, achieving the best overall average score in the evaluation table ahead of the strongest open baseline.

Q4. How does the coding agent create the initial simulation?

A coding agent takes the text prompt and synthesizes a self-contained Blender Python program that explicitly specifies the scene, objects, physical properties, and temporal evolution of the target event.

Q5. What role does the sandboxed execution environment play?

The program is executed in an isolated environment to produce a deterministic, temporally dense low-fidelity white-clay draft, and the sandbox returns rendering errors as diagnostic signals for code revision.

Q6. How is the editing instruction constructed?

An instruction agent reads both the original prompt and the rendered draft to compose an appearance-focused instruction describing target subjects, materials, lighting, and cinematic style while avoiding redefining the motion.

Q7. What dataset was constructed for this research?

The authors constructed the VideoCoCo-3K dataset, which contains 3000 draft-instruction-target triplets generated using a high-fidelity teacher editor called Seedance 2.0.

Q8. What training objective and adaptation strategies were used for the editor?

The editor was adapted using a standard conditional denoising diffusion objective, with the authors exploring both full fine-tuning and parameter-efficient LoRA adaptation strategies.

Q9. What are the limitations of the proposed approach?

The paper does not specify every limitation, but notes that the approach introduces additional inference latency, is bounded by the expressiveness of the Blender simulator, and struggles with zero-shot synthesis of highly complex phenomena like turbulent fluids.