Skip to content

Transitions: measured against PowerPoint's video export (average difference 35.7 → 15.0) - #366

Merged
echelon merged 1 commit into
mainfrom
fix/transitions-like-powerpoint
Oct 13, 2026
Merged

echelon merged 1 commit into
mainfrom
fix/transitions-like-powerpoint

Conversation

@echelon

@echelon echelon commented Oct 13, 2026

Copy link
Copy Markdown
Member

Requested by Brandon

Before: DeckCraft's slide transitions were approximations. Across PowerPoint's 150 transition and option combinations, the average pixel difference from PowerPoint was 35.7 (0–255, averaged over t = 0.1–0.9). Typical problems:

  • linear fades and moves where PowerPoint eases;
  • several options read backwards (Push "Left" came in from the left);
  • flat stand-ins for 3-D effects;
  • some files saved as invalid XML (p:wipe dir="ru", a crush Shred).

After: the average difference is 15.0.

  • Push, Wipe, Split, Cover, Uncover, Fade, Shape, Flash, Zoom and Rotate, Pan and Rotate now match within a few points.
  • 3-D transitions (Cube, Box, Orbit, Ferris Wheel, Fly Through, Conveyor, Window…) are flat cards in real perspective with shading.
  • Every transition saved by DeckCraft and reopened in PowerPoint comes back with the same effect, duration and timing (145 of 145).

How it was measured:

  • 150 test slides were built in PowerPoint and exported with CreateVideo at 30 fps.
  • Each frame was compared with DeckCraft's frame at the same point, using the new deckcraft-cli render-transition FILE --slide N --t T[,T…] --width PX OUT.png.

What changed:

  • Timing: measured curves for each transition family (fades on an S-curve, eased moves, Cover/Uncover/Pan/Ferris Wheel each with their own curve, constant-speed Clock, Flash's white hold).
  • Directions and options: directions as PowerPoint stores them (the option is the direction of travel). Glitter, Ripple, Comb, Vortex, Box versus Cube, Switch, Fall Over, and Wind/Airplane/Origami's invX now follow it.
  • Look:
    • Soft edges on Wipe, Split, Shape, Clock and Ripple.
    • Perspective meshes for the 3-D transitions.
    • Dynamic Content transitions move slide contents over cross-fading backgrounds.
  • New options: Page Curl Single, Glitter Hexagons, Shred Strips/Particles In/Out, and Zoom and Rotate. Effect Options labels now read like PowerPoint's.
  • .pptx: PowerPoint's own elements and defaults, including Diagonal Wipe as p:strips, Zoom as p14:warp/p:newsflash, Shred's pattern and direction, and the defaults PowerPoint assumes when an option is omitted.
  • Speed: each slide is rendered once per transition and frames only composite cached textures. A test caps each frame at 30,000 triangles.

Still approximate: cloth, paper and particle effects (Curtains, Peel Off, Page Curl curling, Airplane, Origami, Fracture, Crush, Honeycomb, Vortex, Shred particles, Gallery tilt). Dissolve and Random Bars are random, so their frames can't line up. Morph isn't measurable through COM and keeps its own renderer. All of this is measured on PowerPoint for Windows only. Checked in the running slide show: transitions animate smoothly.

Tests:

  • anim: 12 tests of measured curves, directions and option differences, plus mesh tests and the triangle budget.
  • render: compositing, about 100 probes read off PowerPoint's frames (which slide shows where at t = 0.25 / 0.5 / 0.75 for each direction), and start/end for every transition and option.
  • pptx: the exact transition XML (p14:dur, fallback, advance), 21 omitted-option defaults, and every kind and option round-tripping.

🤖 Generated with Claude Code

Every transition and Effect Option was built in PowerPoint (COM), exported as
video and compared frame by frame with DeckCraft at the same progress
(mean abs diff over 150 variants 35.7 -> 15.0, 0-255).

- anim: transition_frame(kind, option, t, aspect) with measured curves
  (smoothstep fades, ease-in-out moves, Cover/Uncover/Pan curves), directions
  and option meanings, soft edges as per-corner opacity, 3-D effects as
  perspective-projected cards, Dynamic Content moving slide contents over
  cross-fading backgrounds (Source::OldBack/NewBack/OldContent/NewContent);
  layer_mesh subdivides perspective quads so textures stay straight.
- New options: Page Curl Single, Glitter Hexagons, Shred In/Out, Zoom and
  Rotate; PowerPoint-style Effect Options labels.
- render: composite_transition (CPU twin of the show), render_slide_part,
  render_transition; deckcraft-cli render-transition FILE --slide N --t T.
- show: per-vertex opacity meshes, slide parts rendered once per transition.
- pptx: PowerPoint's elements and defaults (p:strips diagonal wipes, p14:warp
  and p:newsflash for Zoom, p:zoom for Shape In/Out, glitter pattern, shred
  rectangle/dir, prstTrans invX per preset, pageCurlSingle, defaults for
  randomBar/doors/window/pan/zoom); PowerPoint reopens DeckCraft's files with
  the same effects.
- Tests: measured curves, probes of which slide shows where at t, option
  coverage, per-frame triangle budget, PowerPoint XML and defaults round trip.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@echelon echelon self-assigned this Oct 13, 2026
@echelon
echelon merged commit d5e3055 into main Oct 13, 2026
2 checks passed
brzuchal added a commit to brzuchal/deckcraft that referenced this pull request Oct 13, 2026
main labels transition options per transition (storytold#366); the Effect Options
menu translates the new labels, the catalog test checks them, and both
catalogs gain the 35 new option labels. copy_opts in the transition
renderer carries the placeholder prompt through.
anishguduru pushed a commit to anishguduru/deckcraft that referenced this pull request Oct 16, 2026
…ge (storytold#366)

* Text: find the word and the line around a glyph

PageText gets word_at(i) and line_at(i). Each returns the first and
last glyph of the word or the line around glyph i, or None when i is
past the end of the page's text. A word stops at a word gap, a blank
glyph or a line end. A line is the run of glyphs with the same line
number.

The canvas's double-click used its own loop for this, which indexed the
glyph, line and gap arrays directly. It now calls word_at, which reads
them with get(). Double-clicking selects the same words as before.

Test: render words_and_lines_around_a_glyph, on two lines with a blank
glyph, a word gap and a line break.

* Issue storytold#295: three clicks select the line, four clicks the page

With the Select tool, quick clicks on text widen the selection like
Acrobat: two clicks select a word (as before), three the line, four or
more all the text on the page. A third click used to clear the
selection.

egui counts only up to triple clicks and reports a fourth quick click
as another triple, so the view keeps its own count of the current run.
A single click resets it and a pause ends it.

With the markup tools (Highlight and the like) and Redact, a
double-click already turns the word into a mark at once. They stop at
the word, so more clicks don't stack line or page marks.

Tests: ui-egui quick_clicks_select_a_word_then_the_line_then_the_page
and quick_clicks_with_the_highlighter_mark_only_the_word.

parity: view.text-select cites the tests. The notes say what is
missing: paragraph selection, and Ctrl/⌘+A across the whole document
(it selects the current page).

* Clippy: as_chunks in the signature preview test (follow-up to storytold#355)

Clippy 1.99 rejects chunks_exact with a constant chunk size
(chunks_exact_to_as_chunks), so `cargo clippy --workspace --all-targets
-- -D warnings` fails on main since storytold#355. Use as_chunks, as storytold#360 did
for the test above it.

---------

Co-authored-by: Brandon Thomas <echelon@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant