Why 48-frame game VFX loops pop on frame 48
Snapping every rotating star and polygon to an integer multiple of its symmetry angle (2π/sym) over 4 seconds is not enough to make a 48-frame magic circle loop cleanly. When a ring carries distinct rune glyphs instead of identical geometry, frame 47 → 0 still snaps—unless you render an overlap tail, crossfade it back into the head, and verify every wrap automatically.
Why period-matched rotation still pops at frame 47 → 0
In a procedural magic-circle VFX pipeline, the first rule of a clean 4-second loop (48 frames at 12 fps) is matching every layer's angular travel to its symmetry. A 5-pointed star or pentagon rotates by an integer multiple of 2π/5 over 4.0 seconds; a 9-pointed star rotates by an integer multiple of 2π/9; a 24-segment outer ring rotates by an integer multiple of 2π/24. When frame 48 arrives at t = 4.0 s, every geometric vertex lands back on top of frame 0.
Yet when you hard-cut raw frames 0..47 of Magic Circle VFX Vol.1 and run our automated seam checker (check_loop.py), 3 of the 12 circles immediately fail with SEAM?—and 6 more show a measurable wrap jump. The culprit is the difference between slot symmetry and glyph symmetry.
A rune ring of count = 25 glyphs spaces its slots every 2π/25 radians, so snapping rotation to +2 slots over 4 seconds aligns every slot position on frame 48. Each slot, however, holds a different pseudo-random rune glyph. After 4 seconds, rune #0 sits where rune #2 started—so hard-cutting back to frame 0 snaps every glyph along both rune rings back to a different character in a single 1/12-second tick. Meanwhile, circles that use identical symmetric tick rings (Bits) have zero glyph mismatch and zero wrap jump.
Measured across all 12 Vol.1 circles (naive cut vs. close_loop)
To measure the exact impact without guesswork, we reconstructed the naive 48-frame hard-cut loop for all 12 circles in Magic Circle VFX Vol.1 directly from their 60 raw frames (f0000..f0047) using the exact thicken_and_downsample(512) and bloom() functions from package.py—omitting only close_loop()—and scored both the naive cut and the shipped 48-frame closed loop with check_loop.py. That script computes the mean per-channel RGB difference for every adjacent pair (steps) and for the wrap transition f47 → f0 (wrap), flagging SEAM? whenever wrap exceeds max(steps) × 1.1.
On Blood Seal (25 outer Ring runes + 15 inner Box runes = 40 distinct glyphs), naive hard-cutting produces wrap = 7.76 against step_max = 6.29 (1.23× max, exceeding the 6.92 threshold → SEAM?). Isolating |finished[0] − finished[48]| confirms why: 14,328 of 197,801 lit pixels (7.2%, mean diff 3.27) differ after 4.0 seconds, and every single one of those pixels sits on the two rune rings while the 5-pointed star, pentagon, and double borders vanish to zero. Running close_loop() with 12 overlap frames drops the wrap transition to 6.25 against step_max = 6.28 (0.99× max → OK).
Shadow Enneagram (27 outer Ring runes + 18 inner Box runes = 45 distinct glyphs) repeats the exact pattern: naive hard-cutting spikes wrap to 9.74 against step_max = 8.36 (1.17× max, above the 9.19 threshold → SEAM?), with 13,442 of 196,572 lit pixels (6.8%, mean diff 3.58) lighting up exclusively on the two rune rings while both 9-pointed stars disappear. Applying close_loop() drops wrap to 8.23 (0.99× max → OK). Holy Octagram (40 + 24 runes) is the third naive failure (10.98 vs 9.66, 1.14× SEAM? → 9.67 vs 9.61, 1.01× OK), while Gold Sovereign (48 + 30 runes) sits just under the cutoff at 1.08× naive (9.97 → 9.19 closed). Every single one of the 3 Bits-only circles (Lightning Hexagram, Poison Spiral, Void Matrix) measures identically in naive and closed forms, proving that non-identical rune glyphs are the sole source of the seam. Across the full Vol.1 pack, close_loop() brings 12 of 12 loops into 0.96×–1.01× max (OK), and all 12 paired 24-frame cast animations hand off with last_vs_loop_end = 0.00 and handoff == wrap (OK).
Blood Seal (512×512 · 25 outer Ring + 15 inner Box runes)

Naive f47 → f0 diff heatmap (wrap = 7.76, 1.23× max → SEAM?): double-exposed coral spikes along both rune rings

