Spark AR #06: Scripting-Nutcracker Facetracker

194 views

0   0

Spark AR #06: Scripting-Nutcracker Facetracker

Hi everyone, today I am going to show you how to apply the value of the face movement to a plane by this Nutcracker demo. Let's start!

1) Separate the nutcracker into 2 layers - mouth & body (textures)
2) Create a Facetracker
3) Create 2 planes and be the children of the Facetracker
4) Apply the textures to Materials
5) Apply mouth material to plane0 and body material to plane1
6) Create a script
7) Inside script:
*1.Load Animation, FaceTracking, Scene.
*2.Create a variable of a plane
*3.Create a reference of mouth openness
*4.Clamp the value of driver of mouth openness
*5.Create a sampler
*6.Combing the driver and sampler
*7.Bind the scale animation to the y-axis of the plane

^Reference: https://sparkar.facebook.com/ar-studio/learn/documentation/reference/classes/animationmodule

^Nutcracker: https://www.shutterstock.com/image-vector/holiday-character-nutcracker-standing-his-mouth-1527809912?src=library

^Original Spark AR Demo Files: https://drive.google.com/drive/folders/1td_D1C4AgmAACFB63hDp6bBmlDTc231O?usp=sharing

^YouTube Video of this demo: https://youtu.be/_aZNnWxYxS0

Want to have a 30 minutes XR consultation? Please email me: domwu@hummingbirdsday.com

#AR #sparkAR #Script #javascript #Facetracker #nutcracker
View More
Comments

0 Comments