Animation Playback Control
Driving skeletal animations directly: playback speed, exact positioning inside a clip, crossfading and vertex morphing.
Classes: TGorillaAnimationManager, TGorillaAnimation, TSkeletonKeyAnimation
Unit: Gorilla.Animation
Table of Contents
- Who Does What
- Basic Playback
- Playback Speed
- Position Inside a Clip
- Crossfading Between Animations
- Root Motion and In-Place Playback
- Morphing
- Recipe: Rendering a Sprite Sheet
- Limitations
- See Also
Who Does What
TGorillaModel
└─ AnimationManager : TGorillaAnimationManager playback, clip switching, crossfade
└─ TGorillaAnimation one clip ("c-walk.dae")
└─ Skeleton : TSkeletonKeyAnimation the clock, the loop flag, the tick
└─ Interpolators one per animated joint / property
(TPoint3DKeyAnimation, TQuaternion3DKeyAnimation,
TTransformationKeyAnimation, TCoordinateKeyAnimation, ...)
The important part for fine-grained control: a TGorillaAnimation is not itself an FMX
animation. Its Skeleton is - it holds the clock (CurrentTime, Duration, Loop,
Pause) and, on every tick, copies its own time into each interpolator and lets them
write the joint values. Everything below works on Skeleton and on its
Interpolators list, both of which are public.
Basic Playback
var LAnim : TGorillaAnimation;
// by ID, through the manager (recommended - this is the path that crossfades)
GorillaModel1.AnimationManager.PlayAnimation('c-walk.dae');
// or on the instance
LAnim := GorillaModel1.AnimationManager.GetAnimation('c-walk.dae');
LAnim.Start();
To find the ids, use AnimationManager.GetAnimationNames() (or GetSortedAnimations()
for the instances) - both naturally sorted, Walk2 before Walk10.
PlayNextAnimation / PlayPreviousAnimation step through that same order and wrap
around; see Listing Animations.
| Member | Effect |
|---|---|
Start() |
Enables the skeleton and makes the clip the manager's current one (no crossfade, the previous clip is not stopped) |
Stop() |
Disables the skeleton. FMX advances the clip to its final frame first |
StopAtCurrent() |
Disables the skeleton without the final-frame jump - the visible pose is kept |
Reset() |
Ticks all interpolators at time 0 |
IsRunning / IsPaused |
State of the skeleton (Skeleton.Running / the pause flag below) |
Skeleton.Pause |
Up to Delphi 12: True freezes playback; the pose stays where it is |
Skeleton.Paused |
Delphi 13+: the same, use it instead of Pause (see below) |
Skeleton.Loop |
Repeat the clip |
Pausing only stops the automatic advance: the animation tick keeps arriving and returns immediately. You can still position the clip yourself, see Stepping Through a Clip.
Querying the State and the Bind Pose
TGorillaModel offers shortcuts to ask for the animation state without checking
AnimationManager and AnimationManager.Current yourself:
| Member | Effect |
|---|---|
HasCurrentAnimation() |
True if the model has an animation manager with a current animation. The current animation does not need to be playing |
TryGetCurrentAnimation(out AAnim) |
Returns the current animation in AAnim, or nil and False if there is none |
IsAnimationPlaying() |
True if the current animation is playing at the moment |
IsAnimationPlaying(AId) |
True if the animation with id AId is playing - whether it is the current one or not (f.e. while blending). The id is looked up like GetAnimation does; unknown ids give False |
ResetToBindPose() |
Stops all animations and returns the model to its unanimated pose (shortcut for AnimationManager.ResetToBindPose) |
var LAnim : TGorillaAnimation;
if GorillaModel1.TryGetCurrentAnimation(LAnim) then
Label1.Text := LAnim.Id;
if GorillaModel1.IsAnimationPlaying('walk') then
GorillaModel1.ResetToBindPose();
Neither Stop() nor Reset() brings back the bind pose: Stop leaves the last pose of
the clip, Reset jumps to the first frame of the clip. ResetToBindPose works for cached
and CPU skinned animations alike:
- every node an animation of this manager writes to (joints and animated sub-meshes) gets the transformation of its definition back, meshes with vertex (morph) animations their original positions; the armatures skin their meshes once more with that pose
- nodes no animation touches are left alone, and so is the model itself - a position the application gave it is kept
Currentstays assigned,PlayAnimationstarts from the bind pose afterwards
Which Clock Drives the Clip
Up to Delphi 12 skeletons are advanced by the FMX animation thread, and
TGorillaAnimationManager.ForceStep can step it right before a frame is drawn.
Delphi 13 replaced that thread with a display link that skips ticks while a paint is
pending - with a busy renderer that means poses advancing in lumps. Gorilla3D therefore
puts running skeletons (and TPoint3DAnimations) under TGorillaRenderClock:
Start hands them over, TGorillaViewport advances them once at the start of every
rendered frame, Stop gives them back. To keep FMX's own ticks out, the clock holds the
FMX Pause flag of every animation it drives, which has two consequences:
- pause a clip through
Skeleton.Paused(or readIsPaused), notSkeleton.Pause ForceStepno longer steps anything on Delphi 13; it only reports whether the minimum delta has passed
Playback Speed
SetSpeed and What It Really Does
procedure TGorillaAnimation.SetSpeed(const ASpeed : Single);
The implementation multiplies the Duration of every interpolator by ASpeed:
LInter.Duration := LInter.Duration * ASpeed;
Three consequences worth knowing before using it:
- It is a duration factor, not a speed factor.
SetSpeed(2.0)makes the clip take twice as long, i.e. it plays at half speed. Use1 / rate. - It is relative and cumulative. Calling it twice with
2.0gives a four times longer clip. There is no "reset to original". - It does not touch
Skeleton.Duration. The skeleton clock still loops or stops at the original clip length, while the interpolators now normalize against a different one - the clip would restart before the pose reached its end.
So for anything but a one-off tweak, set both levels explicitly.
An Absolute Playback Rate
Remember the original durations once, then derive every later rate from them:
type
TAnimationRate = record
private
FAnim : TGorillaAnimation;
FBaseSkel : Single;
FBaseInts : TArray<Single>;
public
procedure Attach(const AAnim : TGorillaAnimation);
procedure SetRate(const ARate : Single);
end;
procedure TAnimationRate.Attach(const AAnim : TGorillaAnimation);
var i : Integer;
begin
FAnim := AAnim;
FBaseSkel := AAnim.Skeleton.Duration;
SetLength(FBaseInts, AAnim.Skeleton.Interpolators.Count);
for i := 0 to AAnim.Skeleton.Interpolators.Count - 1 do
FBaseInts[i] := AAnim.Skeleton.Interpolators[i].Duration;
end;
procedure TAnimationRate.SetRate(const ARate : Single);
var i : Integer;
begin
if (ARate <= 0) or not Assigned(FAnim) then
Exit;
// 1.0 = original speed, 2.0 = twice as fast, 0.5 = half speed
FAnim.Skeleton.Duration := FBaseSkel / ARate;
for i := 0 to FAnim.Skeleton.Interpolators.Count - 1 do
FAnim.Skeleton.Interpolators[i].Duration := FBaseInts[i] / ARate;
end;
Usage:
FWalkRate.Attach(GorillaModel1.AnimationManager.GetAnimation('c-walk.dae'));
FWalkRate.SetRate(1.6); // sprint
FWalkRate.SetRate(1.0); // back to authored speed
Durations live on the animation instance, and every TGorillaModel creates its own
instances - changing the rate on one character does not affect the others.
Position Inside a Clip
The Time Model
Everything is driven by one scalar. Skeleton.CurrentTime runs from 0 to
Skeleton.Duration (seconds); NormalizedTime is that value divided by the duration,
so 0.0 .. 1.0. The interpolators receive the skeleton's time on every tick and pick
the two keys surrounding it.
| Member | Meaning |
|---|---|
Skeleton.Duration |
Clip length in seconds |
Skeleton.CurrentTime |
Current position in seconds (read-only) |
Skeleton.NormalizedTime |
Current position as 0..1 (read-only) |
Skeleton.TransitionTime |
Last normalized time the skeleton evaluated |
Animation.FrameCount / FrameRate |
The cache grid, see below - not the source clip's frame rate |
Frames, Sub-Frames and Interpolation
Poses are not looked up per frame, they are interpolated between the two surrounding keys:
LTrans := (LNorm - LKey1.Key) / (LKey2.Key - LKey1.Key);
LVal := Self.InterpolatePoint3D(LV1, LV2, LTrans);
- positions and scales: linear
- rotations:
SLerpon quaternions - transformation matrices: decomposed into translation / rotation / scale, the rotation part slerped, then recomposed
- vertex arrays (
TCoordinateKeyAnimation): linear per vertex
So any position between two keys is a real interpolated pose, not a snap to the nearest frame. "Frame 14.5 of a 29-frame clip at 30 fps" is simply a time:
// frame index -> normalized position -> seconds
LNorm := 14.5 / 29; // 0.5
LTime := LNorm * LAnim.Skeleton.Duration; // seconds
Be careful with what "frame" means.
TGorillaAnimation.FrameCountandFrameRatedescribe the cache grid the engine can bake a clip onto (FrameRateis a build constant, 60 on Windows, 24 on some mobile platforms), not the frame count of the imported file. If your source clip has 29 frames at 30 fps, derive positions from your own frame count and the clipDuration, as above - do not assumeFrameCountmatches the authoring tool.
Seeking to an Exact Position
SeekTo puts the clock at an absolute time without evaluating a pose; ProcessTick
with a zero delta then evaluates exactly there:
procedure SeekNormalized(const AAnim : TGorillaAnimation; const APos : Single);
var LSkel : TSkeletonKeyAnimation;
begin
LSkel := AAnim.Skeleton;
// clamp slightly below 1.0: reaching Duration ends (or wraps) the clip
LSkel.SeekTo(Min(APos, 0.9999) * LSkel.Duration);
// deltaTime = 0 -> the clock stays where SeekTo put it, the pose is written
LSkel.ProcessTick(0, 0);
end;
SeekNormalized(LAnim, 0.5); // exactly half way through the clip
SeekNormalized(LAnim, 14.5 / 29); // "frame 14.5" of a 29-frame clip
Two conditions apply, both coming from FMX TAnimation.ProcessTick:
- the animation must be running (
LAnim.Start()), and the FMXPauseflag must beFalse- otherwiseProcessTickreturns without evaluating - reaching
Durationruns the end-of-clip logic: withLoop = Falsethe clip stops andOnFinishfires, withLoop = Truethe clock wraps to zero. Hence the clamp.
Delphi 13+: a running skeleton sits under
TGorillaRenderClock, which holds its FMXPauseflag - a directProcessTick(0, 0)therefore returns without evaluating. Either let the next rendered frame evaluate the position (SeekToalone; the render clock then adds that frame's delta), or take the skeleton off the clock for the evaluation:TGorillaRenderClock.Release(LSkel); // FPause back to the clip's own pause state try LSkel.SeekTo(LPos * LSkel.Duration); LSkel.ProcessTick(0, 0); finally TGorillaRenderClock.TakeOver(LSkel); // note: resets a Paused state to False end;
Because the clock is set absolutely before every evaluation, a tick from the FMX
animation thread in between does not accumulate - the next SeekTo discards it.
Stepping Through a Clip Off the Animation Thread
When you want the clip to advance only when you say so - batch rendering, a timeline
scrubber, deterministic recording - use the caching tick instead. It ignores the
Running and Pause flags and advances the interpolators directly:
procedure TSkeletonKeyAnimation.ProcessAnimationRemote(ATime, ADeltaTime : Single);
LAnim.Stop(); // the animation thread leaves it alone
...
// advance by exactly one output frame and write the pose
LAnim.Skeleton.ProcessAnimationRemote(0, 1 / 30);
This path is relative: each call advances by ADeltaTime from wherever the
interpolators currently are. Use it to walk a clip from its beginning at a fixed step;
use SeekTo + ProcessTick when you need to jump to an arbitrary position.
Caching Quantizes the Result
If a clip was loaded with caching flags, the engine bakes vertex buffers on a fixed grid and the renderer picks one by rounding:
LFrame := Round(Self.FFrameCount * FSkeleton.TransitionTime);
That rounding is exactly what you do not want for sub-frame positioning: two nearby positions can resolve to the same baked frame. Joints are still interpolated (they feed IK and bounds), but the drawn mesh comes from the baked buffer.
For frame-accurate work, load the clip without caching - which is the default:
GorillaModel1.AddAnimationFromFile(LPath + 'c-walk.dae', []); // no caching
Re-Baking or Dropping the Cache
The cache can be changed after loading - for all animations or only for selected ones (ids are compared case-insensitively, unknown ids are ignored):
| Method | Effect |
|---|---|
RecacheAnimations(ACaching = []) |
Throws the cached frames of all animations away and bakes them again |
RecacheAnimationsByName(AIds, ACaching = []) |
The same for the animations in AIds |
DiscardAnimationCache() |
Throws the cached frames of all animations away - they play skinned on the CPU afterwards |
DiscardAnimationCacheByName(AIds) |
The same for the animations in AIds |
// frame-accurate work on 'idle', everything else stays cached
GorillaModel1.DiscardAnimationCacheByName(['idle']);
// bake 'walk' and 'run' again
GorillaModel1.RecacheAnimationsByName(['walk', 'run']);
ACaching = []keeps the flags each animation was cached with before - animations that were never cached (or whose cache was discarded) stay uncached. Pass flags (f.e.GORILLA_ANIMATION_CACHING_DEFAULT) to bake them again:GorillaModel1.DiscardAnimationCache(); GorillaModel1.RecacheAnimations(GORILLA_ANIMATION_CACHING_DEFAULT);- re-baking takes as long as the initial caching did - for a character with many clips that is seconds. Animations that were playing are restarted afterwards
- a playing animation keeps playing after its cache was discarded
- the frames belong to the model definition: other model instances sharing it (f.e. loaded from the same assets package) lose them too
Crossfading Between Animations
The engine does have a crossfade. It lives on TGorillaAnimationManager and interpolates
every joint from the pose that was visible at the switch into the new clip.
Blend Settings
| Property | Default | Description |
|---|---|---|
BlendEnabled |
True |
Master switch for crossfading |
BlendDuration |
0.25 |
Base fade length in seconds; 0 disables blending |
BlendUseSmoothStep |
True |
Smoothstep easing instead of a linear ramp |
BlendAdaptive |
True |
Scale the fade by how far apart the two poses are |
BlendMaxDuration |
0.6 |
Upper bound for the adaptive duration |
BlendActive |
- | Read-only: True while a fade is running |
with GorillaModel1.AnimationManager do
begin
BlendEnabled := True;
BlendDuration := 0.2; // idle <-> walk feels tight at 0.15 - 0.25
BlendAdaptive := True; // mid-throw -> idle gets more time automatically
BlendMaxDuration := 0.5;
BlendUseSmoothStep := True;
end;
GorillaModel1.AnimationManager.PlayAnimation('c-walk-right.dae');
With BlendAdaptive, the effective length is derived from the largest angular distance
between the captured pose and the target pose and clamped to
[BlendDuration, BlendMaxDuration] - similar poses fade quickly, far-apart poses get
more time.
Some rigs (complex humanoid FBX exports such as ReadyPlayerMe characters) show limb skew during element-wise matrix blending. Turn the crossfade off per model in that case:
GorillaModel1.AnimationManager.BlendEnabled := False;
Only PlayAnimation Blends
The crossfade is implemented inside PlayAnimation. It captures the current pose,
stops the old clip with StopAtCurrent (so its final frame never flashes), starts the
blend and then the new clip.
Assigning AnimationManager.Current does not blend - it stops the old clip and
switches hard. That is also the reason
TGorillaAnimationController switches without a
fade and why its tmBlend mode is still a placeholder: its Switch goes through
Current := ....
If you want transition-driven switching and crossfades, use the controller's transition table as a decision engine and perform the switch yourself:
var
LLay : TGorillaAnimationTransitionLayer;
LTr : TGorillaAnimationTransition;
LCur : TGorillaAnimation;
begin
LLay := GorillaAnimationController1.FindLayer('Layer0');
LCur := GorillaModel1.AnimationManager.Current;
if LLay.Transitions.TryGetTransition(LCur, AHotKey, AStates, LTr) then
begin
// PlayAnimation instead of the controller's own Switch -> crossfade
GorillaModel1.AnimationManager.PlayAnimation(LTr.AnimationTo);
GorillaModel1.AnimationManager.Current.Skeleton.Loop := LTr.Loop;
end;
end;
You take over Loop handling and the one-shot return that the controller would do for
you - see the controller guide for what that involves.
Controlling a Running Blend
if GorillaModel1.AnimationManager.BlendActive then
GorillaModel1.AnimationManager.CancelBlend(); // hard cut, joints keep current values
Blends cascade: switching again while a fade is running captures the blended pose as the new starting point, so rapid switches stay smooth.
Root Motion and In-Place Playback
A clip whose animator moved the character forward - a walk or a run that travels - carries that travel in its keys. As soon as the application moves the object too, the character is moved twice: once by its own transform, once by the animation. The two movers cannot be cancelled against each other reliably, because the correction is written when the scene is updated while the drawn frame is picked later, during rendering, from a clock that advances on its own. Whenever the clip wraps between those two moments, a correction for the end of the travel meets frame zero, and the body is drawn the whole travel distance away for a single frame.
InPlace removes the second mover instead of fighting it.
Taking the Travel Out
var LAnim : TGorillaAnimation;
LAnim := GorillaModel1.AnimationManager.GetAnimation('c-run.dae');
LAnim.InPlace := True; // horizontal travel removed
GorillaModel1.AnimationManager.PlayAnimation(LAnim);
What this does and does not touch:
- Only the horizontal components (X and Z) are flattened. The vertical one is kept - the rise and fall of the body is part of the animation and does not carry the character anywhere.
- It acts on the animation definition (
TAnimationDef.InPlace), so it applies to every model instance that shares that definition - which is what you want, because the cached frames are shared too. Duplicated characters do not each need their own call. InPlace := Falseputs the original track back; the clip travels again.- Set it before the clip is played for the first time, and read In-Place Discards the Cached Frames before using it on a model that was loaded with caching flags.
Reading the Motion Back
The travel is not thrown away, it is only taken out of the skeleton - so the application can apply it to the object's own transform and stay in control of collision, steering and speed:
// does this clip travel at all? valid before InPlace is set as well
if LAnim.HasRootMotion then
begin
LTotal := LAnim.RootMotionTotal(); // first key to last key, model units
LPeak := LAnim.RootMotionPeak(); // largest distance reached anywhere
LNow := LAnim.RootMotionAt(LAnim.Skeleton.NormalizedTime); // at 0..1 of the clip
end;
RootMotionAt returns a TPointF - X is the world X component, Y is the world Z one -
relative to the first frame of the clip and in model units, so a scaled model needs the
value scaled as well. A typical locomotion step looks like this: remember the value of the
previous tick, move the character by the difference, remember the new value.
In-Place Discards the Cached Frames
This is the part that costs people an afternoon.
A clip that was loaded with caching flags is not drawn from its joints. The engine bakes a
vertex buffer per frame, and from then on TGorillaMesh.Render asks
TGorillaAnimation.GetCurrentCachedFrame for the buffer to draw -
TSkeletonKeyAnimation.ProcessAnimation even skips the joint pass entirely while frames
are baked.
Those baked frames still contain the travel. Setting InPlace therefore throws them
away and resets the buffering state to None, and nothing rebuilds them afterwards:
baking happens in TModelDef.CacheAnimations, which the loaders call while a model is
read - playback never does. GetCurrentCachedFrame then answers nil, the renderer falls
back to the mesh's static buffer, and the character stands in its bind pose while the
animation happily reports IsRunning = True.
Since v1.5 there is a SetInPlace overload that closes the gap:
// model was loaded WITH caching flags:
LAnim.SetInPlace(True, True); // set the flag AND bake the clip again
procedure TGorillaAnimation.SetInPlace(const AValue : Boolean;
const ARebuildCache : Boolean); overload;
procedure TAnimationDef.SetInPlace(const AValue : Boolean;
const ARebuildCache : Boolean; const AModel : TComponent = nil); overload;
Rebuilding is opt-in and deliberately not the default: it costs exactly what the initial
caching cost, which for a character with twenty clips is seconds, and only the caller knows
whether this clip is worth it at this moment. Assigning the InPlace property keeps the
old behaviour - drop the frames, leave them dropped.
Notes on the rebuild:
- It bakes with the flags the clip was cached with (
TAnimationDef.CachingFlags). A clip that was never cached has nothing to rebuild, and the call does nothing extra - which is exactly right, because an uncached clip is skinned live and shows the change immediately. - Baking plays the clip once to sample its frames and stops it afterwards. The
TGorillaAnimationoverload restarts it through the manager when it was running. - On
TAnimationDefthe model parameter is optional; without it a temporary model instance is built from the definition. The frames are stored per mesh definition either way, so they arrive at every instance. TheTGorillaAnimationoverload passes its own model and saves that throwaway instance.
Which leaves three ways to use InPlace, all of them valid:
| Setup | What to call | Result |
|---|---|---|
| Loaded without caching flags | InPlace := True |
Skinned live, takes effect at once |
| Loaded with caching flags, clip worth baking | SetInPlace(True, True) |
Baked again, in place |
| Loaded with caching flags, before the first bake | InPlace := True, then TModelDef.CacheAnimations |
Baked once, in place |
Which Joint Carries the Motion
The root joint is detected, not named: it is the animated joint whose horizontal
translation actually varies. Child joints translate by their constant bone offset, so
their range is zero, which identifies the root on any rig without relying on it being
called Hips or root. A clip that already animates in place has no joint with a range at
all and correctly reports HasRootMotion = False.
For a rig where that heuristic picks the wrong joint, name it explicitly on the definition
before touching InPlace:
TAnimationDef(LAnim.Def).RootMotionJoint := 'Hips';
LAnim.InPlace := True;
Morphing
Two different things are often called morphing, and only one of them exists here.
Vertex animation (TCoordinateKeyAnimation) - supported. An animation can carry
keys that hold complete vertex arrays; playback interpolates them per vertex:
Result[i] := Start[i] + (Stop[i] - Start[i]) * T;
That is a real shape morph, and everything above applies to it: you can seek to an arbitrary position between two shape keys and get an interpolated mesh. The keys must belong to one animation on one mesh, so the vertex count and order have to match - authored in the DCC tool and exported as a mesh/vertex animation.
Runtime morph targets / blend shapes with weights, or morphing between two separate models - not supported. There is no API to mix several shape targets by weight, and the crossfade described above blends joint values of one skeleton, not geometry. A caterpillar turning into a butterfly therefore has to be one mesh with one vertex animation, not two models blended at runtime.
Recipe: Rendering a Sprite Sheet
Rendering a clip into 2D frames needs exactly the two things above: a deterministic
position and a way to grab the result. TGorillaViewport.MakeScreenshot returns a
TBitmap of the rendered viewport.
procedure TForm1.RenderClip(const AAnimId : String; const AFrames : Integer;
const ADir : String);
var
LAnim : TGorillaAnimation;
LSkel : TSkeletonKeyAnimation;
LBmp : FMX.Graphics.TBitmap;
i : Integer;
LPos : Single;
begin
LAnim := GorillaModel1.AnimationManager.GetAnimation(AAnimId);
if not Assigned(LAnim) then
Exit;
LSkel := LAnim.Skeleton;
GorillaModel1.AnimationManager.BlendEnabled := False; // no fade into the first pose
LAnim.Start();
LSkel.Loop := False;
for i := 0 to AFrames - 1 do
begin
// sample positions evenly, never exactly at 1.0
LPos := i / AFrames;
LSkel.SeekTo(LPos * LSkel.Duration);
LSkel.ProcessTick(0, 0); // write the pose at that exact position
GorillaViewport1.RenderManual(); // render this pose synchronously
LBmp := GorillaViewport1.MakeScreenshot();
try
LBmp.SaveToFile(Format('%s\%s_%.3d.png', [ADir, AAnimId, i]));
finally
FreeAndNil(LBmp);
end;
end;
LAnim.Stop();
end;
RenderManual() draws the scene synchronously into the viewport's render target, which
is what MakeScreenshot() then copies - so the bitmap always shows the pose you just
seeked to, without waiting for the next paint cycle. The returned bitmap belongs to the
caller.
Notes for this use case:
- Load the clips without caching flags, otherwise the drawn mesh snaps to the baked grid (see Caching Quantizes the Result).
AFramesis yours to choose - it is independent of the source clip's frame count, because every position is interpolated. Sampling 12 sprites out of a 29-frame walk is justi / 12.- Switch the crossfade off while recording; it would bleed the previous clip's pose into the first sprites.
- Use an orthographic camera and a fixed viewport size for consistent sprite bounds, and render each facing direction by rotating the model, not the camera, if you want the light to stay put.
Limitations
SetSpeedscales interpolator durations only, relatively and cumulatively, and> 1means slower. Prefer settingSkeleton.Durationand the interpolator durations from stored base values.Skeleton.ProcessTickneeds a running, unpaused animation.ProcessAnimationRemoteworks on a stopped one but advances relatively.- Crossfading happens in
PlayAnimationonly, not when assigningAnimationManager.Current- and therefore not for switches made byTGorillaAnimationController. tmBlendin the animation controller is a placeholder and currently behaves liketmSequentially.- No weighted morph targets, no runtime morphing between two different models, and no layered blending of two clips onto one skeleton at the same time (the crossfade is a fade from a captured pose, not a permanent two-clip mix).
InPlaceremoves horizontal root motion only, and it acts on the definition - it cannot be set per instance of a shared model. On a cached clip the rebuild (SetInPlace(True, True)) re-bakes the whole clip; there is no partial update of the baked frames.
See Also
- Gorilla.Animation Unit - Full API of the animation system
- Animation Controller - Transition-driven clip switching
- Models - Loading models and additional animation clips
- Viewport - Rendering, invalidation and screenshots