Animation Patches - Examples

These are some examples of how patches can be used to add animations to your effects.

For very simple animated effects, use the animation playback controller.

Switching Between 2 Animations

We've created 2 animation playback controllers, and applied a different animation to each one. We created a patch for each controller by dragging them from the Assets panel into the Patch Editor.

Connecting each playback controller to the If Then Else, Switch and Screen Tap patches causes the effect to switch between animations each time the screen is tapped.

If Then Else can accept different data types - we set it to Animation Data:

If Then Else is connected to a patch representing the Animation property of our 3D object.

Switching Between More Than 2 Animations

We're using the Counter patch to count how many times the screen is tapped, connected to the Option Picker, to play a different animation each time this happens.

Because we want to count through 3 animations, we added 3 as the Maximum Count in the Counter patch.

Using the Animation Player Patch to Control Progress

You can't use the animation playback controller to control progress. Combine an asset patch for the animation - in this example, walk - the Animation Player patch and a patch representing the Animation property of the 3D object instead.

To make the animation progresses as the face moves, we used:

  1. Unpack to unpack the 3D position of the face - detected by the face tracker - into its X, Y and Z values.
  2. Progress and Animation Player connect the progress of the animation to the movement of the face.
  3. Pack and a patch representing the 3D Position of a null object to set the object's position along the X axis. We used a null object, with our animation as a child of this object, because we can't create patches for both the position and animation properties of a 3D object.