Closed f47 → f0 diff heatmap (wrap = 6.25, 0.99× max → OK): identical gain scale, rune-ring spikes flattened

Pure period mismatch |f00 − f48| (mean 3.27, 14,328 px): 5-star & pentagon vanish; only 25 + 15 runes light up
Shadow Enneagram (512×512 · 27 outer Ring + 18 inner Box runes)

Naive f47 → f0 diff heatmap (wrap = 9.74, 1.17× max → SEAM?): bright wrap jumps across 27 outer + 18 inner runes

Closed f47 → f0 diff heatmap (wrap = 8.23, 0.99× max → OK): same gain scale after 12-frame overlap crossfade

Pure period mismatch |f00 − f48| (mean 3.58, 13,442 px): both 9-pointed stars disappear; only the 45 rune glyphs mismatch
Magic Circle VFX Vol.1 — all 12 circles measured with check_loop.py
| Circle | Rune rings | Naive max | Naive wrap | Closed wrap | Cast c23=f47 | Handoff |
|---|---|---|---|---|---|---|
| blood-seal | 25 Ring + 15 Box | 6.29 | 7.76 (1.23× SEAM?) | 6.25 (0.99× OK) | 0.00 | 6.25 OK |
| shadow-enneagram | 27 Ring + 18 Box | 8.36 | 9.74 (1.17× SEAM?) | 8.23 (0.99× OK) | 0.00 | 8.23 OK |
| holy-octagram | 40 Ring + 24 Box | 9.66 | 10.98 (1.14× SEAM?) | 9.67 (1.01× OK) | 0.00 | 9.67 OK |
| gold-sovereign | 48 Ring + 30 Box | 9.22 | 9.97 (1.08× OK) | 9.19 (1.01× OK) | 0.00 | 9.19 OK |
| ice-heptagram | 42 Ring | 7.20 | 7.75 (1.08× OK) | 7.14 (0.99× OK) | 0.00 | 7.14 OK |
| fire-pentagram | 30 Ring | 6.21 | 6.64 (1.07× OK) | 6.16 (0.99× OK) | 0.00 | 6.16 OK |
| nature-bloom | 36 Ring | 8.02 | 8.37 (1.04× OK) | 7.92 (0.99× OK) | 0.00 | 7.92 OK |
| water-tide | 44 Ring | 7.06 | 7.30 (1.03× OK) | 6.99 (0.99× OK) | 0.00 | 6.99 OK |
| arcane-orrery | 48 Ring | 11.41 | 11.64 (1.02× OK) | 11.32 (0.99× OK) | 0.00 | 11.32 OK |
| poison-spiral | 33 Bits | 13.22 | 13.18 (1.00× OK) | 13.18 (1.00× OK) | 0.00 | 13.18 OK |
| void-matrix | 40 + 20 Bits | 7.34 | 7.25 (0.99× OK) | 7.25 (0.99× OK) | 0.00 | 7.25 OK |
| lightning-hexagram | 36 Bits | 5.97 | 5.74 (0.96× OK) | 5.74 (0.96× OK) | 0.00 | 5.74 OK |
All 12 Magic Circle VFX Vol.1 circles (512×512, 48f loop + 24f cast) measured by the exact check_loop.py formula. Highlighted rows fail naive hard-cut (SEAM?, > 1.1× max); all 12 pass after close_loop() with cast last_vs_loop_end = 0.00.
Eight lines to close the loop, three lines to verify it
Instead of trying to force every rune ring to complete a full 360° revolution in 4 seconds (which would spin text unreadable fast), the renderer outputs 60 raw frames: 48 loop frames (4.0 s) plus 12 overlap frames (1.0 s) covering t = 8.00 s to 8.92 s. After supersampling and multi-tap Gaussian bloom, close_loop() in package.py (lines 74–81) linearly crossfades the 12 tail frames frames[48:60] into the first 12 head frames frames[0:12] using w = (i + 1) / (overlap + 1).
At i = 0 (frame 0 of the shipped loop), w = 1/13 ≈ 7.7% comes from frames[0] and 12/13 ≈ 92.3% comes from frames[48]—the exact continuation one 12-fps tick after frame 47. Because all geometric layers match between frames[i] and frames[48 + i], the stars, rings, and polygons stay razor-sharp with zero ghosting during the crossfade; only the rune glyphs smoothly dissolve from their end-of-cycle characters into their start-of-cycle characters over a full second (12 frames), erasing the frame-47-to-0 snap.
The same shared clock also makes the 24-frame cast-to-loop handoff pop-free. Loop frames render at time = 4.0 + i/12 (so f47 lands on t = 7.917 s), while cast frames render at time = 6.0 + k/12 (so the final cast frame c23 also lands on t = 7.917 s). By c23, the ignition flash envelope has decayed back to 0 (gain = 1.0, bloom = 1.0) and draw-on is complete, so cast c23 is pixel-identical to loop f47 (last_vs_loop_end = 0.00 across all 12 circles). Because loop f0 is 92.3% frames[48] (t = 8.00 s), stepping from cast c23 into loop f0 moves forward by the exact same 1-frame delta as the loop itself (handoff = 6.25 OK on Blood Seal, 8.23 OK on Shadow Enneagram).
package.py lines 74–81: close_loop() blends the 12 overlap tail frames frames[48:60] into frames[0:12] with w = (i + 1) / (overlap + 1) (1/13 through 12/13) after bloom.
def close_loop(frames: list[np.ndarray]) -> list[np.ndarray]: """frames[L:] を frames[:overlap] に溶かし込み、L フレームで継ぎ目なくループさせる。""" overlap = len(frames) - LOOP_FRAMES out = list(frames[:LOOP_FRAMES]) for i in range(overlap): w = (i + 1) / (overlap + 1) # 0→1: 先頭ほど「余り(前ループの続き)」を強く out[i] = frames[i] * w + frames[LOOP_FRAMES + i] * (1.0 - w) return outcheck_loop.py lines 22–38: automated gate run on every exported pack, checking both loop wrap (wrap <= max(steps) * 1.1) and cast handoff (last_vs_loop_end < 0.5 and handoff <= max(steps) * 1.1).
for d in sorted(p for p in root.iterdir() if not p.name.endswith("_cast")): fr = load(d) steps = [np.abs(fr[i + 1] - fr[i]).mean() for i in range(len(fr) - 1)] wrap = np.abs(fr[0] - fr[-1]).mean() ok = "OK" if wrap <= max(steps) * 1.1 else "SEAM?" bad += ok != "OK" line = f"{d.name:20s} n={len(fr)} step_mean={np.mean(steps):.2f} step_max={max(steps):.2f} wrap={wrap:.2f} {ok}" cast_dir = root / f"{d.name}_cast" if cast_dir.exists(): cast = load(cast_dir) # cast の最後のコマはループの最終コマと同じ時刻・同じ処理のはず(=差はほぼ 0)。 same = np.abs(cast[-1] - fr[-1]).mean() hand = np.abs(fr[0] - cast[-1]).mean() cok = "OK" if hand <= max(steps) * 1.1 and same < 0.5 else "SEAM?" bad += cok != "OK" line += f" | cast n={len(cast)} last_vs_loop_end={same:.2f} handoff={hand:.2f} {cok}" print(line)Checklist for seamless game VFX loops and cast handoffs
Visual spot-checking a 12-fps looping sprite sheet in a video player is notoriously unreliable—a 1-frame glyph snap at 1.14× to 1.23× step_max is easy to miss during a busy build and painfully obvious once the player stares at an active ward in-game.
Treating loop continuity as a two-part contract—period-matched geometry plus an overlap tail for non-periodic details, gated by a 3-line numerical check—catches every seam before packaging.
- Match every geometric layer's angular travel over the loop duration to an integer multiple of 2π/sym so stars, polygons, and segmented rings never double-expose during a crossfade.
- Separate slot symmetry from glyph or noise symmetry: any ring of unique runes, procedural noise, or drifting embers will still snap at f47 → f0 unless blended across an overlap tail.
- Render L + overlap frames (here 48 + 12 = 60) and crossfade frames[L:L+overlap] into frames[0:overlap] with w = (i + 1) / (overlap + 1) after bloom so frame 0 is mostly the true continuation of frame L-1.
- Put one-shot cast animations on the same modulo-T clock as the loop so the final cast frame (c23) matches loop frame L-1 (diff 0.00) with gain and bloom returned to 1.0, then enforce wrap <= max(steps) * 1.1 in CI.
Magic Circle VFX Vol.1 — Elemental Sigils12 animated circles · 48f closed loops + 24f casts · 512px PNG/WebM · itch.io
Magic Circle VFX Vol.1 — Elemental Sigils
All 12 animated elemental magic circles (512×512 PNG sequences, spritesheets, transparent WebM, and black-background MP4—each with a 48-frame closed loop and a 24-frame cast animation) verified with check_loop.py.