spite/FaceMeshFaceGeometry
FaceMeshFaceGeometry for FaceMesh
What it solves
This project provides a ready-to-use 3D mesh for the face that aligns perfectly with live video. It bridges the gap between raw face-tracking data (like MediaPipe) and 3D rendering engines, allowing developers to easily attach 3D objects to a face, apply textures, or track expressions without manually calculating complex geometry.
How it works
It acts as a helper for the Three.js library. You feed it the 468 landmarks generated by a face-tracking model, and it outputs a BufferGeometry object. It handles the heavy lifting of mapping texture coordinates, calculating normals, and managing head pose data. It offers a "metric mode" for real-world measurements in centimeters and includes a built-in filter to smooth out jittery tracking data for a stable visual experience.
Who it’s for
This is for web developers and creative coders working with Three.js who want to build augmented reality face filters, virtual masks, or interactive experiences that respond to facial movements and expressions.
Highlights
- Easy Integration: Works directly with MediaPipe Face Landmarker and Three.js.
- Flexible Mapping: Supports fixed UV layouts for static masks or dynamic video textures that follow the user's face in real-time.
- Expression Tracking: Provides access to 52 blendshape scores (like mouth opening or eye blinking) and iris positioning.
- Built-in Smoothing: Includes a "One Euro" filter to remove tracking jitter without introducing significant lag.
- Head Pose Data: Calculates the 3D orientation of the head, making it simple to attach 3D objects like glasses or hats that move naturally with the user.
Related
- Project
- Dispatch
- Project
- Project
- Project