In this post, we'll show you how to make face deformation in our DeepAR Studio.
We'll guide you through the process of making a deformation in Blender, importing and setting everything up in DeepAR Studio.
First of all, you'll need to download the example folder that contains the original face mesh, which is necessary to go through this example.
Click the download button below to download this example with all assets.
1. Importing FBX in Blender
The first step in creating a face deformation mask is opening orginal_face.fbx in Blender.
Open the Blender
Go to File → Import → FBX and choose original_face.fbx under face_deformation_example folder
The imported .fbx is very small, so don't worry if you don't see it right away, just zoom in and the face will eventually appear.
2. Blender Shape Keys
Now, the next thing you need to do is add the Shape Keys.
Select the face and go to the Object Data section.
Under the Shape Keys press + button to add Basis shape key.
Press the + button again to add a new shape key that will be the key to our face deformation.
Rename the new shape key from Key 1 to whatever you want. In this case, we will rename it to Big_nose, because we will change the size of the nose.
3. Blender Edit mode
Select the new shape key (we named it Big_nose) and go to Edit mode.
Now we'll make the nose deformation.
Return to the Object mode and you will see that everything looks the same. Don't worry, just select the shape key Big_nose and set its value to 1.000 to see the results.
After you are happy with what you made, go to the File and click export fbx.
4. DeepAR studio setup
Open the DeepAR studio and import the .fbx file you made in Blender:
File → Import Legacy FBX
Now we need to set up the material:
In node hierarchy under the RootNode select the Mesh quad
Go to the Material properties
For Select shader choose the Unlit texture
For Diffuse texture select the Camera texture
Under Blend shapes choose Big_nose and set the weight to 100.
You can change the size of the nose by changing the weight. You can leave it normal, make it bigger or smaller, whatever you please.
And there it is, a big deformed nose that you can export and used it in your app.