Articles
Fundamentals
Actions

Actions in Meta Spark Studio

Actions are quick shortcuts designed to speed up your workflow and make creating AR effects easier.

Each action takes a common process and adds it to your project with just one or two clicks, by creating simple patch graphs or adding several objects to the Scene panel at the same time.

For example, you can use actions to place an object or texture on a specific part of the face, or to animate it in different ways.

Meta Spark Studio currently has actions for scene objects, textures and audio files.

Using actions

To add an action:

  1. Select the object you want to create the action for in the Scene panel.
  2. Go to the Inspector.
  3. Click the Actions button at the top of the panel.

Inspector with Actions button highlighted

Choose the action you want to add from the menu:

Selecting between Animate, Position on Face or Place in World Space

Actions for textures only


You can use the Use As A Mask action to quickly create a face mask using a texture.

A face tracker, face mesh and material will be added to your project. The texture will be applied to the new material. A series of patches will soften the outline of the mask.

Actions for scene objects only

You can use the Add Simple Shadow action to add a shadow to a 3D object.

Actions for both textures and scene objects

Select the object in the Scene panel to add actions through the Inspector.

Actions are available for:

  • 3D objects.
  • Planes.
  • Vector objects.
  • Spot lights, ambient and directional lights.
  • Rectangles.
  • 2D and 3D text.
  • Null objects.
  • Particle systems.

Animate

This action uses animation patches to move an object in different ways.

Choose from

  • Blink — to make the object appear and disappear by animating the Visibility property.
  • Float — to move the object up and down by animating the Position property.
  • Pulse — to make the object bigger then smaller by animating the Scale property.
  • Spin — to make the object spin by animating the Rotation property.

Below we’ve selected spin:

Selecting Spin action makes heart rotate

Selecting the Spin action adds the following patches to the Patch Editor:

Patch graph showing series of patches that make the heart object spin

Edit the patches to customize the animation. Change the:

  • Start and End values in the Transition patch to set where the object moves between, or the Curve value to set the pacing of the movement.
  • Duration value in the Loop Animation patch to speed up or slow down the movement. You can also mirror the movement by checking the box next to Mirrored.

Position on face

This action will add a face tracker and face landmark patches to your project to position the object on the face. Choose from a selection of facial positions, for example the chin or nose.

Below we've selected Nose.

Selecting action that places ball on nose

Selecting this action adds a face tracker to the Scene panel, with the object under it. A series of patches is also added to the Patch Editor, positioning the object on the nose:

Patch graph that places clown nose object on nose

Place an object in the world

Adding this action makes an object visible through the back camera when a flat surface is detected.

Selecting Place in World Space action makes heart visible in back camera

This is because it's now a child of the plane tracker in the Scene panel.

Audio actions available

Select an audio clip in the Assets panel to add actions in the Inspector.

Play on effect start

A speaker and audio playback controller will be added, rendering the audio file in the effect. The audio playback controller will be set to play the audio file once when the effect opens.

Play continuously in the scene

A speaker and audio playback controller will be added, rendering the audio file in the effect. The audio playback controller will be set to play the audio file again and again on a loop from when the effect opens.