Skip to content

Checking your reading list…

Retry

Stay curious. Build better.

Appearance

Choose how BestHub looks on this device.

Changes apply immediately.

Search articles

Open Discover with these filters

Suggested searches

Coda-DaVinci: Task-Adaptive Code-to-Video Framework Balances Control and Natural Motion

Researchers from Nanjing University, Kling AI, and Peking University propose Coda-DaVinci, a task-adaptive Code2Video framework that uses code for structural control and physics simulation while delegating fine-grained motion and appearance to video models, achieving 91.42% instruction following and improved scene consistency across benchmarks.

Background: A Programmable Studio for Video Generation

Code2Video offers a new path to improve video controllability. Works like VideoCoCo and CodeVideoModel let a coding agent write code to build and render a 3D scene, then feed the simplified rendered video (a "white-model video" or 3D proxy) to a video generation model for final synthesis. This acts like a programmable studio: object positions can be saved, motion trajectories defined, and camera paths specified, giving the video model a visual scene reference that makes creative intent more explicit.

However, after building the studio, key choices remain: should every human joint be modeled? How to implement collisions and falls? How should the white-model character correspond to the final character? These decisions jointly determine the guidance the video model receives. Coda-DaVinci focuses on the capability boundaries of Code2Video and more effective collaboration between the coding agent and the video model.

Key Insight: Finer Modeling Does Not Guarantee More Natural Results

The team conducted controlled experiments around scene revisiting, complex actions, and physical processes, comparing configurations via blind evaluation. Results show Code2Video consistently helps consistency and instruction following, but in complex human motion the white-model can also transmit stiff poses to the final video.

1. Spend Modeling Effort Where It Affects Outcomes

In action-intensive tasks, coarse-grained proxies often preserve natural motion better than fine-grained modeling. Overly specific joint and pose control introduces errors and limits the video model's ability to add detail. For environments and structured objects that need stable spatial relationships, medium-grained models provide more stable scene references.

This yields a valuable design principle: different objects within the same video can use different modeling granularities. Environments keep structure; characters only express overall position and movement direction, letting the video model complete fine-grained limb motion.

2. Let Physical Processes Actually Occur in the Scene

For tasks where collisions and contacts affect event outcomes, the team introduced Blender physics simulation. The simulated motion enters the white-model video, providing dynamic reference for final generation. Across tested configuration combinations, explicit physics simulation improved average comprehensive performance across three analysis benchmarks.

3. Prompts Must Also "Understand" the White-Model

Prompts explain what happens in the white-model and what the final video should look like. Coda-DaVinci lets the scene-building coding agent inspect the actual rendered result before composing the generation prompt, and aligns character descriptions with identity markers and reference images in the white-model.

Thus geometric reference and language description collaborate around the same subjects and events. In the compared configurations, the combination of medium-grained modeling, physics simulation, and agent-written prompts achieved the highest overall average performance.

Method: Let AI Decide What to Build and Who Does What

Based on these findings, Coda-DaVinci organizes video creation into a task-adaptive framework.

First, judge how much explicit control the task needs. For tasks demanding precise spatial relations, physical interactions, or scene revisiting, the framework takes the 3D modeling path. For tasks dominated by natural limb motion with weaker explicit scene-control needs, it can directly call the video model to exploit its motion generation ability.

After entering the modeling path, decide how far each part should be modeled. Environments and structured objects use medium-grained representation; characters use coarse-grained proxies; physical processes suited for simulation are executed in Blender. The generation prompt then links subjects in the white-model to appearance references, supplementing the fine-grained motion and visual detail needed in the final video.

After generation, the framework checks whether the video fulfills the task. The main agent can delegate separable modeling work to sub-agents; scene code and assets are stored in a shared workspace. When issues are found, it can continue modifying the existing scene or adjust the generation prompt and reference inputs. An independent verification agent checks candidate videos against the original requirements, providing concrete feedback for rework.

