Repository navigation
Ariadne: keyframe animation, a scene's animations: - #1515
Merged
Merged
Conversation
A scene's `animations:` moves its nodes (position, rotation, scale, color,
opacity, visible) or writes state keys along keyframes over the scene clock:
linear, step or smooth (cubic Hermite, Catmull-Rom tangents, flat at the ends)
between keys; once, loop or pingpong at the end; a speed (below 0,
backwards) and autoplay. A node id names every node with it (each repeat:
copy's child), a path a/b one. Each animation's <prefix>.animations.<id>.time,
.playing and .speed are written as it plays and read each frame, so a script
seeks, plays, pauses and changes its speed. An animated scene runs on the
scene clock, as clock: {} would make it. Gap item 7 of the scene-format plan.
- New inc/cvc/ariadne/scene_animation.h / src/cvc/ariadne/scene_animation.cpp:
SceneAnimation, SceneAnimationTrack, sample_track, advance_animation,
node_key_width (no renderer).
- Loader: parse_scene_animations; bad tracks left out with a warning.
- Realizer: RealizedScene::animations (SceneAnimationBinding), realize_animations
(start pose, clock on), tick_scene_animations in tick_scene after physics and
clip sync.
- docs/ARIADNE.md §5.4 "Animations".
- Tests: ariadne_loader_test AnimationsParsed, AnimationTrackSampling,
AnimationPlayback; cvcgl_ariadne_animation.
The closed schema (#1464, now on master) gains $defs/animation and $defs/animation_track, and animations: in both scene definitions (scene: and a scenes: entry). Checked with the validator built in: ariadne_schema_test 13 (one skip), ariadne_loader_test 265, and cvcgl_ariadne_animation's document validates.
docs/ARIADNE.md conflicted where this branch adds the Animations paragraph and #1491 its Picking a node paragraph at the same place in §5.4: both kept.
transfix
enabled auto-merge (squash)
November 24, 2026 01:57
…acOS lanes never started)
…e/animations # Conflicts: # src/cvc/CMakeLists.txt
…ment # Conflicts: # src/cvc/ariadne/schema/ari.v1.schema.json # src/cvc/tests/ariadne_loader_test.cpp # src/cvcGL/ariadne/scene_realize.cpp
transfix
added a commit
that referenced
this pull request
Nov 24, 2026
…hers # Conflicts: # src/cvc/tests/ariadne_loader_test.cpp # src/cvcGL/CMakeLists.txt
transfix
added a commit
that referenced
this pull request
Nov 24, 2026
…, and others # Conflicts: # docs/ARIADNE.md # inc/cvc/ariadne/scene_animation.h # src/cvc/ariadne/loader.cpp # src/cvc/ariadne/schema/ari.v1.schema.json # src/cvc/tests/ariadne_loader_test.cpp # src/cvcGL/CMakeLists.txt # src/cvcGL/ariadne/scene_realize.cpp
transfix
added a commit
that referenced
this pull request
Nov 24, 2026
Conflicts: src/cvcGL/CMakeLists.txt's 8 MB-stack list keeps both sides' tests; volume_grid, volume_grid_contours and volume_grid_quad take master's images (#1452 changed their documents) until CI's frames of the merge are taken.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A scene can now animate its nodes along keyframes. Before this, anything that moved needed a program writing keys every frame, physics, or a custom node type; there was no way to say "the door swings open over two seconds". This is item 7 of the Ariadne scene-format gap plan.
How it works
keys: [[seconds, value], ...].node: <id>and akey::position,rotation,scale,color,opacityorvisible. The id names every node that has it, such as eachrepeat:copy's child; a path,post_3/flag, names one.state: <path>, writes its value to that key, resolved as a bind is.interpolation:islinear,step, orsmooth(a cubic Hermite with Catmull-Rom tangents, flat at the ends).[0, 0, 360]is a whole turn. Item 2's decision stands: no quaternions until something needs them.duration:). At the end it stops, loops or turns back (loop: false | true | pingpong).speed:can be below 0 to play backwards, andautoplay: falsewaits.<prefix>.animations.<id>.time,.playingand.speed, are written as it plays and read every frame. So a program seeks, plays, pauses or changes the speed withstate-set. A once animation played again after its end starts over.clock: {}would), and animations read its time between quanta. Sosim_transport's Paused and Speed hold and slow animations along with physics.Changes
inc/cvc/ariadne/scene_animation.h/src/cvc/ariadne/scene_animation.cpp, with no renderer:SceneAnimation,SceneAnimationTrack,sample_track,advance_animation,node_key_width.parse_scene_animationsputs keyframes in time order. A track naming neither or both ofnode:andstate:, a node key nothing can move, or keyframes of mixed width is left out with a warning. An animation id must be a key segment.RealizedScene::animationsholds aSceneAnimationBindingper animation: its playhead, its kept state keys, and its targets, found again when the scene's nodes change.realize_animationssets the start pose and turns the clock on.tick_scene_animationsruns intick_sceneafter physics and clip sync, before the custom tickers.repeat:.Tests
ariadne_loader_test:AnimationsParsed: every key; keyframes put in time order; four bad tracks (an unknown key, the wrong width, both node and state, mixed widths) and a bad id left out with warnings.AnimationTrackSampling: the ends hold; linear, step and smooth between keys; smoothstep for a two-key smooth track.AnimationPlayback: once stops at either end, including backwards; loop wraps both ways; pingpong turns back; a zero-length animation holds.cvcgl_ariadne_animation, headlessrealize_sceneandtick_scenestepping the clock 0.05 s a frame (under its 8-quanta cap), 23 checks:playing0.repeat:copies' flags while a path scales one.Verified locally
Windows, MSVC, with cvcGL (no examples, no pycvc). The full ctest suite, 8,556 tests at
-j 10, on master 8d27f6a (#1464):cvcgl_contour_labandcvcgl_volume_grid_contours(this build has nocvc::planar), andcvcgl_ari_golden, whose seven goldens have the same pixel counts as master.StateClusterMembership.FailureDetectionEvictfailed under load and passes alone.After merging #1491 (7337df6): the docs conflict only.
ariadne_loader_test: 266 pass.cvcgl_ariadne_animation: 23/23.cvcgl_ariadne_node_pick: 23/23.cvcgl_ariadne_repeat: 40/40.With the JSON-schema validator built in:
ariadne_schema_testpasses 13 (one skip, the without-validator case), andcvcgl_ariadne_animation's document passesari validate.Not verified: Linux, macOS, wasm and pycvc.
Schema
#1464 (the closed schema, which every load checks) is on master, so this PR adds its own keys:
$defs/animationand$defs/animation_track, andanimationsin both scene definitions (scene:and ascenes:entry).Not done
state:track can drive its keys meanwhile.on_end:program).