← Back to Features
Auto Shot Creator icon

The Auto Shot Creator: Narrative Orchestration & Context-Aware Sequencing

In high-end pre-visualization, the transition from a single concept to a timed, 30-shot sequence represents a significant production bottleneck. The Auto Shot Creator is a dual-page workspace within Ploty designed to automate the generation of structured, timed, and contextually aware storyboards.

The module architecture manages complex multi-stage state machines, implements recursive LLM prompt optimization, and maintains non-destructive data synchronization between local SQLite databases and generative AI pipelines.


Technical Architecture: The Two-Stage Generation Pipeline

The Auto Shot Creator operates as a stateful workflow that decouples narrative ideation from final asset execution. This ensures surgical control over sequence parameters before data is committed to the project.

  • Stage 1: The Narrative Blueprint: Managed by a dedicated Zustand slice, this stage handles high-level parameters including duration, target positioning, and prompt optimization. An LLM-Tuning Layer intercepts user input and expands it into structurally sound cinematic instructions, ensuring appropriate pacing and scene composition.
  • Stage 2: The Review Draft Workspace: This stage instantiates a dynamic "Draft Mode," allowing for the manipulation of LLM-generated shot cards. Users can reorder, expand, or edit voiceovers and timing before committing to the final database write. This "Draft-before-Commit" pattern prevents database pollution and facilitates rapid scenario testing.
  • Context-Aware Story Logic: A "Temporal Look-Ahead/Look-Back" algorithm analyzes the five shots preceding and following the target insertion point. This context is injected into the LLM prompt, ensuring the new sequence functions as a logically and visually consistent bridge within the existing narrative.

Key Feature Breakdown

The Shot Creator provides tools for both initial ideation and surgical project updates:

ToolTechnical ImplementationCreative Purpose
Surgical Overwrite EngineGranular boolean toggles (Image, Desc, VO) for existing records.Updates specific storyboard data without losing historical work or deleting shots.
Asynchronous ExecutionA Rust-based worker pool for parallel image generation.Builds a 30-shot sequence in seconds, automating the path from text to a fully-formed board.
Actor Token PreservationProgrammatic injection of actor tokens into the optimization chain.Ensures custom-defined characters remain visually and narratively consistent across drafts.
Non-Destructive LayeringLogic that archives old images to a background layer instead of deleting.Preserves visual history, allowing for the retrieval of previous iterations.
Temporal Timing CalcMathematical distribution of project duration across shot lengths.Automatically manages pacing to ensure perfectly timed boards for a specified duration.

Performance and Optimization

High-efficiency data handling ensures that generating large sequences remains stable within the UI and database environments:

  • Snapshot-Driven History: Before executing an "Accept and Execute" command, the system pushes a global snapshot to the Undo/Redo stack. This facilitates a total revert of an entire 20-shot generation in a single action, ensuring project safety.
  • Optimized Draft Reloading: A Load Draft feature serializes the JSON generation history to the local SQLite database. This allows previous narrative concepts to be revisited and rerun with different style settings without re-entering prompts.
  • Database Cycle-Through: Using a custom keyboard hook, the system facilitates rapid traversal of the description_history and prompt_history. This feature pulls directly from the database to allow for the real-time comparison of iterations.

Core Architectural Benefits

The Auto Shot Creator functions as a Narrative IDE, integrating cinematic logic with automated workflows.

  • Continuity-First Engineering: By incorporating context-awareness, the system addresses the common issue of disjointed scenes in generative storytelling. The architecture evaluates preceding and succeeding content to create a seamless narrative flow.
  • Surgical Precision: The ability to overwrite specific data types across a sequence provides the control necessary for iterative professional feedback loops.
  • Automated Production Pacing: Linking total duration to individual shot timers ensures that the resulting storyboard is immediately compatible with the Animation page and export requirements.
  • Resilient Project Persistence: The Tauri and SQLite stack ensures that complex multi-shot generations are handled with transactional integrity, maintaining lean and portable local project files.