Jump to content
  • Advertisement
Sign in to follow this  
sled

Smooth Joint Interpolation

This topic is 4613 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

Whats the fastest/most efficient way to perform joint interpolation - and so that it still looks good? I coded an example that has a mesh attached to two bones. The bones are initially aligned and can bend up to 90 degrees (rotated around the z-axis) in 1 degree increments (this is controlled by a slider). The weight for each vertex/normal is calculated using a shifted/scaled invtan function (which I believe is a pretty expensive function?). So each vertex/normal is a combination of invtan(x) of one bone and 1-invtan(x) of the other, where x is an appropriately scaled parameter thats is linearly interpolated between the total length of the two bones. This method seems to work pretty well in terms of visual results - it calculates a smooth bend at the joint, but it is pretty slow - when I move the slider the joint movement is kind of jumpy. How do you guys implement smooth joints for your games? Performing the calculations during load time and storing a vertex/normal for every possible angle in memory would probably speed things up during runtime but 90 * the number of verts/norms seems like a lot. For a game using many characters each with skeletons with many bones...yea this can't be the right approach.

Share this post


Link to post
Share on other sites
Advertisement



I dont know much about your alogrithm but the look up table sounds like a good idea. It would not be necessary to store values for every angle, maybe just like 8 angles, and linearly interpolate between the values for the other angles.

Just an idea..

Share this post


Link to post
Share on other sites
I don't quite understand your weighting-by-atan(x) description. Can the length of the bones change? The usual method is this: each vertex has a list of bones and weights whose values are fixed.

One way to speed it up would be to replace the atan weighting with something faster like 3x2-2x3, which will give you a similar weighting.

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!