Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
1.0.0:custommesh [2023/03/23 13:53] – [Add a Skin-Animation] admin | 1.0.0:custommesh [2023/03/23 13:59] – [Add a Skin-Animation] admin | ||
---|---|---|---|
Line 490: | Line 490: | ||
LCtrl.Skin.Skeletons.Add(LJtRef); | LCtrl.Skin.Skeletons.Add(LJtRef); | ||
- | // We have to link all relevant joint to the skin and add weights and joint-indices | + | // We have to link all relevant joint to the skin and add weights and vertex-indices |
+ | // " | ||
+ | // The sum of all weights (over all joints) for a specific vertex has to be 1.0! | ||
LJtRef := LCtrl.Skin.LinkJoint(Result.Root); | LJtRef := LCtrl.Skin.LinkJoint(Result.Root); | ||
LJtRef.Weights := [0.75, 0.75, 0.75, 0.75, 0.25, 0.25, 0.25, 0.25, 0, 0, 0, 0]; | LJtRef.Weights := [0.75, 0.75, 0.75, 0.75, 0.25, 0.25, 0.25, 0.25, 0, 0, 0, 0]; | ||
Line 520: | Line 522: | ||
=== Add a Skin-Animation === | === Add a Skin-Animation === | ||
- | To animate the armature | + | To animate the armature it's necessary to have compatible animation stages and interpolators. |
- | Related to our armature and bones before, the code could look something like this: | + | Related to our armature and bones (joints) |
<file pascal> | <file pascal> |