# Skinning data

The Simplygon API now provides the user to add skinning information per-vertex. The skinning data is kept intact when performing reduction. The API also provides the ability to reduce bones and generate new skinning data based on the reduction. For more on how to use bone reduction see the section about bone reduction settings or the bone reduction example.

Skinning

# Smooth skinning

Simplygon API provides support for smooth skinning. Two new fields have been added to the GeometryData class for skinning purposes. These two fields are the BoneIds and BoneWeights. The figure above shows how smooth skinning works.

# Bones

To add skinning information in GeometryData use the AddBoneWeights. The method takes the tuple size which should be equal to the number of bones influencing a vertex. The API allows a vertex to be influenced by a maximum of four bones. Calling AddBoneWeightsalso creates the BoneIds field with the same tuple size. The bone ids field contains integer ids. The bone weights field can accept floating point values. Set the bone id and bone weight to -1 and 0 respectively if the tuple is not used. Bone setup is provided through the Simplygon scenegraph see SceneBone documentation.

# Example - How to use skinning data