Nippo vNext background
Research, comparisons, measurement history and the reasoning behind the design. The design itself is in design/; this file explains how it got there and is not a specification.
Research snapshot
The two product goals are faster measured rendering/export than a matched contemporary Remotion baseline and richer ready-to-use visual effects with less authoring work. These are measurable goals, not claims established by the survey. The user's existing approximately 350 fps at 1080p and competitor ratios were not independently reproduced.
Professional tools inform the visual capabilities and compositing semantics. Their UI, project formats and native frameworks are not proposed dependencies. The supplied HTML-in-Canvas gallery, community index and Chrome explanation establish a visual reference: rich content should be able to refract, ripple, fold and participate in polished motion.
The research snapshot is December 4, 2026. Nippo was
inspected at commit 025e7c8f6b1cb767c76fbdb9032f9b7ab504ab5a.
Source and documentation were read; the surveyed software and proposed
examples were not executed or benchmarked. Every hd API beyond the
audited current implementation is a proposal. External snippets identify
real documented APIs or explicitly labeled UI controls. Issue reports
establish failure modes, not prevalence; historical or fixed issues are
labeled. Unverified capabilities are marked rather than inferred.
What to learn from Remotion
Remotion's documentation explicitly identifies reuse, parameterization and nested composition as benefits of React. Its frame API supplies time separately. These real fragments illustrate the distinction:
const frame = useCurrentFrame();
<Title color="#0b84f3">Hello</Title>
Title is the ordinary component defined in the
composition guide. The first fragment supplies time; the second reuses a
visual with different inputs. Composing components,
core rendering
idea.
The historical motivation also included reusing development skills and web graphics facilities such as CSS, SVG and Canvas. This explains the fit for Remotion's initial audience, without proving an intrinsic performance advantage or universal simplicity. Creator interview, 4:05–6:12.
| Transferable benefit | Nippo expression |
|---|---|
| Reuse one visual implementation | Ordinary named hd function |
| Vary content, data and style | Typed props and defaults |
| Nest visuals at several levels | Function calls, child lists, row/column/canvas |
| Generate content from data | Ordinary loops, conditionals and formatting |
| Reuse motion at another time | Explicit local Frame supplied by a Clip |
| Share and customize designs | Readable standard-library components and examples |
Remotion expects basic React/web knowledge; Nippo should assume neither that familiarity nor professional-compositing expertise. Teach one rule: the function describes what appears, its frame tells it when, and its arguments supply content and style. Remotion support policy.
An explicit frame also avoids implicit animation clocks. Remotion warns that timers and CSS animations do not fit independently requested, potentially out-of-order frames. Nippo already has the desired sampling contract. Frame-driven animation.
Why the API changed while type-checking it
The first proposal was written before any hd compiled. Writing it in real hd changed it:
Frameis a requirement, not a parameter. A view or builder that animates declares$ Frameand readsnow(),progress(start, end, ease),last_sample_time()orclip_length(). Views arefn() -> Node $ Frame, andheadline(p)replacesheadline(f, p). A clip installs its ownFrameprovider for what it draws, so delayed, retimed and echoed children see their own clocks.clip.show()draws a nested clip at the current time. Time-aware library calls read the frame themselves:reveal_words,captions,Background::aurora,film_finishand particle emitters no longer take atimeargument. The row also tells the renderer something: a builder without$ Framecan't change over time, so its result can be cached across frames. Measured: looking up the provider costs about 3 ns more per call than passing a struct (5.3 ns vs 2.2 ns, over 20M calls). That's about 0.6 µs for a frame making 200progress()calls.- Retimed clips keep the frame grid only for whole-frame
shifts. Offsets, loops and ping-pongs by a whole number of
frames stay on it. Speed changes and freezes drop it, and then
last_sample_time()refuses rather than guessing. - First light (2026-12-05).
src/examples/first_light.hdrenders end to end through clips, local time, word reveals, echo, speed and fades. Looped to 1,320 frames at 1080p it renders in 3.86 s (340 fps; hd builds a frame in 0.03 ms, and about 2.4 s is spent waiting on x264). The old renderer did its 1,320-frame intro in 4.48 s (295 fps) on the same machine. The scenes differ, so this is a sanity check, not a benchmark. Both are bound by the encoder. - Effects on the GPU (#1).
How scopes work: an
.fxscope is drawn by Vello into a pooled offscreen texture (sides rounded up to 64 px). It runs its passes on the GPU and is registered back into Vello as an image drawn under the scope's transform. (The first version baked glow and shadow into the blur shader; see "Effects are library code" below.)Alpha: Vello writes straight alpha, so the pass premultiplies on read and converts back on write.
Masks: alpha masks and wipes need no offscreen pass. They are Vello layers with
DestIn/DestOutcomposition.Stills (
nippo still effects) show both laws. Glow-then-wipe cuts the halo, wipe-then-glow wraps the wiped edge. A row's glow differs from a glow on each child, whose halos spill over their neighbours.Measured at 1,320 frames, 1080p, x264
veryfast:Effects a frame fps Limited by 0 342–353 encoder 1 glow 324–341 encoder 3 (glow, shadow, glow) 287–294 GPU, 1.9 s waiting 4, one nested 212–216 GPU, 3.2 s waiting The plain vector path did not slow down.
What it costs: skipping the compute pass leaves the nested case at 266 fps. So about 1.6 ms a frame is the extra Vello render per scope, and 0.9 ms is the blur. Precomputing weights instead of calling
expper tap changed nothing measurable.Batching (#8): decoding now collects scopes instead of drawing each at once. Every scope at one nesting depth is packed into a shared atlas, drawn by one Vello render, and blurred in one compute submission, deepest depth first. Results match the unbatched stills within 4/255. Before and after:
Effects a frame Before After 0 342–353 fps 342–354 fps 1 glow 324–341 fps 332–349 fps 3 287–294 fps 326–339 fps (encoder-bound again) 4, one nested 212–216 fps 281–289 fps The nested case still waits 2.4 s on the GPU, because each depth costs one render. Downsampling large radii is the next lever if a scene needs it.
- Effects are library code (2026-12-05). The core
keeps blur, user WGSL kernels, blend modes, alpha masks and isolation.
Glow, shadow, light sweep, card flip, film finish, ink and liquid
reveals and luminance masks are hd functions in
pkg.looks. The lab shows all of them plus a kernel written in the example itself.- Passes: a scope's passes ping-pong between half-float textures. It loads from the atlas (premultiplying), runs its blurs and kernels in order, then stores to the 8-bit straight-alpha texture Vello draws.
- Timing: the same as the built-in version for 0, 1
and 3 effects (331–357, 337–342 and 328–341 fps). The nested case drops
from 281–289 to 263–268 fps.
shadowdraws its source twice, so the inner glow's scope runs twice; #10 reuses identical scopes.
- Identical scopes reuse one result (#10).
- Ordering: scopes are processed by height (leaves first; a scope's height is one more than the tallest scope inside it) instead of nesting depth. Height depends only on a scope's contents, so identical scopes always fall in the same batch.
- Matching: the decoder fingerprints each scope's encoding without its placement transform. An identical scope later in the frame drops what it queued and draws the first one's result.
- Result: nested went from 263–268 fps to 317–327 fps, faster than the built-in version's 281–289; 3 effects measured 322–343 fps.
- Drawing in blocks (2026-12-05). Children were
lists:
canvas(w, h, [a, b, c]), withgroup([])as the empty branch of a conditional child. hd's trailing blocks allowcanvas(w, h):with one statement per child, so loops andifchoose children directly. A drawing call can't return its node into the block, so the block is an effect:Buildcollects what each call adds, and a call returns aChildhandle whose modifiers rewrite the node in place. Two problems with the alternatives: a block that returns a list needs every statement to be an expression; and hd silently discards a bare non-void expression statement, so a forgottenaddwould draw nothing without warning (hd-lang#2803 asks for@must_use). Costs: every drawing function names one more requirement, shortened by the aliasDrawing = $ Build + Frame; a named-> voidfunction can't end in aChild, so named views return theChildand are passed as closures; blocks can't capture&references, so a few helpers take values. Values stay for what consumes a node (looks, glass, masks, preparation sources) asNode::constructors andnode:blocks. All 20 projects rendered the same stills afterwards (identical or within one level, the run-to-run GPU noise), andfx-0ran at 265–276 fps against 245–285 before. Timecounts flicks (1/705,600,000 s) as ani64. Every common video and audio rate, NTSC rates included, lands on whole flicks. Boundaries are exact without a general rational type, and times order, add and hash as integers.- No implicit conversion. hd has no implicit
TextNode → Node.text(...)returns aNodewith aTextvariant.reveal_words,style_wordsandfocus_sourceareNodemethods that reach text or code through layout and paint wrappers. Past an image operation they give anInvalidnode, which preflight reports with a fix. This check happens at preflight, not in the type checker. - Echo is a
Clipmethod (clip.echo(count, spacing, decay, tail)), notFx::echo. The signature alone shows that echo needs a clip.clip.fx(effect)lifts an image effect over every sample. - A clip is data, not a closure of closures.
Clipis a tree with a view function at each leaf, plus retime, lift, echo, blur and placement nodes. It can be inspected and cached by its structure. series,parallel,atandclip.then(...)are free functions and methods, notComposition::....Target.inset()and.safe_social()return aTargetwith a new safe area..safe()returns theRect. This fixes the mismatch in §10.3 and §10.4.captions(..., area=...):boxis a prelude name in hd and can't be a parameter.validate(ok, message)is a plain call.!marks waiting in hd, and validation doesn't wait.- Provider traits declare their rows.
AssetRead.read!needs$ FsRead, andSpeech.speak!needs$ Http + FsRead. Preparation uses the row aliasesReadingandSpeaking. - The native boundary is
Shaper,Gpu,MediaandOutput, as@hosttraits insrc/native/mod.hd.Output.finish!returns a byte count; the encoder writes the granted file itself. - A
Projectpairs a name withbuild!: fn!() -> Result[List[Video], PrepareError] $ Speaking + Reading. The CLI finds projects in a registry. - The explainer uses one clip per narration cue. Each beat counts its own local time, and the title and caption layers span the whole video. The other three examples are single continuous shots and stay single views.
Measurement observations
- Planning moved from Rust to hd (2026-12-05).
Per-frame bind-group validation cost about 0.15 ms a frame (nested 295
fps); validating each pipeline and texture-format combination once
restored most of it. A library blur reading taps through bilinear
source()made four loads a tap and left nested at 219–237 fps, GPU-bound; thetexelprimitive brought it back to one load. The wipe moved from a Vello gradient mask to a shader; its soft edge differs from the old one by up to 31/255, everything else in the lab within 1/255. - Keeping Vello (2026-12-05). Replacing Vello was considered twice, first with an hd port of its compute pipeline (its 20 WGSL shaders plus about 6,800 lines of Rust encoding and recording), then with a triangle rasterizer shared with 3D. Both were rejected. Vello's exact-coverage antialiasing beats MSAA on small text. nippo uses nearly all of its vector model. Custom pixels already bypass it as shaders. Compositors such as After Effects, Nuke and Fusion composite 3D as images too. Measured costs were small: effect GPU time was 0.03–0.09 s per 1,320 frames, and vector frames are bound by x264. The triggers for reopening the question are in chapter 5.
- Particles as geometry (2026-12-05). The first
version drew geometry into a half-float texture and converted it to
straight 8-bit for Vello. With about 960 full-frame particles that took
GPU time from 0.016 s to 0.5–0.8 s per 1,320 frames (230–238 fps).
Drawing into a premultiplied 8-bit texture, which Vello's
fineshader accepts, removed the conversion pass and brought GPU time to 0.06–0.2 s (278–284 fps against 330–335 forfx-0). - Jobs and concurrency (2026-12-05). One, two and
three concurrent
fx-0renders took 6.2, 6.5 and 9.3 s on a loaded machine. Two processes cost almost nothing extra, because each runs its own x264 and hd instance; a third queues. Measured as jobs with 11 s segments: one process 315 fps, two 423, three 398, against 341 for one plain render. Choosing two once from the GPU's share of a first segment was replaced by measuring: a job tries two processes, then one, and keeps the faster. Onfx-0the profile settled on two (408 fps against 273); on the GPU-heavysocialthe two were 170 against 132. A 6 sfootagejob runs at 143 fps against 189 for a plain render: worker startup costs more than it saves on short videos. Segment identities first hashed in each process and never matched: a program names fonts by the order a process registered them. The coordinator now computes them all. - Decoding ahead (2026-12-05). Reading footage frames
on a thread four frames ahead left
footageat 170–187 fps, unchanged: it waits on the encoder (0.29 of 0.96 s), not the decoder. It stays for its fixed memory and for decode-bound footage. A loudness target adds about 0.17 s tofootage's 0.39 s hd build. Almost none of it is hd: BS.1770's filters run over 6 s of 48 kHz sound in 1–3 ms. The rest is opening the sound (a temporary file and ffprobe) and decoding it with ffmpeg (0.06 s), all separate processes. - Solids (2026-12-05). Depth and multisampling are
two flags on the geometry draw. Native has no 3D notions: it keeps depth
and multisampled attachments by size and builds a pipeline variant per
mode. Projection, lighting, meshes and triangulation are hd and WGSL. A
first turntable of a lathed bottle showed no motion, since a surface of
revolution looks the same at every angle. Painted corners added a label
whose edges show the turn. The label didn't appear at first: paint is
per corner, and the body was one profile segment, so the profile is now
cut into 2-unit rows.
productsrenders at 259–281 fps (0.09 ms of hd a frame, 0.04 s of GPU over 222 frames), waiting on the encoder. Its delivery check found textures drawn by geometry going stale: Vello keeps its own copy of an image until told it changed, and only bound textures were marked, never a draw's target. Rebuilt without the fix,fx-particlesfails delivery at 22 s (2.67 levels); with it, both pass. - Media batching (2026-12-05). The first decoder cap
stopped the least recently used decoder whenever eight were running.
wall, with nine footage tiles, then stopped one of its own decoders every frame and restarted it with a seek: 2.0–2.4 fps, nearly all of it waiting on footage. Per-request calls can't tell which decoders the frame still needs. One batch per frame can: it keeps the frame's decoders, starts the ones it needs together, and shares frames without copying them.wallrenders at 86–116 fps andfootageis unchanged (143–185 fps under a load of 11). - Comparing frames by blocks (2026-12-05).
wallfailed delivery at 2.85 levels per pixel. The differences were edges in every tile, which x264 softens on sharp footage; the frames lined up. Averaging 16 samples per 16×16 block didn't help, because sampling a checkerboard aliases. Full block means did: correct exports measure 0.7–2.03 levels in the worst channel, and BT.601 read as BT.709 measures 4.4–6.2 on colorful frames (transitionsfails with 3.2–6.2). A dark frame can't show a matrix error at all; delivery's three references include colorful ones. - The showcase (2026-12-05). Building it found three
library problems.
card_flipandlight_sweepresampled the node even at rest: text inside a finished flip was visibly soft. Every look now returns the node itself at its resting ends. Delivering a kick-heavy score crossed the -1 dBFS ceiling by 0.6 dB: the limiter held, then AAC overshot. The limiter now keeps 1 dB of headroom. Limiting then cost about 1 LU (-15.0 for a -14 target). Simulating a hard clip recovered only 0.1 LU, because the real limiter also reduces gain around each peak. A model with 5 ms lookahead and 50 ms release gives -13.9.explainerandfootageare unchanged at -15.9 and -23.0. - Against Remotion, and where the time goes (2026-12-05). The showcase's first cut (1,260 frames at 1920×1080) rendered in 19.6 s with nippo and 33.8 s with Remotion 4.0.548 at its fastest setting (7 Chrome tabs; 14 took 42.1 s), on one M3 Max with a load average of 13–20 from other work. A per-second profile of the full showcase then found hd building frames in about 0.5 ms, except the footage scene at 55–62 ms: its reversed tile seeked, starting ffmpeg again, every frame. Decoding backward runs of 30 frames brought the scene to about 20 ms a frame. Everywhere else frames waited on the GPU. A Metal system trace of steady frames showed hd's real GPU work at about 3 ms a frame (1.5 ms of effect passes, 1.2 ms of Vello) while the same frames took 6.6–15 ms: another process held the GPU about 40% of the time, wgpu's per-submission work cost about 0.1 ms per submission and the first command buffer after another process's work took a median 1.4 ms, and the GPU sat at its minimum clock for 3.9 of 5.7 s because the work arrived in bursts. Frames read back four deep instead of one measured the same; two or three job processes gained 15% at most. One submission a frame removed most of the GPU wait in alternating A/B runs (13.9–17.8 ms a frame against 18.5–25.9 ms, under a load average of 40–67 from an unrelated build).
- Dropped images (2026-12-05). Regenerating the showcase showed 94 frames (2.0–5.1 s) as bare background. Stills of the same times were right, and so was a render started later: Vello's image atlas had reached 8192² and was fragmented by effect results of sizes no longer drawn (2432×1856, 2496×1920, …), and Vello skips an image it can't place. The camera look holds the whole frame, so skipping its image lost everything. Delivery compares three frames and missed it. Clearing the atlas once before skipping left only the closing fade and a film burn's dark middle among near-black frames.
- Frames in flight, fewer passes, and Vello's textures
(2026-12-05). On
bench-showcase's heaviest stretch (30–42 s) a frame took 11–12 ms: the canvas thread spent 2.1 ms on its own work and 9.0–9.4 ms indevice.poll, waiting for the previous frame. One, two and three frames in flight measured the same, as did waiting on one frame's readback rather than a blocking poll. Folding the load and store passes into the kernels cut effect-pass GPU time from 371 to 211 ms over the stretch, stills matching within 62 dB, and still didn't move the frame time. The trace explained why. The GPU was idle 9.6 ms of every 14.3, and other processes held it only 0.7 ms. Metal's submission thread was blocked in the GPU driver for nearly the whole run, so frames reached the GPU about 13 ms after they were committed. Vello destroyed its image atlas and gradient ramps after every render, five renders a frame. Every new texture cost the driver a fresh mapping and wgpu a zero fill (about 2 ms of GPU blits a frame). Pooling those textures in the vendored Vello took the stretch from 10.7–11.9 to 4.2–4.4 ms a frame, the GPU wait from 9 to 0.3 ms, and wholebench-showcaserenders from 12.8–13.7 to 6.3–7.7 s. Renders now wait on x264. Running consecutive Vello dispatches in one compute pass cut Metal command buffers from 95 to 63 a frame but saved no measurable time on its own. It stays, as less work for the driver.NIPPO_TIMES=1prints the canvas thread's breakdown every 300 frames. - YUV from the GPU (2026-12-05). With the GPU fixed,
renders waited on the encoder, and it wasn't x264. Fed from a file, x264
veryfast encoded 150 rendered frames at about 310 fps; fed RGBA through
a pipe, as nippo did, 203–211 fps, the render's own speed. A macOS pipe
moves 8.3 MB RGBA frames slowly. A compute pass now converts each frame
to Rec. 709 limited-range 4:2:0 on the GPU
(
pkg.shading.YUV420, through native'soutputprimitive), so the pipe carries 3.1 MB a frame and ffmpeg converts nothing.bench-showcasewent from 6.3–7.7 to 4.7–5.0 s (254–268 fps), its mean Y, U and V within 0.01 levels of the RGBA path. Delivery's color check passes. The hardware encoders were no faster here: 230–270 fps for H.264 and HEVC on VideoToolbox, against 310 for x264 veryfast and 600 for ultrafast, whose files are 2.4 times larger.