How Speedpaint plans strokes from an image
The engineering behind Speedpaint: how source pixels become vector paths, why strokes cluster by object, and how frames render at 60 FPS.

The difference between pixels and drawing paths
A digital photograph is a raster grid of pixels. It carries color and luminance, but no record of how an artist would physically draw it. Video generation models often hallucinate transitions between frames, creating shimmering or morphing artifacts. Speedpaint takes a different approach: it extracts the geometric structure of an image, plans a realistic sequence of strokes, and renders that plan frame by frame at 60 FPS using an explicit drawing engine.Step 1: High-fidelity sketch synthesis
The engine begins by turning the input image into a drawing in one of four styles: Line art, Shaded sketch, Anime, or Charcoal. The output is a clean, high-resolution source drawing. In Line art mode, paper background is normalized to pure white (#FFFFFF) and all lines are rendered in sharp monochrome black, ensuring zero color contamination before vectorization.
Step 2: Skeletonization and medial axis extraction
Next, the image enters the stroke extraction engine (generation/stroke_logic.py). Using OpenCV and NumPy, the raster drawing is binarized and reduced to its topological skeleton—a 1-pixel-wide medial axis representation of every visible contour.
During this stage:
[Y, X] (row, col) matrix space to prevent spatial distortion.Step 3: Single-pass object clustering
Human artists complete one discrete subject at a time—drawing the face, then the hair, then the collar—before moving elsewhere. They do not scatter random dots across four corners of the canvas. Speedpaint’s trajectory planner groups paths by spatial and contour proximity. Strokes belonging to the same object boundary are clustered and sequenced sequentially, creating a human-like, single-pass completion order.Step 4: Vector pacing and pencil physics
Once stroke order is determined, the vector animation planner calculates the drawing dynamics:Step 5: Multi-worker canvas rendering
The planned trajectory and timing instructions are serialized into standard Cartesian canvas points and dispatched to a distributed CPU-based render container running Node.js Canvas and FFmpeg. Frames are rendered in parallel at 60 FPS and encoded into H.264 MP4. Nothing is guessed between frames; every line corresponds to an exact vector path in the stroke plan.Turn any photo into a drawing video
Eligible new accounts receive $0.20 free after email verification. Check the cost of your selected settings in Studio before creating a video.
Related articles & drawing guides
Explore related techniques and practical workflows in the Speedpaint Journal.
What is whiteboard animation? A practical starting point
A hand draws on a white board while the explanation plays. What that looks like in 2026, what it costs, and what a drawing tool can and cannot do.
Planning audio for a whiteboard animation
Music, narration and the pencil sound: what the studio provides, what you record yourself, and how to line the voice up with the drawing.
Planning the cost of a whiteboard animation
What a whiteboard style clip costs in credits, how many clips a lesson needs, and where a budget actually goes when you plan a series.
