đź”— Sketch: https://editor.p5js.org/ervin021013/sketches/Z6h5-stpB
🎥

The idea
Chatting with an LLM to “describe an image” felt flat, so I used Gemini as a collaborator inside a visual pipeline instead of a chatbot. You strike a pose at the webcam, click, and the sketch turns you into a single black-and-white manga panel: halftone-style frame, radiating speed lines, a corner onomatopoeia in big type, and a speech bubble — all authored on the fly by Gemini looking at the actual frame.
How it works
When I capture a frame, I send it to Gemini Vision with a prompt that casts it as a shonen manga artist and forces it to answer in strict JSON: a short dramatic line, one sfx (like GOGOGO or DOKI DOKI), and an intensity of 1–3. p5 then renders the panel: the webcam frame is posterized to a few ink tones, intensity drives how many speed lines burst from the center, the SFX pops in with an eased scale animation, and the line types out inside the bubble. So the model isn’t just generating text — it’s handing me parameters that control the composition.
Experiments & findings
- “Reply with ONLY JSON” is load-bearing. My first prompts got chatty preambles (“Sure! Here’s a caption…”) that broke
JSON.parse. Being explicit about the exact shape, plus stripping code fences in code, made it reliable. - Structured output is the real unlock. Once Gemini returns
intensityas a number I can draw with, the LLM starts behaving like a design partner, not a text box. I want to push this further — have it also return halftone density or bubble shape. - Persona swaps change everything. Switching the role from shonen to horror manga or shojo completely re-colors the lines and SFX from the same pose — the visuals stay identical but the voice shifts. [screenshot: same pose, two personas]
- Failure mode: in low light the posterized frame gets muddy, and Gemini sometimes over-reads a neutral pose as “dramatic.” Capping
linelength kept the bubble readable.
Reflection
The gap I felt this week is between chatting with a model and building with one. In chat, Gemini’s output is the end product; in a sketch, its output is an input — and designing the contract between them (the JSON schema) turned out to be the actual creative work. That reframes the LLM as a runtime design collaborator, which is the direction I want to keep exploring.
Leave a Reply