# Skinning Theory...

This topic is 4335 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I'm looking for help wrapping my head around a specific aspect of skinning and was hoping someone here could enlighten me. I get the idea in general, and have bones exporting properly and all, but now when looking at implementing the skinning part (in hardware especially) I'm getting kind of confusing and losing myself. Basically, each bone has a position and quaternion for the rotation. They are all relative to the parent bone. So my main issue is, as I understand it, for me to do things in hardware, each bone has to be the total transformation right? Also the bone data I'm passing in should be a difference from the root pose, not the final total transformation? Having trouble to even explain this issue... any help is appreciated.

##### Share on other sites
For (weighted) skinning, the vertexes are in model space in the bind pose. Each bone in the animation data is relative to its parent. The bones in the both the animated and bind pose skeletons are in model space (or world space). To animate a vertex:
For each vertex:
1. For each bone the vertex is weighted by:
1. Multiply it by the inverse of the bone's bind pose transform to put it into the bone's space.
2. Multiply it by the animated bone (in the skeleton) to animate it and put it back into model space (or world space).
3. Multiply by the weight
2. Sum the results to get the vertex's animated and weighted position in model space (or world space).
As a major optimization, you can concatenate the bone's animated and bind pose transforms once per frame so you don't have to do two transformations for every vertex and weight.

##### Share on other sites
That much I get, and has added some clarity.
Still not sure about how the bones I pass into the GPU should be formatted though. You say the bones should be animated relative to parent, but when I pass the bones in I can't maintain that relationship.

##### Share on other sites
you should first go trough the bones and transform them all on cpu back to object space (wich is, sort of, the master parent, the root, of your bone-model). then they are all in the same space, and you feed that to the vertexshader..

don't know if you can do the first part in hardware?.... (of course, doable is everything, but if there is an easy and fast way, dunno)

1. 1
2. 2
Rutin
17
3. 3
4. 4
5. 5

• 26
• 11
• 9
• 9
• 11
• ### Forum Statistics

• Total Topics
633702
• Total Posts
3013449
×