Skip to content

readyplayerme/rpm-unity-meta-movement-support

Repository files navigation

Ready Player Me Meta Movement Support

This package adds support for Meta Movement tracking, including full-body retargeting and face-tracking. Please visit the online documentation and join our public forums community.

Online Documentation

Forums

:octocat: GitHub Discussions

Requirements

  • Unity Version 2021.3 or higher
  • Ready Player Me Core - v7.1.0+
  • glTFast - v6.0.0+ (included as a dependency in Ready Player Me Core)
  • Meta Movement v71.0.0+
  • Before testing in VR you should Fix any issues diagnosed by the Meta Project Setup Tool by clicking on Edit -> > Project Settings -> Meta XR

Package Installation

This assumes that your projects already meet all the requirements including the installation of all the plugins listed above

  • Copy the following GitHub URL:
https://github.com/readyplayerme/rpm-unity-meta-movement-support.git
  • Open Unity and go to Window -> Package Manager -> Add package from git URL

    image-package-manager-0

  • Paste the URL and click Add

image-package-manager-1

Importing the Sample

  1. Import the sample by going to Window -> Package Manager -> Ready Player Me Meta Movement Support -> Samples -> Import

image-package-manager

Running the Samples in the Editor

  1. Open the scene Assets/Samples/Ready Player Me Meta Movement Support/VERSION_NUMBER/LoaderSamples/Scenes/DynamicLoader or Assets/Samples/Ready Player Me Meta Movement Support/VERSION_NUMBER/LoaderSamples/Scenes/PrefabLoader
  2. Connect your Quest device via Quest Link
  3. Click on the Play button in the Unity Editor

image

Running the Samples on the device

  1. Open the scene Assets/Samples/Ready Player Me Meta Movement Support/VERSION_NUMBER/LoaderSamples/Scenes/DynamicLoader or Assets/Samples/Ready Player Me Meta Movement Support/VERSION_NUMBER/LoaderSamples/Scenes/PrefabLoader
  2. Add the sample scene to the build settings by going to File -> Build Settings -> Add Open Scenes
  3. Set the build target to Android
  4. Connect your Quest device via USB
  5. Click on the Build and Run button in the Unity Editor

Loading an RPM avatar in a custom OVR-ready scene

This assumes that the scene is already set up with the necessary components for OVR tracking and Meta Movement

Dynamic Avatar Loading

  1. With your scene open, drag and drop the DynamicAvatarLoader prefab from Packages/Ready Player Me Meta Movement Support/Runtime/Prefabs into your scene

  2. Select the DynamicAvatarLoader object in the scene, then in the inspector, set the Avatar URL field in the LoadUrlOnStart component to the URL of the avatar you want to load

    image-inspector

  3. Click on the Play button in the Unity Editor

  4. After a small delay, your avatar will load into the scene

Loading with AvatarPrefabLoader

  1. With your scene open, Drag and drop the AvatarPrefabLoader prefab from Packages/Ready Player Me Meta Movement Support/Runtime/Prefabs into your scene
  2. Select the AvatarPrefabLoader object in the scene, then in the inspector, set the Avatar URL field in the LoadUrlOnStart component to the URL of the avatar you want to load

image-inspector-2

  1. Click on the Play button in the Unity Editor
  2. After a small delay, your avatar will load into the scene

Creating your own Avatar Prefab

Step 1: Set the correct Avatar Config

Before loading an avatar you need to set the correct avatar config. To do this follow these steps:

  1. Open the Ready Player Me Settings window Tools -> Ready Player Me -> Settings

image-toolbar

  1. Set the Avatar Config field to Meta Avatar Config

image-settings

  1. This will ensure that the avatar is created with the correct settings for Meta Movement and face-tracking

Step 2: Loading an Avatar in Editor

  1. Create a Ready Player Me avatar from an XR-enabled subdomain, for example, https://dev-sdk-xr.readyplayer.me/avatar
  2. After avatar creation is complete you will get a URL to a .glb, copy that URL.
  3. In Unity open the Avatar loader window by going to Tools -> Ready Player Me -> Avatar Loader

image-loader

  1. Paste the URL into the Avatar URL field and click Load Avatar
  2. After a small delay, the avatar should load into the scene as a new GameObject

Step 3: Avatar Face Tracking set up & twist bones

  1. Select the avatar GameObject and right-click to display the context menu
  2. In the context menu, select Ready Player Me -> Meta Movement -> Run Avatar Setup

image-inspector-2

  1. This should automatically set up the avatar with the correct settings and components including:
    • Adding a Retargeting Layer component
    • OVR Body component
    • Rig builder component
    • It will create and set up a Rig as a child of the root object
    • Adds constraints including Full Body Deformation Constraint and a Retargeting constraint
    • A OVRFaceExpressions component added to the root object
    • ARKitFace component added to each child mesh with blendshapes
    • A TwistHierarchy component added to the root object with the twist bones set up already

Step 4: Saving as a prefab

With the configured avatar in the scene, there are still a few steps required to save it as a re-usable prefab.

  1. Right-click on the avatar GameObject in the hierarchy and select 'Prefab -> Select Asset'. This will show the avatar source files including a .glb and a .prefab file
  2. Move the files from this folder somewhere in your Assets folder (or anywhere outside of Assets/Ready Player Me/Avatars folder)
  3. After moving these files you can now simply select the avatar object still in the scene and drag it anywhere into the project view to create a prefab

After creating the prefab you can now add it into any scene by dragging and dropping the prefab into the scene hierarchy.

About

rpm-unity-meta-movement-support

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages