Avatar SDK Unity Cloud plugin  3.0.1
Realistic avatar generation toolset for Unity3D
Scene #02: Gallery Sample

This scene showcases the more advanced usage of the Avatar SDK API.

User interface and the scene

UI is similar to a previous scene: use upload buttons to create avatars from different photos, use the drop-down list to select the pipeline type.

Once the photo is uploaded, the avatar isn't opened right away, but rather added to a gallery with a small thumbnail image. In the Cloud SDK, the list of avatars is downloaded from the server.

Show button will open an Avatar viewer which is implemented as a separate scene. Once opened, the Avatar Viewer will download the mesh and the list of available resources for this avatar from the server (or from disk if they are already downloaded). Controls in avatar viewer allow you to change the haircut and its color, playback blendshape animations, change rendering options, and export the avatar to a prefab, .obj, or .fbx format.

Keep in mind that in this sample the avatars are always created with a default set of parameters. To learn how to create an avatar with the custom set of parameters take a look at the Parameters Sample.

Implementation

The key code components for this scene are:

  • IAvatarProvider used to generate avatars, just like in GettingStarted scene.
  • GallerySampleCloud demonstrates how to create a very basic avatar gallery using the Avatar SDK API
  • The viewer scene is built around AvatarViewer class which contains all functionality to display the avatar on a scene.

All classes mentioned are implemented in open-source C#, please take a look at the source code and the comments for further instructions.

See also FAQ and the getting started instructions on the main page: Main Page.

Location: Assets/itseez3d/avatar_sdk/samples_cloud/02_gallery_sample_cloud/scenes/02_gallery_sample_cloud.unity.