Avatar Configuration
Apply Avatar API parameters to avatar loading.
Last updated
Apply Avatar API parameters to avatar loading.
Last updated
The Ready Player Me Avatar API allows partners to specify the Avatar Configuration parameters to apply when loading avatars. These configuration parameters can be applied in the Unity Editor Avatar Loader or at runtime.
The SDK provides functionality for loading avatars with specific configurations. For example, you may need a high-quality detailed avatar for showing the model at close range, and a low-quality avatar that will be rendered in a single draw call for other situations. You can set the configuration for each avatar with a custom Avatar Config data asset.
See the API Reference for details.
Avatar Configs will only work with the new avatar API URLs. If you have a saved URL in your project, you may need to regenerate the avatar and update the URL in order to use the Avatar Config.
Several Avatar Configuration templates are included in the SDK with recommended settings for high, medium, and low quality avatars. Find the templateas at
/Packages/Ready Player Me Core/Configurations/
You can click and drag these into the Assets folder to duplicate an AvatarConfig that you can then edit.
Select Assets > Create > Scriptable Objects > Ready Player Me > Avatar Configuration. This creates a new Avatar Configuration asset in the current folder.
Give your Avatar Configuraton a name.
Select your Avatar Configuration to open it in the Inspector.
Change the settings according to your requirements.
See the Avatar API 3D Avatars page for details on these options.
Mesh LOD: Choose a level of detail (high, medium for 50%, or low for 25%). Run Ready Player Me > Examples > Runtime Example > RuntimeExampleMultipleQuality to see how this looks.
Pose: Choose A Pose or T Pose.
Texture Atlas: Turn on texture atlassing and choose the atlas size.
Texture Size Limit: Set an upper limit on texture size.
Use Hands: Check to include hands with half-body VR avatars.
Morph Targets: List of individual morph targets or morph target standard groups to include on the avatar. Click Add and then select your target from the menu.
Avatar Configurations can be applied in the Unity Editor Avatar Loader or at runtime.
Open your scene.
Open Ready Player Me > Settings.
Assign an Avatar Configuration to the Avatar Configuration setting.
Open Ready Player Me > Avatar Loader.
Assign your avatar URL.
Click Load Avatar into the Current Sence. The specified avatar with the specified Avatar Configuration is loaded into the current scene.
In your code, create an instance of AvatarObjectLoader
.
[Optional] Load a previously created Avatar Configuration asset or instantiate a new Avatar Configuration
scriptable object and set its parameters.
[Optional] Assign the Avatar Configuration to the AvatarConfig
property of the AvatarObjectLoader
instance.
Call the LoadAvatar()
method on the AvatarLoader
instance, passing a valid avatar URL.
The Avatar Configuration assigned to the URL will be applied to the loaded avatar.
If no Avatar Configuration is assigned to an AvatarObjectLoader
instance, the Avatar Configuration selected in the Ready Player Me Settings window is applied.
Find example usage of Avatar Configurations in the SDK Runtime Examples at
Assets\Samples\Ready Player Me Avatar Loader\1.0.0\AvatarLoading\
.
See also More Examples.