Skip to content

avatarsdk/metaperson-quest-movement-sdk-sample

Repository files navigation

MetaPerson - Body Tracking integration using Movement SDK

The sample demonstrates how to integrate Body Tracking using Movement SDK for MetaPerson avatars.

Requirements

Getting Started

  1. Clone this repository to your computer
  2. Open the project in Unity 2022.3.17f1 or newer.
  3. Set Hand Tracking Support to Controllers And Hands and Body Tracking Support to Required for OculusProjectConfig (Assets -> Oculus). Project Config
  4. Build and run any of the sample scenes:
  • Assets/AvatarSDK/MetaPerson/QuestHandTrackingSample/Scenes/MetaPersonQuestHandTrackingSample.unity
  • Assets/AvatarSDK/MetaPerson/QuestHandTrackingSample/Scenes/MetaPersonQuestHipPinningSample.unity

How To Configure MetaPerson Model For Body Tracking

Configure In Editor

  1. Add a MetaPerson avatar from the MetaPerson Creator into a unity scene.
  2. Right click on the model in the Hierarchy window and choose Movement -> Setup Character for Body Tracking -> Format: MetaPerson Male. Choose Format: MetaPerson Female if you are using the MetaPerson Female model. Configure MetaPerson Model
  3. It will add the OVRToMetaPersonSkeletonSync component to the model and do initial setup.

Configure Runtime Loaded Avatars

If you load avatars at runtime, use the MetaPersonBodyTrackingSetupHelper for configuration.

MetaPersonBodyTrackingSetupHelper.SetupMetaPersonForBodyTracking(metaPersonMaleAvatar, MetaPersonSkeletonType.Male);

OVRToMetaPersonSkeletonSync

This component applies Body Tracking data to a MetaPerson avatar. OVRToMetaPersonSkeletonSync

Key properties:

  • Twist 1 Coeff and Twist 2 Coeff impact on skin twist in a region between the forearm and the hand.
  • Move Hips specifies if the position of the Hips node is updated. If it is disabled, only rotation is applied to the Hips node.
  • Skeleton Mapping specifies the mapping between OVR and MetaPerson skeletons.
  • Arms Stretchable specifies if the arms length can be increased to align model's hands with OVR hands.
  • Feet Position In World Space specifies if the feet positions in world space. Workaround for oculus-samples/Unity-Movement#58.
  • Sync Bones With Other Model if true, some bones positions are taken from the Source Bones. Otherwise, they are provided by the OVRBody.
  • Source Bones Model contains a game object with the OVR Skeleton structure from which bones to sync are taken.
  • Source Bones is a list of transforms to which bones positions/rotations are synchronized with.

Samples

Sample scenes can be found in the Assets/AvatarSDK/MetaPerson/QuestHandTrackingSample/Scenes directory.

  1. MetaPersonQuestHandTrackingSample - the basic sample that demonstrates how to configure MetaPerson avatars for body tracking.
  2. MetaPersonQuestHipPinningSample - this sample shows how to sync MetaPerson model's bones with another model. In this case OVR rig uses HipPinning and Grounding constraints and the MetaPerson models are synchonized with this rig.
  3. MetaPersonQuestModelChangingSample - this sample is based on the MetaPersonQuestHipPinningSample and demonstrates how to load MetaPerson avatars at runtime and replace the existed model on the scene.

Support

If you have any questions or issues with the sample, please contact us support@avatarsdk.com.

About

MetaPerson - sample for Oculus Movement SDK

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages