View Full Version : Rotation problem
06-19-2007, 05:27 PM
ran into following problem: I set up a rig in Max 8 using a number of bones, constrained to position and look-at in order to have stretchy bones(as demonstrated in CG Academys Rigging DVD #2) I also use some control objects for the bones and evyerthing works fine so far.
When I try to automate the realignment of the control objects(Pin_CNT**)using a float script controller in the y-Rotation things start to get messy. It works fine for the first control object(see file spine_bones_8script1) but when I do the same with another control object my rig explodes(see file spine_bones_8script2).
The script I use is
degToRad ((p0.transform * inverse p1.transform).rotation as eulerAngles).z
applied to the Y-rotation of the control objects in the Frozen Rotation.
Where I'm going wrong, is this possible at all?
06-20-2007, 06:39 PM
I think you've run into a dependency loop. The point helpers you are using in your scriptController are point constrained to the CNT objects. Since the script controller is on the CNT objects the point helpers and CNT objects are simotaniously transforming each other. This is going to give you unpredictable results.
You need to modify your setup so that CNT objects are not controlled by anything that they are controlling themselves.
06-21-2007, 10:07 AM
But why does it work with the first one? An how do I align the CNTs y (and z) rotations to the bones?
I'll have a dig through the file when I get to the office and see if I can give you a solution to it. I think that Stev has the probem nailed down how ever.
06-21-2007, 11:19 AM
That would be great.
Yes, a dependancy loop might cause that, though I don't get any warning. I don't know much about scripting or 3d transformation, that's probably the point.
I dug out a previous version of that file where I directly assigned the rotation of point helper to the handles which works great apart from not being updated and messing up the rotation of the very first bone in the hierarchy(but I'm working on this).
Will post and attach later.
06-21-2007, 11:50 AM
Got it working somehow. See file spine_neu_8+root.max
It's basically the same setup like in file spine_neu_8.max (which I mentioned in the previous post) but I assigned a root bone(Bone00) to Bone01. Bone00 has no function apart from that and will be hidden.
Ah yes, then it is a dependancy loop and here is why.
Bones have a built in dependancy loop if you think about it. If you move a child bone it rotates its parent and if you rotate the parent it rotates the child. So bones are already a dependancy loop that is allowed.
I often get this problem when dealing with twist bone setups where the twist bones are linked into the forearm and the Expose Transform helped will report a dependancy loop and disconnect.
One of two ways can be used to correct this. First you can just turn off the bone property in the twist bone. Once you have done that it will not affect its parent anymore when moved. This breaks the dependancy loop. The second is to parent the twist bone to a point helper or any other object that isn't a bone and then link that to the forearm. This also breaks the dependancy.
I use the first suggestions for games and the later for anything other.
06-22-2007, 01:21 PM
I will try that out.
Thank you and have a nice weekend.
07-20-2007, 02:55 PM
Solved that dependancy issue but ran into the next problem.
When I rotate the control objects(CNT01, see file) around their local X-axis the local coordinate system goes kind wild. I got no idea why this happens nor how to solve that so any input would be appreciated.
07-20-2007, 02:55 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-2013, Jelsoft Enterprises Ltd.