Pick Many Objects Spark AR Studio

Pick Multiple Objects: Spark AR Tutorial

How to pick multiple objects in Spark AR Studio.

Say we have more than 5 objects that we need to keep track of. They have their own properties—like size, position, scale and material—that get updated when certain events happen—like an object tap. Keeping track of which object is selected or “active” and which is not can become complex in the Patch Editor.


5 or fewer Option Switch

For 5 or fewer options or objects, the Option Switch and Option Picker sent to Equals Exactly patches works well.

Option Switch Option Picker Equals Exactly Patch
Option Switch Option Picker Equals Exactly Patch

In order to expand these options while isolating the active option, we have to test to make sure every other option is not active.

As the number of options increases, so does the complexity in determining which option is active and which is not.

5 or more And Multiplexer

The And Multiplexer is a patch that takes many inputs and produces single output; a boolean signal that lets us know which object is selected.

5 or more options with the And Multiplexer
5 or more options with the And Multiplexer

Inputs & Output

This method of object selection uses an “And” tree to test against other possible options.

And Multiplexer Expanded; the And tree test.
And Multiplexer Expanded: the And tree test.

Master On

A pulse sent to the “Master On” input will make the boolean signal true. This is the object we are testing for. If a pulse is received at this input, it will output a true signal; letting us know that this object or option is selected.

Turn Off

A pulse sent to any of “Turn Off” inputs will make the boolean signal false.

Patch Diagram

For each object or option you want to select, add the And Multiplexer patch to test for that object and test against all other options and objects.

 Patch Editor diagram of And Multiplexer use case
Patch Editor diagram picking many objects And Multiplexer use case
And Multiplexer YouTube Tutorial
Please follow and like us:

3 thoughts on “Pick Multiple Objects: Spark AR Tutorial”

Leave a Comment