- Avatar Representation listeners
- Simple Avatar
- Eye movement Simulation
- Oculus lip synchronization
- Supported topologies
The avatar addon provides a common base to support avatar specific functionality and a simple avatar system which shows how to create an avatar system allowing users to customize their own avatar.
AvatarRepresentation class offers the following capabilities:
- subscription to
UserInfochange of either avatar's name or url
- selection of the proper avatar system for a given URL
- support for LOD (see "LOD Support" details below)
- definition of common description of an avatar (color, hair, ...) through the
- broadcasting of avatar loading finished event on
NetworkRiggame object's children implementing
IAvatarRepresentationListener(and also on
HardwareRig's children, if a
RigInfosystem is in place to track the hardware rig reference).
A LODGroup can added as a sibling to
AvatarRepresentation, and in this case,
AvatarRepresentation offers those capabilities:
- addition and removal of avatar systems' dynamically created renderers to the LODGroup
- while an avatar is loading, or if an url is erroneous, show a higher level LOD (based on
loadingMode, by default only for remote users)
- control the activation or not of the LODGroup with the
Avatar Representation listeners
The addon offers some components implementing
IAvatarRepresentationListener and reacting to avatar loading.
Local avatar culling
The local avatar culling system aims at hiding an avatar for the local user. To do so, the camera stored in the hardware rig has its culling mask changed, to hide a layer, that will be applied to the avatar gameobject when it is associated to the local user.
Local avatar culling is done by adding a
LocalAvatarCulling script on the
HardwareRig game object.
Note that a
RigInfo system is required for it to be functional, and so in addition to
LocalAvatarCulling on the
RigInfoon the networkRunner game object
NetworkRiggame object and a
Hand representation managers
HardwareHandRepresentationManager are optional components that allow to manage online and offline representation of hands.
There purpose is mainly to be able to colorize the hand based on the avatar skin color received.
They also offer various options to determine the appearance logic of the offline and online hands, based on the connection status, the availability of hands in the loaded avatar system, and so on.
The hardware hand also has a decoration system, to have a part of the offline hands (typically, a watch) moved based on online data. This is useful for special cases, like surfaces blocking the network hands: it ensures that the hardware hand decoration, if any, follows the network hand interpolation target (useful when the network hand interpolation target is manually changed - hand blocked, ...)
Low poly simple avatar
LowPolySimpleAvatar is in charge of configuring a low poly avatar (for the LODGroup) according to the avatar selected by the player (it can be a simple avatar model or a Ready Player Me model).
To do so, it uses the
OnRepresentationAvailable callback of the
Then, materials for body, hair and clothes colors of the low poly avatar are configured according to the selected avatar.
Also, if the avatar model is a simple avatar, the hair mesh is configured with the hair LOD mesh corresponding to the simple avatar model.
This addon includes a simple avatar system which shows how to create an avatar system allowing users to select the various parameters making up their avatar: skin color, clothes meshes, hair material, etc...
SimpleAvatar contains methods to:
- change the avatar thanks to a new "simple avatar" URL
- generate a random "simple avatar" model
- configure a specific avatar parameters (hair, cloth, skin)
- animate avatar's eyes and mouth
Also, it informs the
AvatarRepresentation when a new simple avatar is loaded thanks to the
Demo scene can be found in the
So, to test simple avatars, open the
When the user is spawned, select the
SimpleAvatarNetworkRig(Clone) game object and change the
For example, you can use the following URL :
Eye movement Simulation
To avoid an avatar to display static eye gaze, it is possible to use the eye movement simulation system. This system can move objects (avatar eyes) to track other objects having a
GazeTarget on them.
To do so:
- the scene must contains a
GazeInfocomponent (which runs at regular interval the background thread determining the new targets to aim)
- avatar object must hold a
Gazercomponent, and provide eyes game objects to
gazingTransforms(it is also possible to provide some rotation offset through
- optionally, to improve performances, it is possible to provide a
Gazercomponent in the
eyeRendererVisibilityfield: if the
RendererVisbledetect that the avatar renderer is not visible, eye simulation won't be run for this avatar
Oculus lip synchronization
Some avatar system will need advanced lip synchronization. To do so, the avatar addon includes a version of the Oculus Lipsync library, released under the Oculus Audio SDK license (https://developer.oculus.com/licenses/audio-3.3/) / Meta Platform Technologies SDK Licence Agreement (https://developer.oculus.com/licenses/oculussdk/) , and available in the Oculus Integration.
Text Mesh Pro (only used to display the user name plate)
This addon latest version is included into the addon project
- shared mode
- Version 1.0.2: use NetworkString for UserName & AvatarURL
- Version 1.0.1: fix namespace for LookAtCamera
- Version 1.0.0: First release