Avatar Configuration

The Enoch 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.

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.

Avatar Configuration templates

Several Avatar Configuration templates are included in the SDK with recommended settings for high, medium, and low quality avatars. Find the template as at

/Packages/Enoch Core/Configurations/

You can click and drag these into the Assets folder to duplicate an AvatarConfig that you can then edit.

Create an Avatar Configuration

  1. Select Assets > Create > Scriptable Objects > Enoch Avatars > Avatar Configuration. This creates a new Avatar Configuration asset in the current folder.

  2. Give your Avatar Configuraton a name.

  3. Select your Avatar Configuration to open it in the Inspector.

  4. Change the settings according to your requirements.

Avatar Configuration Settings

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 Enoch Avatars > 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.

Apply an Avatar Configuration

Avatar Configurations can be applied in the Unity Editor Avatar Loader or at runtime.

Editor Avatar Loader

  1. Open your scene.

  2. Open Enoch Avatars > Settings.

  3. Assign an Avatar Configuration to the Avatar Configuration setting.

  4. Open Enoch Avatars > Avatar Loader.

  5. Assign your avatar URL.

  6. Click Load Avatar into the Current Sence. The specified avatar with the specified Avatar Configuration is loaded into the current scene.

Runtime Avatar Object Loader

  1. In your code, create an instance of AvatarObjectLoader.

  2. [Optional] Load a previously created Avatar Configuration asset or instantiate a new Avatar Configuration scriptable object and set its parameters.

  3. [Optional] Assign the Avatar Configuration to the AvatarConfig property of the AvatarObjectLoader instance.

  4. Call the LoadAvatar() method on the AvatarLoader instance, passing a valid avatar URL.

  5. 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.

Examples

Find example usage of Avatar Configurations in the SDK Runtime Examples at

Assets\Samples\Enoch Avatar Loader\1.0.0\AvatarLoading\.

Last updated