Trigger background segmentation and head bindings to change on smile
I'm working on a SnapLens ad that I need help solving two key problems:
Problem 1: The Lens needs to open with a background segmentation of a wasteland that swaps to a beautiful beach scene when the user smiles.
Problem 2: Again when the user smiles the face mask needs to swap to a pair of sunglasses.
Using the LensStudio supplied Segmentation template it was very simple to create each of the background segmentations I need along with the head bindings, however due to my lack of coding/scripting ability I am lost when it comes to trying to switch between the all the elements (see screenshots below).
Is this even possible? Any advice would be greatly appreciated.
To confirm, currently all the Lens assets are setup as static images. however I can convert them to video or sprite animations if this means I can trigger them.
Thanks in advance for any help,
Ned


You can use the Behavior script provided by Lens Studio. Just add it to an empty scene object and select "Face Event" for trigger, "Smile Started" for Event Type and "Set Texture" for Response Type to change the texture.
woow😍😍