Class

ARSCNFaceGeometry

A SceneKit representation of face topology for use with face information provided by an AR session.

Overview

This class is a subclass of SCNGeometry that wraps the mesh data provided by the ARFaceGeometry class. You can use ARSCNFaceGeometry to quickly and easily visualize face topology and facial expressions provided by ARKit in a SceneKit view.

Face mesh topology is constant for the lifetime of an ARSCNFaceGeometry object. That is, the geometry's single SCNGeometryElement object always describes the same arrangement of vertices, and the texcoord geometry source always maps the same vertices to the same texture coordinates.

When you modify the geometry with the update(from:) method, only the contents of the vertex geometry source change, indicating the difference in vertex positions as ARKit adapts the mesh to the shape and expression of the user's face.

Topics

Creating a Geometry

init?(device: MTLDevice)

Creates a SceneKit face geometry for rendering with the specified Metal device object.

init?(device: MTLDevice, fillMesh: Bool)

Creates a SceneKit face geometry, optionally filling in gaps in the mesh for the eyes and mouth.

Updating the Geometry

func update(from: ARFaceGeometry)

Deforms the SceneKit geometry to match the specified face mesh.

Relationships

Inherits From

Conforms To

See Also

Using Face Geometry

var geometry: ARFaceGeometry

A coarse triangle mesh representing the topology of the detected face.

class ARFaceGeometry

A 3D mesh describing face topology used in face-tracking AR sessions.