This gives a single video creation reusable scenes and a continuable process, also laying the foundation for subsequent video extension.

Experiments: How Much Improvement Does the Generation Approach Bring?

Main experiments uniformly used Seedance 2.5 for video synthesis, comparing direct generation, traditional agentic video generation, and Code2Video methods. Evaluation covered physical properties, scene consistency, detailed instruction following, and visual realism.

More Accurate Instructions, More Stable Scene Revisiting

On VTR, Coda-DaVinci's instruction checkpoint satisfaction rate reached 91.42% , a 6.27 percentage-point improvement over direct generation's 85.15%, and the highest among evaluated methods.

On R2M's four metrics — scene identity, local geometry, state persistence, and object persistence — Coda-DaVinci also ranked first. This shows explicit scenes and task-adaptive design help the model remember established video content, letting camera changes and event progression build on persistent scene state.

Retaining Control While Improving Visual Quality

On World Models' Last Exam in Physics, Coda-DaVinci's physics score rose from direct generation's 47.16 to 60.77 . On the T2AV-Compass test subset, it achieved the highest visual realism and visual instruction-following scores among Code2Video methods, with realism approaching direct generation.

These results demonstrate the value of task-adaptive design: control from explicit modeling can effectively complement the video model's visual expressiveness.

Two Test Cases: Seeing "Controllable" vs. "Natural"

Keeping Memory Outside the Frame

In a leaf-cleaning example, the task required the camera to pan away and return to the original steps; the cleaning action continued while the steps were off-screen.

Direct generation kept the steps mostly visible throughout and retained many leaves at the end. Both Codex + Blender and Coda-DaVinci completed the camera leave-and-return, showing cleaned steps on revisit. The camera moved as required, and changes occurring outside the frame were carried forward into later scenes. This is Code2Video's intuitive advantage in instruction following and state consistency.

Proper Division of Labor Lets the Video Model Fill Motion Details

A dough-kneading task further showed the difference between two Code2Video pipelines. Codex + Blender's hands held similar poses for long periods, appearing relatively static; Coda-DaVinci showed wrist rotation, finger pose changes, continuous pressing, and dough deformation following contact.

This result used the Blender path. The framework retained organization of the interaction process while leaving room for the video model to complete fine-grained hand motion, yielding more natural contact and motion changes in the final video.

From Short Clips to Extension: Making Scenes Reusable Creative Assets

The scene code and object states saved by Coda-DaVinci can also serve long-form video. The next segment can continue using the existing scene, extending previous event outcomes. The team further validated this on LongAV-Compass and WBench: the former improved event completion and long-range structure, the latter improved interaction following and consistency.

The team also ablated framework components and model pairings. On a 33-question ablation set, disabling adaptive routing, unifying to medium modeling granularity, or removing the independent verifier all lowered the four evaluation scores. Experiments swapping coding agents, video models, and modeling engines further illustrated trade-offs between capabilities and computational overhead.

Outlook: Turning Generated Video into a Continuously Creatable Process

Coda-DaVinci shows more possibilities for coding agent and video generation model collaboration. Code gives scenes a savable, modifiable, reusable structure; the video model gives them realistic appearance and natural motion. As their division of labor matures, video creation may move from one-shot prompt generation toward a complete process that can be continuously edited, extended, and continued.

The team states Coda-DaVinci is the first work in the Coda (Code-Driven Video Generation Artist) series. Future research will explore Video2Code Caption, Agentic Prompt Enhancement, Reward Model, and other directions, gradually building a technical system covering the full Code2Video pipeline.

About this article

For questions about attribution, corrections or content rights, please contactadmin@besthub.devand we will review it promptly.

video generationBlenderphysics simulationinstruction followingscene consistencyCode2VideoKling AImodeling granularitySeedance 2.5task-adaptive framework

Discussion 0

Questions, practical examples and thoughtful responses.

Open full discussion