Smooth Joint Interpolation

Started by
1 comment, last by JohnBolton 18 years, 5 months ago
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.
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..
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.
John BoltonLocomotive Games (THQ)Current Project: Destroy All Humans (Wii). IN STORES NOW!

This topic is closed to new replies.

Advertisement