This is the documentation page for the
Body Mesh component in Lens Studio. The
Body Mesh creates a custom mesh that mimics the user’s body as a 3D mesh in real time.
Getting Started with the Body Mesh Component
Body Mesh to your Lens Studio project, first go to the
Objects panel, and type
Body Mesh. Then select the
Full Body Mesh.
Your scene will be automatically populated with a body mesh with a
Body Mesh scene object. And in your
Resources panel you’ll get a
Body Tracking Asset, a
Full Body Mesh and a material.
Body Tracking Asset handles the tracking data of the body. The same asset can be used for multiple bodies, and can also be used for skeletal tracking. The
Full Body Mesh asset handles the visuals of the
Checking/unchecking the Hands, Body and Head checkboxes on the
Full Body Mesh asset will toggle visibility of Hands, Body and Head in the scene.
*In order for hands to be tracked, the full body must be visible in camera.
Body Index on the
Full Body Mesh asset decides which body the mesh will be mapped in the scene. Note that it should match the index on the
Object Tracking 3D component that contains the
Body Mesh object in scene.
Download the 3D Body Mesh FBX and UV map as Reference
Click HERE to download a zip that contains 3D model of the Body Mesh object and UV map! These are incredibly helpful when trying to add custom textures or 3D objects to the Body Mesh!
If you are a 3D modeler you can use the FBX to base your 3D creation from. If you are a 2D artist, you can use the UV map to draw on the Body Mesh.
Working with the Body Mesh
Adding a second Body Mesh
To add another
Body Mesh that can be the same or different from the one already created in the scene. We can first duplicate the
Body Mesh component we have.
For the second
Body Mesh, change its
Object Index to 1 so it maps to the second person in the scene.
You’ll notice that the second mesh has the same shape and pose as the first mesh. To change this to track the second person, we can go to the
Full Body Mesh asset of the second person and change its
Body Index to 1 as well.
Attaching Objects to Body
3D or 2D Objects can be attached to the body with the
Here we’ve created a simple cube and added the
PinToMesh component (go to Add Component from the Inspector window and type Pin To Mesh) to the cube object. Then we added the mesh of our
Body Mesh component to the
Target field of
Position and Rotation if you want the object to rotate along the surface as well.
It’s done! Now we have this cube that maps its position around the body. Feel free to try it out with any custom objects!
This is it for using the
Body Mesh Component in Lens Studio, to see examples of using the
Body Mesh Component, please check out the Body Mesh Template page!
Still Looking for help?Visit Support