Skeletal animation - vertex/bone weight

Started by
0 comments, last by InvalidPointer 12 years ago
Hi there,

So i've been continuing my pursuit for skeletal animation! Hasn't been a long time since i started, but hard.
I got a little understanding of how the structures work and i think i got that ok, also i spent the last couple of days building the code i needed for quaternions, and altough problems will appear im sure, the tests i ran so far worked well(even slerp).

My problem now is, even if i have all bones loaded and correctly positioned, and all the vertex information and weights also loaded and linked with the bones. How do i use this information, so that when i rotate a bone for example, it will drag with it, the vertex's associated?

Thanks in advance.
Advertisement

I got a little understanding of how the structures work and i think i got that ok, also i spent the last couple of days building the code i needed for quaternions, and altough problems will appear im sure, the tests i ran so far worked well(even slerp)

Don't use slerp.

Re: your actual question-- assuming you're doing hardware skinning, you just need to get the bone matrices/orientation data into the shader somehow, (as mentioned, 4x4 matrices are probably the most straightforward way, but they eat a *lot* of shader constant memory, consider quaternions + translation and uniform scale if this is a problem) transform the point by the bone matrix individually for each bone influence, then do a weighted average of each transformed point using the bone influence weight value you mention. Not too hard :)
clb: At the end of 2012, the positions of jupiter, saturn, mercury, and deimos are aligned so as to cause a denormalized flush-to-zero bug when computing earth's gravitational force, slinging it to the sun.

This topic is closed to new replies.

Advertisement