• Advertisement
Sign in to follow this  

Skeletal animation - vertex/bone weight

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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 :)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement