Class FaceMapper
An asset used to apply a face pose to a character rig.
Inherited Members
Namespace: Unity.LiveCapture .ARKitFaceCapture
Assembly: Unity.LiveCapture.ARKitFaceCapture.dll
Syntax
public abstract class FaceMapper : ScriptableObject
Remarks
To use a mapper, it must be assigned to a Face
Methods
ApplyBlendShapesToRig(FaceActor, FaceMapperCache, ref FaceBlendShapePose, bool)
Called by Face
Declaration
public abstract void ApplyBlendShapesToRig(FaceActor actor, FaceMapperCache cache, ref FaceBlendShapePose pose, bool continuous)
Parameters
Type | Name | Description |
---|---|---|
Face |
actor | The face rig the pose is applied to. |
Face |
cache | The mapper state cache for the specified actor. |
Face |
pose | The face pose to map from. |
bool | continuous | When true, the new pose follows the current pose and they can be smoothed between, while false corresponds to a seek in the animation where the previous pose is invalidated and should not influence the new pose. |
ApplyEyeRotationToRig(FaceActor, FaceMapperCache, ref FaceBlendShapePose, ref Quaternion, ref Quaternion, bool)
Called by Face
Declaration
public abstract void ApplyEyeRotationToRig(FaceActor actor, FaceMapperCache cache, ref FaceBlendShapePose pose, ref Quaternion leftEyeRotation, ref Quaternion rightEyeRotation, bool continuous)
Parameters
Type | Name | Description |
---|---|---|
Face |
actor | The face rig the pose is applied to. |
Face |
cache | The mapper state cache for the specified actor. |
Face |
pose | The face blend shapes to map from. |
Quaternion | leftEyeRotation | The left eye rotation to map from. |
Quaternion | rightEyeRotation | The right eye rotation to map from. |
bool | continuous | When true, the new pose follows the current pose and they can be smoothed between, while false corresponds to a seek in the animation where the previous pose is invalidated and should not influence the new pose. |
ApplyHeadPositionToRig(FaceActor, FaceMapperCache, ref Vector3, bool)
Called by Face
Declaration
public abstract void ApplyHeadPositionToRig(FaceActor actor, FaceMapperCache cache, ref Vector3 headPosition, bool continuous)
Parameters
Type | Name | Description |
---|---|---|
Face |
actor | The face rig the pose is applied to. |
Face |
cache | The mapper state cache for the specified actor. |
Vector3 | headPosition | The head position to map from. |
bool | continuous | When true, the new pose follows the current pose and they can be smoothed between, while false corresponds to a seek in the animation where the previous pose is invalidated and should not influence the new pose. |
ApplyHeadRotationToRig(FaceActor, FaceMapperCache, ref Quaternion, bool)
Called by Face
Declaration
public abstract void ApplyHeadRotationToRig(FaceActor actor, FaceMapperCache cache, ref Quaternion headOrientation, bool continuous)
Parameters
Type | Name | Description |
---|---|---|
Face |
actor | The face rig the pose is applied to. |
Face |
cache | The mapper state cache for the specified actor. |
Quaternion | headOrientation | The head pose to map from. |
bool | continuous | When true, the new pose follows the current pose and they can be smoothed between, while false corresponds to a seek in the animation where the previous pose is invalidated and should not influence the new pose. |
CreateCache(FaceActor)
Creates a mapper state cache for the specified actor.
Declaration
public virtual FaceMapperCache CreateCache(FaceActor actor)
Parameters
Type | Name | Description |
---|---|---|
Face |
actor | The face rig to create the cache for. |
Returns
Type | Description |
---|---|
Face |
The new cache instance, or null if no cache is needed by the mapper. |
RegisterPreviewableProperties(FaceActor, FaceMapperCache, IPropertyPreviewer)
The preview system calls this method before playing animations.
Use the specified IProperty
Declaration
public virtual void RegisterPreviewableProperties(FaceActor actor, FaceMapperCache cache, IPropertyPreviewer previewer)
Parameters
Type | Name | Description |
---|---|---|
Face |
actor | The face rig the pose is applied to. |
Face |
cache | The mapper state cache for the specified actor. |
IProperty |
previewer | The IProperty |