26 May, 2009

Continue on Twist

The best way to understand twist is to think of the joint as a vector and twist is a spin around that vector. This leads to the topic of how quaternion transform works. More on that later.

When it comes to vector related implementation two tools mentioned below are a great help.

-> Single IK chain with pole vector can act as a vector. And spin is defined by pole vector or twist attribute.-> Aim constraint comes very handy when vectors are involved. You can use aim vector and up vector to control the rotation of an object.

Keep in mind though that they do flip at one point or the other. The pose does not change generally, but if you are doing calculations based on their rotation then you are highly prone to flipping issues.

4 comments:

i was on cg talk and i saw someone talking about the concepts of posedeform that it check if two vectors are parallel and activites the a shape when the two vectors are...

i was wondering if that could be used to help with the shoulder/wrist twist problem, so maya knows what to do even if things goes into gimblo lock, and doesn't just check individual rotation on x,y,z axis.

It will be a dot product if you want to check if vectors are parallel or perpendicular. The dot product result of two unit vectors is cosine of the angle between them. If dotprod=1=cos(0) it means vectors are parallel and dotprod=0=cos(90) means vectors are perpendicular.

Vector product can certainly be used for shoulder twist setup. Somebody on CGTalk had posted an exmpale in a thread about Shoulder Twist. However, main problem is dealing with flipping issues near +-90 degree when using a dot product.

I will post about my logic very soon. I am still trying to optimize it.One thing I have learned is, don't use orient constraint for distributed rotation. Joints will start flipping very quickly. That is mainly due to problem with limited angle calculations of ik or aim constraints.