Simple face makeup demo with Unity, AR Foundation, and echo3D
Don't have an API key? Make sure to register for FREE at echo3D.
- Create a new Unity project.
- Clone the Unity-ARFoundation-echo3D-example sample code.
- Open the sample scene under
AR Foundation\Scenes\FaceTracking\FaceMesh.unity
. - Set your API key in
echo3D.cs
inside theecho3D\echo3D.prefab
using the the inspector. - Select
AR Session Origin
in the hierarchy. Double clickFaceMeshPrefab
underAR Face Manager
in the inspector. SetMaterial Size
to 1 - Add an image hologram by uploading the makeup.png file from the images folder to the echo3D console.
- Overwrite the existing echo3D/CustomBehaviour.cs script with the new CustomBehaviour.cs file.
Make sure to use an Alpha transparent texture as a custom shader. The example texture contains eye shadows, eye liners, highlight, lipstick or other coloring. When running the app, it detects a face and overlays the face material.
To create a makeup texture on your own, open the .psd file in the model folder. This model is provided by Google ARCore Augmented Faces Demo
Refer to our documentation to learn more about how to use Unity and echo3D.
Feel free to reach out at support@echo3D.co or join our support channel on Slack.