How it works
Here you will learn how the ReadyPlayerMe Unreal plugin works

Requirements

  • The Plugin supports Unreal Engine 4.25, 4.26 and 4.27
  • A valid avatar URL was created from Ready Player Me to import an avatar to an Unreal scene.
Included in our zip file is a free third party plugin called glTFRuntime, which is required for importing glTF files and that only supports Engine versions 4.25,4.26 and 4.27
The Ready Player Me Unreal Engine plugin comes with two pre-made blueprints BP_RPM_Component and BP_RPM_Actor. These blueprints are examples of loading a Ready Player Me avatar from a URL at Runtime and spawning it into the map. To get started, let's take a look at the most simple way to add avatars into your application using the Ready Player Me Actor Component

Ready Player Me Actor Component

The Ready Player Me actor component can be added to any actor blueprint and has the functionality required to load our Ready Player Me Avatars into the map at Runtime.
You can find an example of this in the Unreal Editor Content Browser at ReadyPlayerMe Content/Blueprints/BP_RPM_Component.
If you open up the example BP_RPM_Component blueprint, or add the component to an existing actor blueprint, you should see it show up in the Components hierarchy like this.
Then you can select this component and inspect the editable variables on the Details panel, as shown below.
Here you will see some important properties. For starters, there is a Url Shortcode property. This is where you need to set the URL (or shortcode) to the Ready Player Me Avatar GLB file. This can be set either inside the editor or at Runtime.
If the URL Shortcode property is not set, the avatar loading will fail.
Next, we have the Anim Blueprint property. By default, it is set to our example animation blueprint BP_RPM_Animation but feel free to update this property as required. If nothing is set here, no blueprint will be assigned, and the avatar won't animate.
Lastly, we have the Target Skeleton. This property also needs to be set to a skeleton in the Unreal Project that matches the skeleton of the avatar model you are loading. By default, we set this to RPM_Mixamo_Skeleton.
If you want to create or use your target skeleton, be aware that it needs to perfectly match the skeleton that you are loading from the URL. It is not recommended that you change this property.
Now that you understand the editable properties of the component, let's take a look at the Event Graph.
As you can see example is quite simple, with only a RunAvatarSetup function. As the name suggests, it handles the loading and setup of a Ready Me Avatar. When this function is called, it does a number of things in the background like:
  • Make a web request to load the avatar metadata and then the avatar model (GLB file)
  • It loads the mesh, material, and texture data into the SkeletalMesh component on this actor
  • Assigns the target skeleton and animation blueprint (if set)
There is also an OnSetupFailed delegate function that you can use to display messages if RunAvatarSetup fails to complete.

Ready Player Me Actor Blueprint

To get an understanding of how you can load a Ready Player Me avatar at Runtime, let's take a look at the BP_RPM_Actor blueprint event graph. You can find this blueprint in the Content Browser under ReadyPlayerMe Content/Blueprints/.
With the BP_RPMActor blueprint lets take a look at the difference components in the components panel.
Skeletal Mesh Component
Firstly there is a SkeletalMeshComponent, this is required to hold all the skeletal mesh data once the avatar is loaded. The only thing you need to set here is the AnimClass property under the Animation heading. Here you will set the Animation Blueprint you wish to use for the character, by default we set it to BP_RPM_Animation blueprint.
The Anim Class property must be set in editor before building or running the application, otherwise the animation will not play on the avatar on built applications
Ready Player Me Component
Next we will take a loot at the ReadyPlayerMeComponent which has all the functionality required for loading Ready Player Me avatars with a single function call. if you select the component and look at the details component on the right you will see two main properties here Url Shortcode and Target Skeleton.
Url Shortcode is where you can set the Ready Player Me Avatar URL or Shortcode after it has been generated from our web platform.
Shortcodes are a feature that can be configured for a specific Ready Player Me partner domain. If this feature is enabled, it will return a code (6-8 Digit code) using only numbers and letters. You can learn more about this feature here.
Target Skeleton, as the name suggests, is where you define the skeleton that the loaded character will use. This is important because the target skeleton is what will be used behind the scenes when it comes to animating the character. it is not recommended to change this from the default RPM_Mixamo_Skeleton unless you know what you are doing.
Lastly you will notice a public boolean variable we added called LoadAvatarOnStart, this is somethat that can be used to enable or disable the avatar loading process from running on EventBeginPlay as shown below in the Event Graph.
How to load an avatar?
To load an avatar using our Ready Player Me Actor blueprint (BP_RPM_Actor) or on any actor that you have added a ReadyPlayerMeActorComponent to there are 2 method you can use, RunAvatarSetup and LoadNewAvatar.
Run Avatar Setup is shown above in the previous image, as you can see you simply need to pass a reference to the ReadyPlayerMeComponent you wish to run it on. Just note that this function assumes that you have already set the UrlShortcode variable and it will use that to load the avatar model from.
Alterntively there is a LoadNewAvatar function that has an additional Url prarameter which can be used to update the ReadyPlayerMeComponent's UrlShortcode variable before loading the avatar from the newly update Url.
Both of these functions have an OnLoadFailed function which can be used for basic error handling.

Set Face Morphs (Blendshapes)

By default our avatars come with a set of different face morphs for facial animation. Below is a simple example of how you can set these face morphs inside of a blueprint. Make sure that you connect a reference to the SkeletalMeshComponent that you want to apply the values to.
For anybody with experience using other 3D software or game engines, morph targets are also commonly referred to as blendshapes
If you want to see exactly what our RPM helper functions do. you can find the C++ class files in [PROJECT_NAME/Plugins/ReadyPlayerMe/Source/ReadyPlayerMe/Private.

Have issues gettings started?

If you are having issues getting started or have some further questions, you can refer to our FAQ or Troubleshooting pages linked below. Alternatively, you can contact support by emailing [email protected]