MediaPipe in TouchDesigner: face tracking tutorial

Learn to use MediaPipe facial signals in TouchDesigner to switch overlays, control pixelation and monochrome effects, and save photos when you smile.

Player not loading? Watch on YouTube

Crystal demonstrates how to use MediaPipe face tracking in TouchDesigner to control visual effects with facial expressions. The example places butterflies around a face, switches to a banana above the head when the mouth opens, applies pixelation and monochrome effects when the lips pucker, and saves a photo when the user smiles.

The tutorial uses Torin Blankensmith's MediaPipe integration for TouchDesigner, with its components already available in the palette. It does not cover downloading or installing them. Crystal selects the jaw-open, mouth-pucker and left-smile channels, then processes each separately. For the overlays, she reuses geometry inside the face detector component, copies rectangles onto six circle points and assigns image textures. Separate switches control the geometry and the butterfly or banana image.

Logic CHOPs turn expression values into triggers. The jaw switch uses a 0.8 threshold. For the pucker effect, Crystal maps pixel size to a range of 1 to 25 and monochrome strength to 0 to 0.55, then adds filters to smooth the changes. She lowers the pucker threshold to 0.7 during adjustment.

The photo setup uses a 0.9 smile threshold, a Count CHOP and a Movie File Out operator. The counter becomes part of the filename so successive captures do not overwrite one another; PNG and TIFF are the image format options discussed.