Avatar SDK Offline Unity plugin  1.9.1
animted_face and head_1.2 pipelines
Scene #04: LOD Sample

This scene demonstrates how to get various LOD (Level Of Details) for the generated avatar's mesh and blendshapes.

Animated Face pipeline Nine LODs available for the avatar generated by the Animated Face pipeline.

  • LOD0: corresponds to the base head mesh, contains 13043 vertices and 24479 triangles.
  • LOD1: contains 9898 vertices and 18674 triangles.
  • LOD2: contains 8122 vertices and 15122 triangles.
  • LOD3: contains 6107 vertices and 11128 triangles.
  • LOD4: contains 5363 vertices and 9772 triangles.
  • LOD5: contains 3859 vertices and 6844 triangles.
  • LOD6: contains 3062 vertices and 5430 triangles.
  • LOD7: contains 2342 vertices and 3996 triangles.
  • LOD8: contains 1425 vertices and 2680 triangles. The structure of the head the same as in LOD7, but without teeth.

Head 1.2 pipeline Eight LODs available for the avatar generated by the Head 1.2 pipeline.

  • LOD0: contains 28651 vertices and 53171 triangles.
  • LOD1: contains 16481 vertices and 30000 triangles.
  • LOD2: contains 8677 vertices and 15000 triangles.
  • LOD3: contains 6012 vertices and 10000 triangles.
  • LOD4: contains 4921 vertices and 8000 triangles.
  • LOD5: contains 4333 vertices and 7000 triangles.
  • LOD6: contains 3742 vertices and 6000 triangles.
  • LOD7: contains 3191 vertices and 5000 triangles.

User interface and the scene

There are buttons to generate avatar: from the predefined photo, from the photo stored on the filesystem. On the mobile devices, it is possible to take a camera photo.

Toggle switches to choose Head 1.2 or Animated Face pipeline. These switches available only for the Cloud version of the SDK.

The panel in the bottom right corner contains toggles to switch between different levels of details.

There are controls to apply blendshapes for the avatar in the bottom of the scene.

Also, there is a possibility to export avatar with the given LOD to OBJ or FBX formats.

Implementation

See the LODSample.cs for implementation details. The key component is the IAvatarProvider. To get a particular LOD mesh the GetHeadMeshAsync method is used.

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