The Body Avatar Drive functionality allows you to track the position and rotation of joints on the body in 3D. You can track one full-body as well as partial bodies.
This example uses the BodyAvatarDrive Template to apply your position and rotation of joints on character.
Download avatar assets:
Import 3D Model
You can import assets by dragging them to the Assets panel or clicking on + Add asset > Import > From Computer
Add 3D Model to Hierarchy panel
Drag the asset to the Hierarchy panel. You can automatically preview the model and adjust the transform to fit on the screen.
Add Body avatar drive component
Go to the Hierarchy panel and click + Add object > AR tracking > Body Avatar Drive. This will create the functional entity along with the Body Avatar Drive component.
Next, nest the character underneath Body avatar drive.
In the Inspector panel, the Follow body position property directs whether the character will follow your body transform. Uncheck this property if you don’t want the character to match your body movements. You can then customize the character’s transform under Transform.
Applying body and helmet material
We first created a PBR material and renamed it to “alienBody_mat”. Then setup the material with the corresponding textures and assign the material to the alien body mesh.
Next, we will set up glass material for the helmet. Go to the Inspector panel of the glass material, unfold Render State 0, and choose Glass for Blend Mode.
Remember to uncheck Auto Sorting and to set the Sorting Order manually to ensure that the sorting order of the helmet is bigger than the alien entity. This way, the helmet will cover the alien’s head.
Customizing FBX Model
If you want to customize FBX for the 3D character, download the BodyRigTemplate and use it as a reference for the key points and positions on the 3D body. Make sure all naming conventions are correct.
Your naming convention and 3D model rigged to a skeleton should match what the tracker sees. This allows you to map the movement of the body to the movement of the model. The character you want to transform as a whole should have the following hierarchy and naming conventions.
Rigging usually takes a lot of time. We highly recommend using some automation rigging tools like Maya or Mixamo. Mixamo’s technologies use machine learning methods to automate the steps of the character animation process, including 3D modeling, rigging, and 3D animating.
There are some unique settings you would need to use for the best results with creating a model in Mixamo for EH. Remember to export the Skeleton LOD with less than 50.
If you select any animation to export with the model, when import the model into Effect House, remember to remove Mixamo’s playback animation component when drag the model into the scene.
Body avatar drive component properties
Transform: The entity’s transform controls position, rotation, and scale. The parameters will be overwritten by the algorithm if Follow body position is checked.
Follow body position: If checked, the Transform of the entity follows your body pelvis. If unchecked, you can modify the entity’s transform. The default state is checked. The scene and preview will update the corresponding model accordingly.
Match rigging: When clicked, the component automatically fills or refreshes the matched joints under the advanced setting by matching the name.
Advance: If Match rigging is clicked, it will automatically fill in all matched rigged names to the correct hierarchy. You can also manually drag the joint entity from the avatar to the corresponding rigged name fills.
Body avatar drive feature has a high impact on performance on both iOS and Android. Although we level up our QA standards in order to make your effect cover a wider range of devices, we highly suggest not combining Body avatar drive with other features. Doing so will cause low FPS and may subsequently fail QA.
You are also welcome to check out more details here on our Technical optimization guide.
Body Avatar Drive currently supports only one person tracking, but you can add more than one Body Avatar Drive in the scene to drive more than one rigging models, such as occulder and clothes.
Body Detection node
There is a Body Detection visual scripting node to help detect if there is a full or a part of a body in the camera view in order to set up related interactions. Check out the Body Detection visual scripting node for more details.
For example, let’s set a basic interaction. If a full-body is not detected, make the alien avatar invisible. If a full-body is detected, display the character at the bottom of frame and match the user’s movements.