Class DefaultFaceMapper
The default Face
Inherited Members
Namespace: Unity.LiveCapture .ARKitFaceCapture .DefaultMapper
Assembly: Unity.LiveCapture.ARKitFaceCapture.dll
Syntax
[CreateAssetMenu(fileName = "NewFaceMapper", menuName = "Live Capture/ARKit Face Capture/Mapper")]
[HelpURL("https://docs.unity3d.com/Packages/com.unity.live-capture@4.0/manual/ref-component-arkit-default-face-mapper.html")]
public class DefaultFaceMapper : FaceMapper
Remarks
The inspector is used to assign a prefab containing a face rig and configure the mapping for the rig.
On assignment, all relevant skinned mesh renderers in the rig are detected and a best guess for the mapping
is automatically generated. The mapping may be shared by different rigs, as long as the transform paths of
all skinned meshes relative to the Face
Methods
ApplyBlendShapesToRig(FaceActor, FaceMapperCache, ref FaceBlendShapePose, bool)
Called by Face
Declaration
public override 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. |
Overrides
ApplyEyeRotationToRig(FaceActor, FaceMapperCache, ref FaceBlendShapePose, ref Quaternion, ref Quaternion, bool)
Called by Face
Declaration
public override 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. |
Overrides
ApplyHeadPositionToRig(FaceActor, FaceMapperCache, ref Vector3, bool)
Called by Face
Declaration
public override 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. |
Overrides
ApplyHeadRotationToRig(FaceActor, FaceMapperCache, ref Quaternion, bool)
Called by Face
Declaration
public override 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. |
Overrides
CreateCache(FaceActor)
Creates a mapper state cache for the specified actor.
Declaration
public override 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. |
Overrides
OnValidate()
Editor-only function that Unity calls when the script is loaded or a value changes in the Inspector.
Declaration
protected virtual void OnValidate()
RegisterPreviewableProperties(FaceActor, FaceMapperCache, IPropertyPreviewer)
The preview system calls this method before playing animations.
Use the specified IProperty
Declaration
public override 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 |