Abstract
Dynamic Texture Synthesis (DyTS) aims to generate infinitely long, visually consistent video sequences from a single image or a short video clip. While recent deep learning approaches have improved visual quality, they remain computationally expensive and offer limited control. We present DyNCA (Dynamic Neural Cellular Automata), a framework that synthesizes realistic dynamic textures in real-time. By evolving local cellular rules rather than optimizing global frames, DyNCA achieves a speedup of 2 to 4 orders of magnitude over previous state-of-the-art methods while providing unprecedented interactive control over motion speed and direction.
The Challenge of Dynamic Textures
Synthesizing dynamic textures like flowing water, flickering flames, or waving grass involves capturing both spatial patterns and temporal dynamics. Existing methods face three primary bottlenecks:
- Computational Cost: Optimization-based processes are slow, often taking hours for a few seconds of video.
- Rigidity: Models are typically constrained to fixed resolutions and predetermined lengths.
- Lack of Control: Users cannot easily modify motion characteristics (e.g., wind speed or flow direction) post-training.
DyNCA bridges the gap between high-quality neural optimization and the efficiency of procedural methods.
Methodology: NCA as a Physical Simulator
DyNCA treats video as a stochastic Partial Differential Equation (PDE) parameterized by a small neural network. Instead of predicting pixels directly, the model learns local update rules for a grid of "cells."
The architecture introduces two critical modifications to the standard Neural Cellular Automata (NCA) framework:
- Multi-scale Perception (MSP): Standard NCAs only perceive immediate neighbors. MSP utilizes a pyramid of cell states, allowing cells to communicate across longer distances, which improves stability and visual fidelity.
- Cartesian Positional Encoding (CPE): To achieve structured motion (e.g., gravity), cells must be aware of their spatial location. By concatenating coordinate information, the model learns global motion fields.
Training Objectives
The model is trained using a dual-loss approach on datasets such as the Describable Textures Dataset (DTD) and DynTex:
- Appearance Loss: Employs a pre-trained VGG16 network and optimal-transport-based style loss to ensure each frame matches the target texture's visual style.
- Motion Loss: Uses a pre-trained optical flow network to align the movement between frames with either a target video or a hand-crafted vector field.
Key Results and Performance
DyNCA demonstrates remarkable efficiency and flexibility:
- Speed: It is 10,000x faster than previous optimization-based methods, synthesizing frames in 33–57ms on an A100 GPU. This enables real-time interaction on mobile devices.
- Compactness: Models are extremely lightweight, requiring only 0.006M to 0.010M parameters, compared to 81M in some competing SOTA models.
- Flexibility: Once trained, the same model can generate video at any resolution and for any duration.
In user studies, DyNCA's results were rated more realistic than existing methods, often achieving "on-par" fooling rates compared to real videos.
Discussion: Disentangling Style and Motion
A profound insight of DyNCA is the ability to perform Dynamic Style Transfer. Because appearance and motion are handled by separate losses, users can combine the "look" of a painting with the "motion" of a natural phenomenon (e.g., a Van Gogh-style whirlpool). Furthermore, the NCA's inherent self-organization makes it robust; the model can perform real-time video inpainting if parts of the frame are modified or erased.
Limitations
Despite its strengths, DyNCA faces challenges when target appearances are physically incompatible with target motions (e.g., horizontal flow on vertical stripes). Additionally, the model assumes texture homogeneity and may struggle with complex, non-repeating foreground objects. Future work will focus on automating loss weighting and extending the framework to more complex scenes.
Summary updated