PDA

View Full Version : Mirroring advanced twist [Spline IK]


mlefevre
07-21-2009, 07:20 PM
Is it possible to mirror the behaviour of the advanced twist on a spline IK? (MAYA)

For example, if you were to use the advanced twist setup for flexible arms on a character. When I mirror the joints using the 'Behaviour' option, I get odd results when I apply advanced twist using 'Object rotation up [start/end]'.

I've attached a file if anyone feels like taking a look! (.ma)

Thanks

Leffler
07-21-2009, 08:09 PM
Hi Matt,

Ive spent alot of time trying to figure out the same problem but the only thing ive narrow down is this: Adwanced Twist needs X running "down the chain", pointing at the next joint. I wish I could understand the math here but I donīt

What I use instead is "ribbons" as twist and offsetbones in the arms. I can post an example if you want, but I guess youve seen them before :)

Take care!

Otto

mlefevre
07-21-2009, 08:49 PM
Hey Otto,

Thanks for your reply. I think I remember you making a topic about this over on rigging101!

I'll take a look at using ribbons.

Thanks


EDIT*

Just had another look at your post over there. Looks like dBrooks provided a nice solution. I'll have a bash at that aswell.

Leffler
07-21-2009, 09:34 PM
Okey, nothing I got to work if I gave it a shot, canīt remember now. Let me know if you find a solution, would be great if it was possible

Xeash
07-22-2009, 08:57 AM
Hi, guys
I don't understand why you need splineIK with advanced twist work on joints with mirrored orientation? I didn't see a rig in Maya which used splineIK like that :surprised
P.S.
ribbons are truly good thing)

mlefevre
07-22-2009, 11:20 AM
The advanced twist feature is nice for getting a gradual twist from both ends of the joint chain. Granted you can do this with a ribbon, but that includes an extra step of weighting.

Setting up volume preservation on a ribbon is also a lengthier process.

Xeash
07-22-2009, 11:53 AM
No I understand what Is it, and why is it nice to have in rig. But why you need splineIK to work on joints with mirrored joints orientation((180,0,0) in your scene)?
Why just not zero out orientations on other half as well?
In all rigs what I saw with advanced twist no one used spline Ik on joints with mirrored joint orient attribute....That's why I asked

Leffler
07-22-2009, 01:00 PM
If you zero out the joint orientation you do not get the behavior you want when rotating both arms.

That is, when you select the uparm or elbow controller on both sides and rotate, the arms will rotate the same way.

If you zero out the orientation, you get mirrored values. So for exampel, on the left side the elbow will bend inward with a negative value... on the right side its positive! Makes it weird as hell in the graph editor too

Not having that "correct" behavior is a PAIN imo

Leffler
07-22-2009, 01:03 PM
In all rigs what I saw with advanced twist no one used spline Ik on joints with mirrored joint orient attribute....That's why I asked

Thats because it doesnīt work :) If you download the scene Matt uploaded you see whats happening on the right side

mlefevre
07-22-2009, 01:36 PM
Indeed, that was my concern. The solution by dBrooks involves using a flipped orientation on the twist axis, and contraint offsets on the controls (which have mirrored behaviour). I'm not sure if it'd flip in some cases, but it's certainly a useful solution.

Xeash
07-22-2009, 02:33 PM
Hey, guys, of course I know why we need mirrorred joints. (May be my bad english shows up)

I took a look on a scene througholy. Yes I agree math behind this definetly is mystery. I noticed that if Translate X IS NOT POSITIVE we have the odd behaviour. i.e. joint orientation is not a reason behind this.
I think solution can be something like this (In attached file)

mlefevre
07-22-2009, 04:29 PM
Yup, that's the solution I'm using at the moment. :)

Thanks for sharing!

Leffler
07-22-2009, 05:39 PM
But with that solution we are back at square 1, right? That is, now both left and right arms will not rotate the same way when being rotated at the same time

mlefevre
07-22-2009, 05:57 PM
Sort of. If your controls have the desired LRA, you'll still achieve the mirrored behaviour. It just means your constraints hold offset values.

Xeash
07-22-2009, 06:02 PM
I took a look on dBrooks solution.
It looks I came up with same solution :)
2 Leffler:
Why not? it will work. Just separate twist rig in two skeletons: animation(just your mirrored joints) skeleton and spline ik skeleton. Then use orient constraints to make animation skeleton drived by spline ik skeleton.

Leffler
07-22-2009, 06:38 PM
Sort of. If your controls have the desired LRA, you'll still achieve the mirrored behaviour. It just means your constraints hold offset values.

Oh yea, didnīt think of the constrain offset. Nice!

Boucha
07-23-2009, 02:53 AM
I ran through this same problem a long time back. It is the problem with ik spline's advance twist not able to twist in proper direction with a flip flopped scale axis with happens every time we mirror the joints in behavior mode. I figured out that i needed to mirror the joint in orientation mode and it works like a charm. Now you can hook up the controllers which cleverly behaves in orientation mode...:eek:

But I was not happy, i needed to find a way out and after some time I work around it and found a solution. Here it goes,
Normally, for the advance twist to happen maya connects the worldMatrix of an object to dWorldUpMatrix of the ikHandle for the world up object while for world up object 2 it connect worldMatrix of object to dWorldUpMatrixEnd. Now this works like a charm for regular joint orientation but when it comes to fliped oreintation it doesn't work as we predicted. For this to work nicely we can disconnect the initial connection and reestablish a new connection like:

- connecting the worldInverseMatrix of the object A to dWorldUpMatrix of ikHandle..
- connecting the worldInverseMatrix of the object B to dWorldUpMatrixEnd

Thats it,...now it works like a charm...:thumbsup:

mlefevre
07-23-2009, 08:38 AM
Suchan, you're a star! Thanks so much for sharing.

Edit*

Suchan, could you perhaps post a working file for your method (Some mirrored joints in a behavioural fashion with twist functioning).
I can't seem to get it working (although I do get some interesting results :))

Boucha
07-24-2009, 04:21 AM
Hello Matt,

Gone through the setup once again and found out a interesting twist in the setup. Whatever we do, use math or any thing advance twist doesn't work properly for joint orientation -x. Its even written in maya documents:

The following limitations and workarounds relate to skeleton and inverse kinematics issues in Maya.

Advanced twist attribute on ikSpline only works for joint orientation +x

The advanced twist attributes on the ikSpline solver assumes a joint orientation of +x.

I don't know why this cannot be fixed even by maya developers :cry: ...

Anyways, I have attached a small file figuring out various methods to fix it, the best method will be to use advance twist in joint orientation +ve axis...

Stellios
05-12-2010, 07:43 PM
Thanks for the help, this advanced twist control limitation sucks. So the best way to remedy this is to mirror your joints so either side maintains positive x running down the chain, and then manipulating the control objects to gain the desired behaviour on both right and left sides?

Boucha
05-13-2010, 03:12 AM
Yuuup, that seems to be the only solution :)

CGTalk Moderation
05-13-2010, 03:12 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.