# Smooth Joint Interpolation

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

## 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 on other sites

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 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.

1. 1
2. 2
3. 3
Rutin
18
4. 4
5. 5
JoeJ
13

• 14
• 10
• 25
• 9
• 57
• ### Forum Statistics

• Total Topics
632640
• Total Posts
3007618
• ### Who's Online (See full list)

There are no registered users currently online

×