I have just opened the can of worms that is transforms in 3D studio max.
I have been setting up a rig that switches between a spline Ik and a plain Fk system.
The basic idea I have is that the animator will be able to swap seamlessly between Ik and Fk without the driven rig popping from one to the other, so I am trying to get the two rigs to overlap each other when they switch by aligning them through maxscript.
Now the Fk rig aligns perfectly to the Ik rig as it is in a simple hierarchy:
$fk_Point01.transform=$ik_Point01.transform
for loop the rest and boom! it aligns and gives me a happy feeling deep in my tummy,
but when it comes to aligning the Ik rig to the Fk rig, just simply applying the transform of the target object to the Ik object doesn’t work. If I remove the Ik rigs parent from the equation it works like a charm, however it needs to have the main control for the rest of the rig to work.
So I am trying to work out where it is going wrong, I have tried multiplying transform matrices by other ones and inverting this transform and not inverting that transform and I cannot seem to get it to work. :curses:
I have read through the fantastic pdf at http://www.isner.com/Transform/IsnerTransformManip_04.htm and it does not seem to make things any clearer to me.
What I think might be throwing the whole issue off is that the Ik rig has several controller layers ranging from position constraints to script controllers driving it.
Any suggestions on a possible way to proceed would be fantastic!
I have no solutions but just some support- I have had to rewrite the PuppetShop IK/FK snap algorithm and revise it probably 6 times, and it still has issues (though less than it had). So get ready for a headache.
Some images and/or diagrams would be helpful in diagnosing your issue.
Anyway…the challenge with 3dsMax is that internally it has various …what’s the word…‘patches’ to make everything work reasonably well together.
Like constraints, inside list controllers, with parenting or no parent, link controllers, euler versus quaternion etc.
Its a pretty big ‘soup’ of crazyness.
And even though things work reasonably well, there are easy ways to ‘break’ things.
Like putting a rotation constraint in a list and adding another layer and trying to rotate along a specific axis can give really wonky results.
So the more complex layers of rigging you have, the harder it becomes to write a single function that can handle all cases for snapping ‘IK’ to FK.
If your system is more closed off (i.e. character studio) you have more control over what happens internally. But with i.e. Puppetshop, its mostly structured around 3dsMax build in controllers and rigging tools, so then it becomes more difficult.
hehe, its great to see that I am not the only one who finds max a little, uh, silly. I will try to get an image or two up with some more details but failing that I guess that bit of functionality will just have to be scraped until my knowledge increases
We made a custom rigging system here with ik<->fk and it works smooth. The transition is totally seamless. We had a lot of headache however and the rigging system itself is not very complex in terms of several animation controllers.
The knees and elbows is where we had the biggest issues due to the lookat vectors used in the ik rig to rotate the knees and elbows.
What we did to solve this is to create some helper controllers for the fk rig and align those.
If you could be a bit more specific about your issue we might be able to help.