BlendToAnimFromPose

From GECK
Jump to: navigation, search


A function added by the kNVSE Plugin.

Description

Performs a blend transition from the current scene graph state of the character to the specified frame in the destination sequence. Optional fDestFrame argument allows specifying the offset of the animation in which it should start.

Syntax

[help]
reference.BlendToAnimFromPose sequence path:string
  bFirstPerson:0/1
  fDuration:float
  fDestFrame:float
  iPriority:integer
  time sync sequence path:string

Example

BlendToAnimFromPose "Characters\Animation.kf" 1 0.5

Blend Transitions

A blend transition moves between static frames in two sequences and is activated with the BlendToAnim function. The source sequence is eased out while the destination sequence is eased in over the duration of the blend, with each sequence being locked to a particular frame. Blend transitions are good for smoothly transitioning between two sequences with very different styles of movement (e.g. between an idle animation and a walk animation). Note that when accumulating transformations for the character, using a blend transition will cause all forward movement to stop for the duration of the blend, since only a static frame in each sequence is used.

An alternate type of blend is one that blends from the current scene graph pose of the character to a specified frame in some destination sequence. This type of blend is activated with the BlendToAnimFromPose function. This can be useful when the character is in a random position (e.g. after a physics simulation) and a smooth transition is needed back to a sequence. Note, however, that a temporary sequence is created for BlendFromPose that contains current scene graph data for the character, such as bone transforms, so there is some processing and memory overhead associated with this type of blend. Whenever possible, it is recommended that BlendToAnim be used instead. BlendToAnimFromPose should only be used if the character is not currently in a position corresponding to a frame in another sequence.

See Also