Patches

Patches are building blocks. Each one has a specific function and can pass and receive information to and from other patches.

There are 3 kinds of patches in AR Studio - producers, consumers and intermediaries. This example has one of each:

Producers

In the example, the face tracker is a producer patch. Producers represent a scene object that produces values, like this face tracker. They're always purple.

Face Tracker Patch

From v34, the face tracker patch will insert as a group of three patches: Face Finder, Face Select and facetracker0. Face Finder tracks every face that is currently in the camera frame. Face Select allows you to select a specific face using the Index number and the new facetracker0 patch functions as a face follower.

This updated face tracker patch allows you to create more configurable effects, such as using a touch gesture to swap face meshes between 2 or more faces. You can also create effects that use a face's position in the camera frame to determine how the effect looks.

Consumers

In the example, plane0 is a consumer. This is a plane visibility patch. It will drive the visibility of that plane, so you can use it to determine when the patch should be shown in the scene and when it should be hidden. Consumer patches are always blue

Intermediaries

The intermediary in this example is the Mouth Open patch. It takes the information from the producer patch, in this case the face tracker. It manipulates the information and sends the results to the consumer patch - plane0. Patches like this are always gray.

Intermediary patches

Name Description

Screen Tap

Capture a tap anywhere on the screen.

Object Tap

Capture a tap on an object in the scene.

Head Rotation

Capture head rotation, using data from a face tracker in the scene.

Head Nod

Capture a head nod, using data from a face tracker in the scene.

Head Shake

Capture a head shake, using data from a face tracker in the scene.

Mouth Open

Capture an opened mouth, using data from a face tracker in the scene.

Blink

Capture blinked eyes, using data from a face tracker in the scene.

Eyebrows Raised

Capture raised eyebrows, using data from a face tracker in the scene.

Eyebrows Lowered

Capture lowered eyebrows, using data from a face tracker in the scene.

Left Eye Closed

Determine when the left eye is closed, using data from a face tracker in the scene.

Right Eye Closed

Determine when the right eye is closed, using data from a face tracker in the scene.

Smile

Detect a smile, using data from a face tracker in the scene.

Animation

Animate an element in your scene.

Loop Animation

Animate an element in your scene repeatedly.

Transition

Convert a progress value to a value between a new range defined by the start and end values.

Keyframe Transition

Convert a progress value to a value between a new range defined by the start and end values. Progress output is used to chain multiple transitions.

Value Progress

Map scalar values to progress values.

Not

Flip a boolean from true to false, or from false to true.

And

Check if 2 booleans are true together.

Or

Check if either one of 2 booleans are true.

Equals

Check if 2 numbers are equal.

Greater Than or Equal To

Check if one input value is greater than or equal to another.

Greater Than

Check if one value is greater than another.

Less Than or Equal To

Check if one value is less than or equal to another.

Less Than

Check if one value is less than another.

Add

Add 2 values together.

Subtract

Subtract one value from another value.

Multiply

Multiply 2 values.

Divide

Divide one value by another value.

Modulo

Calculate the remainder when 2 values are divided.

Arctangent

Calculate the angle of a triangle given its X and Y dimensions.

Point Pack

Create a point with 3 dimensions (X, Y and Z).

Point Unpack

Turn a point into its individual X, Y and Z values.

Pulse

Trigger a pulse whenever a state changes from on to off or vice versa.

Option Switch

Control up to 5 states using an index (0, 1, 2...). This is useful for tracking a state that is one of many options. By default, the output is 0.

Counter

Create a counter that starts at 0, where the value can be increased or decreased gradually, or set to a specific number.