Links

How it works

How the Ready Player Me Unreal Engine plugin works.
The Ready Player Me Unreal Engine plugin comes with one pre-made blueprint BP_RPM_Actor. You can add this Blueprint to any map and use it for loading a Ready Player Me avatar from a URL at runtime.

Ready Player Me Actor Blueprint

Find ReadyPlayerMe Content/Blueprints/BP_RPM_Actor and examine it in the Components panel.
The components are described below.
Skeletal Mesh Component
  1. 1.
    Select the SkeletalMeshComponent. TheSkeletalMeshComponent is required and holds all the skeletal mesh data once the avatar has been loaded.
  2. 2.
    Examine its Details and under the Animation heading, find the AnimClass property. Its default value is BP_RPM_Animation. You need to set this to the Animation Blueprint you want to use for the character.
The Anim Class property must be set in the editor before you build or run the application, otherwise, the animation will not play on the avatar on built applications
Ready Player Me Component
The ReadyPlayerMeComponent is an ActorComponent that you can add to any existing actor. It requires a SkeletalMeshComponent. If you try to load an avatar on an actor without a SkeletalMeshComponent, it will add a new one automatically.
  1. 1.
    Select the ReadyPlayerMe Component. The ReadyPlayerMeComponent has all the functionality required for loading a Ready Player Me avatar with a single function call.
  2. 2.
    Examine its details and under the Ready Player Me heading; find the Url Shortcode and Target Skeleton properties.
  • Url Shortcode contains the Ready Player Me Avatar URL or Shortcode (see Avatar shortcodes) of an avatar created with the Avatar Creator.
  • Target Skeleton defines the skeleton that the loaded character will use with skinning and animation.
If you want to create or use your own target skeleton, it must perfectly match the skeleton that you are loading from the URL. It is not recommended that you change this property.
  1. 1.
    Examine the Event Graph.
  2. 2.
    Find the Load Avatar On Start Boolean variable. Set this variable to enable or disable the avatar loading process from running on EventBeginPlay as shown below in the Event Graph.

Loading an avatar

You can use two different methods for loading an avatar with the Ready Player Me Actor Blueprint (BP_RPM_Actor) or on any actor that has a ReadyPlayerMeComponent.
  • LoadAvatar
  • LoadNewAvatar
LoadAvatar only requires a reference to the ReadyPlayerMe Component you wish to run it on. Note that this function assumes that you have already set the Url Shortcode to use for loading the avatar model.
LoadNewAvatar has an additional Url parameter so that you can update the ReadyPlayerMeComponent's Url Shortcode variable before loading the avatar.
Both of these functions have on OnSetupFailed function that can be used for basic error handling.

Avatar Configuration

The Ready Player Me Avatar API allows partners to specify the avatar configuration parameters to be applied when loading avatars. The SDK provides a functionality for loading avatars with specific configurations.

Setting Face Morphs (aka Blendshapes)

By default, Ready Player Me avatars come with a set of different face morphs for facial animation. Below is a basic example of setting these face morphs in a Blueprint.
Make sure you connect to the SkeletalMesh Component to which you want to apply the values.
For anybody with experience using other 3D software or game engines, morph targets are also commonly referred to as blendshapes

Avatar Caching

The SDK provides an experimental avatar caching functionality. If avatar caching is enabled, every time an avatar is loaded, the assets are stored locally. If you subsequently try to load the avatar again, we check if the avatar needs to be updated, and if so, we download and save the updated avatar locally. If the avatar does not need to be updated, we load the avatar from the locally stored file.
If a Ready Player Me user makes a change to an existing avatar, for example, changes hairstyles, then it needs to be redownloaded even if it is stored locally via avatar caching. This ensures that the application loads the most up-to-date avatar.
Avatar caching is disabled by default. To enable avatar caching, do the following:
  1. 1.
    Open Project Settings and in the Game section, select Ready Player Me.
  2. 2.
    Check Enable Avatar Caching.

Avatar Render

You can load a 2D render of your avatar using the Avatar Render Loader class which obtains a rendered image of your avatar via the Render API.
Currently, there are two ways for loading the render.

Through ReadyPlayerMeComponent.

Use if you already have the avatar loaded.
void LoadRender(const ERenderSceneType& SceneType, const FDownloadImageCompleted& OnCompleted, const FDownloadImageFailed& OnFailed)

Through ReadyPlayerMeRenderLoader.

Use if the avatar is not yet loaded. The gender and the url of the avatar needs to be provided in this case for rendering the avatar with the correct pose.
void Load(const FString& ModelUrl, const ERenderSceneType& SceneType, const FDownloadImageCompleted& OnCompleted, const FDownloadImageFailed& OnFailed)

More information about the render API

Packaging the project.

Adding plugins to Additional asset Directories to Cook, to fix Missing materials error

A common cause of crashes on built applications using the Ready Player Me SDK is missing files or folders, such as the glTFRuntime materials.
To fix this, adjust the packaging settings.
  1. 1.
    Go to Edit > Project Settings > Packaging.
  2. 2.
    Expand the Packaging section and look for Additional Asset Directories to Cook. Alternatively, you can search for this setting from the top of the Project Settings window.
  3. 3.
    Add the /ReadyPlayerMe and /glTFRuntime folders as shown below.