Stroke of Surprise: Progressive Semantic Illusions in Vector Sketching

Anonymous Authors

We recommend watching the video with sound on 🔊

Teaser

Stroke of Surprise generates vector sketches that progressively reveal different semantic meanings as strokes are added.

Abstract

Visual illusions traditionally rely on spatial manipulations such as multi-view consistency. In this work, we introduce Progressive Semantic Illusions, a novel vector sketching task where a single sketch undergoes a dramatic semantic transformation through the sequential addition of strokes. We present Stroke of Surprise, a generative framework that optimizes vector strokes to satisfy distinct semantic interpretations at different drawing stages. The core challenge lies in the "dual-constraint": initial prefix strokes must form a coherent object (e.g., a duck) while simultaneously serving as the structural foundation for a second concept (e.g., a sheep) upon adding delta strokes. To address this, we propose a sequence-aware joint optimization framework driven by a dual-branch Score Distillation Sampling (SDS) mechanism. Unlike sequential approaches that freeze the initial state, our method dynamically adjusts prefix strokes to discover a "common structural subspace" valid for both targets. Furthermore, we introduce a novel Overlay Loss that enforces spatial complementarity, ensuring structural integration rather than occlusion. Extensive experiments demonstrate that our method significantly outperforms state-of-the-art baselines in recognizability and illusion strength, successfully expanding visual anagrams from the spatial to the temporal dimension.

Method

Method Pipeline

Our method optimizes a set of learnable stroke parameters, which are divided into prefix strokes Sprefix and delta strokes Sdelta. The optimization process involves two parallel branches. In the top branch, only the prefix strokes are rendered by a differentiable rasterizer to create a partial sketch (e.g., a rabbit). This sketch is then guided by a pre-trained, frozen text-to-image diffusion model using a prompt corresponding to the prefix ("a rabbit"), resulting in the prefix SDS loss ℒSDSprefix. In the bottom branch, the full set of strokes is rendered to create the complete sketch (e.g., a horse). This is guided by the same diffusion model using a prompt for the full object ("a horse"), resulting in the full SDS loss ℒSDSfull. The total SDS guidance loss is the sum of these two terms ℒSDS=ℒSDSprefix+ℒSDSfull. Gradients from this total loss are backpropagated to update all learnable stroke parameters.

2-Phase Illusions

Our method generates vector sketches that transform between two different semantic concepts. As strokes are progressively added, the sketch reveals a completely different subject.

3-Phase Illusions

Our approach can also generate sketches that transition through three different semantic concepts, creating even more surprising visual transformations.

Optimization Process

Visualizing the optimization process of our method. The strokes are progressively optimized to create semantic illusions.

Optimization Animation
Optimization Animation 2

B-spline Illusions

Our method can also generate B-spline representations, creating smooth and natural-looking vector sketches.

Vector Graph Illusions

Our method also supports vector graph representations, creating structured and detailed vector sketches.