Diffusion as Shader: 3D-aware Video Diffusion for Versatile Video Generation Control

Zekai Gu, Rui Yan, Jiahao Lu, Peng Li, Zhiyang Dou, Chenyang Si, Zhen Dong, Qifeng Liu, Cheng Lin, Ziwei Liu, Wenping Wang, Yuan Liu · DOI

Abstract

While large-scale video diffusion models have achieved remarkable visual quality, precise control over motion and geometry remains a significant challenge. Current "steerable" models often rely on 2D signals like depth maps or optical flow, which lack the 3D awareness necessary for long-term temporal consistency. We present Diffusion as Shader (DaS), a novel framework that treats the generative process as a computer graphics rendering pipeline. By utilizing "3D tracking videos"—sequences where pixel colors represent persistent 3D coordinates—DaS achieves state-of-the-art temporal stability and enables a unified approach to diverse tasks including camera control, motion transfer, and object manipulation.

Introduction: The "Shader" Paradigm

In traditional computer graphics, a shader is a program that calculates the appearance of 3D points based on geometry, lighting, and textures. Diffusion as Shader (DaS) adopts this philosophy for generative video. In this framework, the diffusion model acts as the shader, taking an input image (the "texture") and a 3D tracking video (the "geometry") to render a final, high-fidelity video sequence. This approach shifts the focus from 2D pixel manipulation to 3D-aware synthesis, ensuring that the generated content remains physically grounded across time.

The Challenge of 2D Control Signals

Existing methods for steerable video generation typically utilize 2D control signals such as depth maps, sketches, or optical flow. However, these signals are fundamentally limited by their lack of explicit 3D correspondence. A depth map provides the structure of a single frame but does not link a point in one frame to its physical counterpart in the next. This lack of awareness often results in common generative artifacts:

  • Flickering: Rapid changes in pixel intensity or color.
  • Texture Sliding: Textures appearing to move independently of the underlying geometry.
  • Identity Loss: Objects changing shape or appearance during complex movements.

Furthermore, most current controllers are task-specific; a model trained for camera movement cannot easily handle human pose manipulation, leading to fragmented workflows.

Methodology: 3D Tracking Videos

The core innovation of DaS is the 3D Tracking Video. Unlike standard RGB videos, the "color" of a pixel in a tracking video is determined by its normalized 3D coordinates within the camera's initial coordinate system. This representation serves as a persistent anchor: as an object moves, its 3D coordinate (and thus its color in the control signal) remains constant, providing the model with a clear map of where a specific part of an object should be located in every frame.

Architecture

DaS is built upon the CogVideoX transformer-based architecture. To integrate 3D control, the authors implement a Condition DiT—a trainable copy of the first 18 blocks of the original Diffusion Transformer (DiT). This architecture, inspired by the "ControlNet" approach in image generation, allows the model to learn the relationship between 3D coordinates and visual appearance without destroying the pre-trained knowledge of the base model.

Unified Control Tasks

Because the model learns to follow 3D trajectories, diverse control tasks can be unified into a single pipeline by varying how the 3D tracking video is generated:

  • Camera Control: Static 3D points are projected onto a moving camera path.
  • Motion Transfer: 3D point trajectories are extracted from a source video using trackers like SpatialTracker.
  • Object Manipulation: Users can manually transform segments of a 3D point cloud (e.g., rotating an object) before rendering the tracking video.

Experimental Results

DaS was trained on a combination of real-world data (MiraData) and synthetic data (Mixamo). The synthetic data provided ground-truth 3D tracking videos, which were essential for teaching the model precise geometric adherence.

Quantitative Performance

DaS demonstrates significant improvements over specialized baselines:

  • Camera Control: In "Large Movement" benchmarks, DaS achieved a Rotation Error of 10.40°, vastly outperforming CameraCtrl (29.70°) and MotionCtrl (39.86°).
  • Motion Transfer: The model achieved a CLIP score of 32.6 (compared to 31.9 for TokenFlow), indicating superior alignment between text prompts and generated visuals, while maintaining a temporal consistency score of 0.971.

Key Insights

  • Handling Occlusions: Because 3D tracking videos maintain coordinate-color consistency even when a point is hidden, the model is significantly better at maintaining appearance through occlusions and reappearances.
  • Data Efficiency: DaS was fine-tuned on 8 H800 GPUs for only 3 days using fewer than 10,000 videos. This suggests that 3D-aware signals provide a "denser" learning signal than raw pixels, allowing the model to understand motion dynamics more efficiently.

Limitations and Conclusion

Despite its versatility, DaS faces two primary challenges. First, structural mismatches between the input image and the 3D tracking video (e.g., applying a running motion to a sitting person) can cause artifacts. Second, tracking gaps—areas where 3D points are missing—can lead to hallucinations as the model loses its geometric anchor.

In conclusion, Diffusion as Shader represents a significant step toward bridging the gap between professional computer graphics and AI-driven video generation. By grounding the diffusion process in 3D space, DaS provides a robust, unified framework for high-fidelity, steerable video synthesis.

Summary updated

BibTeX
@inproceedings{gu2025diffusion,
  author = {Zekai Gu and Rui Yan and Jiahao Lu and Peng Li and Zhiyang Dou and Chenyang Si and Zhen Dong and Qifeng Liu and Cheng Lin and Ziwei Liu and Wenping Wang and Yuan Liu},
  title = {{Diffusion as Shader: 3D-aware Video Diffusion for Versatile Video Generation Control}},
  booktitle = {SIGGRAPH (Conference Paper Track)},
  year = {2025},
  url = {https://openreview.net/forum?id=jZCgeVKxlc},
}
Figure