View Full Version : Full Body IK Rigger
09-16-2009, 01:55 AM
Ok so I've decided to take on the challenge of creating a Full Body IK rigging system using a couple of custom dotNetClasses, script controllers and maybe custom attributes to keep it from being name dependent. The thing is I've realised my Math is really holding me back. The transformation math will be handled in the doNetClasses so I can't use maxscript math functions. I need to be able to calculate the position and rotation of a bone based on the transformation of its parent bone. If anybody has any suggestions please let me know. Ill definitely give credit to those who can help me with the math
Here's what functionality the system will have;
Creatable Bones with twistable, stretchable and scaleType options
Creatable custom muscles
Assign multiple children and parents(mainly for doing facial systems) to bones and muscles
Assignable control objects
Buttons to remove bones and muscles and controls from the system
Range of tools for quickly creating Bone Chains
and more..... (when I can think of them)
I have most of the functions written out so shouldn't take long to code when I have figured out the math
So a transformation is basically a representation of 3 axis' in 3d space, with a 4th axis being positional offset from an origin.
The length of each of these axis denotes the scale along that axis - known as the unit length. (1.0 being the default)
All transforms exist in a reference space, nothing is truly world space, more a case of getting the difference relative to the system space i.e max's space XYZ.
When an object is a child of a parent, its reference space exist about that parent. Doing child.transform * inverse parent.transform will get the relative difference in an object to its parent. The objects dont have to be parent though, you can get any objects relative space to another.
Transforms have to be orthogonal - that is each axis' of the 3 has to be perpendicular to the other. If not, sheering happens.
Personally I think the transformation math would'nt be too hard - you'd have to deal with cyclic dependencies first i think. Plus getting it to work with the undo system.
Basically its this - pull the hand > pulls the arm > pulls the shoulder > pulls the torso - but also vice versa and in between - e.g. pulling the elbow.
Im sure theres some dot net classes for matrix multiplication - i dont think you'd have to build each row and do right hand rule stuff on it.
I don't think that you want to do the math in dotNet as the conversion to and from dotNet is slow. There are excellent matrix functions in Max that can handle this.
I wonder how much slower, there's some nice matrix stuff inside : http://www.codeproject.com/KB/recipes/psdotnetmatrix.aspx
09-16-2009, 04:49 PM
Thanks for the math help eek. I've got a clear head now and it all seems relatively simple. I don't think cyclic dependencies are going to be a problem the way I picture I could be wrong. The undo systems will definitely be a problem and that's probably another reason why I should do the math in Maxscript. Another problem is making it keyable. I'm going pseudo my ideas and figure out my options. I think I may avoid dotNet all together or just use it when creating the objects to automate the setup of the scripted custom attributes. As pauls said it will be slower converting to and from maxscript.
09-16-2009, 05:18 PM
The transformation math will be handled in the doNetClasses so I can't use maxscript math functions.
that's not a good idea. MAX matrix functions are pretty fast and memory friendly... dotnet doesn't have classes to work with 3D matrixes.
09-16-2009, 05:18 PM
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.
vBulletin v3.0.5, Copyright ©2000-2015, Jelsoft Enterprises Ltd.