Binds objects to a SkinnedMeshRenderer.
- Works only on the CPU side with Jobs + Burst.
- Does not use the BakeMesh() function and does not retrieve data from the GPU.
Simply copy the weight of bones onto vertices to apply the same transformation matrices to GameObjects. - Can place objects on verteices or triangles using barycentric coordinates.
- Can control position and rotation.
The cubes on the leg in the gif are gameObjects with a classic meshRenderer.
Is relatively simple :
- Add the BindedSkin component to your animated object or parent.
- Add the BindedSkinAnchor component to a child object. This child should be placed next to your animated object when it's in bind pose (use the button in BindedSkin to put it in bind pose).
- You can start the game, skininig is done in runtime.
SkinData:
- Position: The object will be moved according to the skin
- Position & rotation: The object will be moved and rotated according to the skin.
Snap Method:
- On Nearest Vertex: The object will snap to the nearest vertex at the first frame.
- On Nearest Triangle: Object snapped to nearest triangle. Its coordinates will be maintained between the three points of the triangle using barycentric coordinates. The triangle can therefore be deformed.
- Computations are performed on sync jobs. This allows relatively fast processing despite the large number of objects.
- This project requires Unity's Burst package.