Archived

This topic is now archived and is closed to further replies.

Weighted skeletal animation

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

Recommended Posts

This is just a ''Im wondering about'' question, not a ''I need'' question.... ...so I understand how skeletal animation works - each group of vertices is rotated/translated according to the rotation/tranlsation of the associated bone. But what about weighted translation? Where the vertices are affected by two or more bones at differing strengths? Do they literally have to cycle through each vertex and get a mixture of the rotation/translation for the rotation/translation of the vertex? This seems somewhat slow to me, so I was wondering if there''s a ''trick'' to this or if that''s really the only option available.

Share on other sites
That''s the way I do it, and it''s not particularly slow. Only very few vertices weigh on more than one bone and they almost always use just two bones. In my experience anyway - which is very little. I just need to know how to display all this effectively (see my other thread)

Share on other sites
quote:
Original post by Damocles
This is just a ''Im wondering about'' question, not a ''I need'' question....

...so I understand how skeletal animation works - each group of vertices is rotated/translated according to the rotation/tranlsation of the associated bone. But what about weighted translation? Where the vertices are affected by two or more bones at differing strengths? Do they literally have to cycle through each vertex and get a mixture of the rotation/translation for the rotation/translation of the vertex?

This seems somewhat slow to me, so I was wondering if there''s a ''trick'' to this or if that''s really the only option available.

It should not be slow. Eg an arm has a bone (matrix) for upper arm and lower arm. The vertices of the arm have weights, on the upper arm (1,0) so that they move 1:1 with the upper arm and not with the lower arm. The same for the lower arm, (0,1). Now the vertices in the elbow have varying weights, from (1,0) via (0.8,0.2), (0.6,0.4), (0.4,0.6), (0.2,0.8) to (0,1). This makes the triangles between them stretch and shrink.

If you implement everything in a vertex shader program you just put weights in every vertex, the bones and world/view/projection matrix in constant registers. The bones define the current direction of the lower and upper arm. Then the vertex shader processes every point, moving it according to the bones, and transposing it to 2D space with the combined matrix. This is as fast as rendering a static model. You just need one mesh, the bones, and how the model looks is just filling a few matrices.

But maybe I misunderstood the theory, maybe the weight for the lower arm should be (1,1) as it is directly influenced by the upper arm.

1. 1
2. 2
Rutin
18
3. 3
4. 4
5. 5
frob
12

• 9
• 21
• 13
• 9
• 17
• Forum Statistics

• Total Topics
632608
• Total Posts
3007391

×