Spider-Robot Leg Rigging in 3DSMax - IK-HI Solver Problem


#1

Dear experts,
I’m trying to get a rig to work but I can’t figure out how to achieve it.
I’ll go direct to the point: I need my IK Rig to be able to pose in a way so the wheel stays under the body of my Spider Robot.
https://dl.dropboxusercontent.com/u/44444069/CGSociety/Leg_Rig_1.jpg

This would be the Goal: https://dl.dropboxusercontent.com/u/44444069/CGSociety/Leg_Rig_Goal.jpg

The rig is pretty simple: three bones and two HI Solver IK Chains, all driven by the dummy aligned to the wheel axis.
In order for the leg rig to work properly even after it turns at the hinge, I’ve defined an IK solver Plane, targeted to the point between the two dummies:
https://dl.dropboxusercontent.com/u/44444069/CGSociety/Leg_Rig_2.jpg
This point stays right in between the dummies through a Position Constraint.

The problem comes when I try to position the wheel under the body.
https://dl.dropboxusercontent.com/u/44444069/CGSociety/Leg_Rig_3.jpg

When the target point of the IK Solver Plane reaches the hinge axis, upper dummy and target point align, not giving enough info to define the plane, and beyond the axis it induces the whole system to mirror, which is definitely not what I need.
https://dl.dropboxusercontent.com/u/44444069/CGSociety/Leg_Rig_4.jpg

Unfortunately the upper dummy must stay aligned with the hinge axis, otherwise the rig doesn’t work properly when it turns at the hinge.
https://dl.dropboxusercontent.com/u/44444069/CGSociety/Leg_Rig_5.jpg

Would it be possible to set the IK Chain in a way so it wouldn’t mirror?
Or maybe set up another system better than the position constraint, that could keep the target point in another position far from the axis, but yet defining the right IK-Solver plane?

I’ve followed the first steps from Özülkü’s tutorial since our models look much alike:
//youtu.be/G3v0sCxTGFQ

However, he doesn’t run into the same problem I do, because the spider’s foot never goes under the body.

Here’s a link to the Max file (2014) in case someone would feel like trying other solutions.
https://dl.dropboxusercontent.com/u/44444069/CGSociety/Rigging-Leg%20_test-CGTalk.rar
Any hint or help would be quite appreciated!
Thank you all for your time.


#2

The very first joint point up. When the second joint rotates into a 180 position compared to the first the flip happens.

Easy answer… Don’t do that.

So instead have the first point horizontal pointing out from the rig. Make sure that the up node that you have set is set as far out in front of the rig as possible in the extreme out pose. This should give you the flexibility that you are after. Unless I have completely missed the problem and you should refer back to my easy answer.


#3

Dear Mr. Neale,

Thank you very much for your answer.
I guess the mechanical joint I designed is a bit confusing, so I’ve done a simplified version for the sake of this Thread.
Image 1

As we see, the only thing that makes this rig a bit special is the fact axis 1 & axis 2 intersecting within the same joint.
Again, the goal would be to get the foot under the body, but of course while the whole rig is working properly turning around all 3 axis.
Image 2

If I understood it correctly, after applying your easy answer the system should look something like this:
Image 3

Well I’m certainly missing something here because I can’t get the system to turn properly as soon as the upper node goes away from the axis 1.
The hinge, however, could be probably be turning independently by setting up a look-at constraint, or linking it to a first bone pointing up like it was before (bad practice, I know)
But let’s not worry about the hinge now; let’s make it even simpler. Just two bones and one IK Solver with the middle point between the two dummies as the Plane target.
This time the upper node stays within the axis 1 so the target point provides the right information to conform the plane together with the start point and goal of the IK Solver.
Image 4

Now this is the only way I get the system working all right, turning nicely around all three axis wherever I move my control dummy.
Image 5

Wherever except under the body, that’s the issue. Once the target point moves beyond axis 1, the solver plane flips and so do the bones and the geometry linked to them.
Image 6

I’m sure there’s another way to set up this rig to make it work as it should, but I can’t figure out how. Could Scripting be useful in this case?
A link to the file can be downloaded here:(3dsMax 2014)
Robot Leg_ simple
I’m sorry if I didn’t get the point of your answer. I’ve started learning rigging recently and there are so many things I don’t know yet.
Thank you again for your help!


#4

I may have a bit of a solution, If you use an HD IK solver, you can define and lock angles of freedom in your IK chain.

Disclaimer: they can be slower than HI IK solvers, and aren’t the most friendly, but you can probably get what you want out of it.

I set up a quick test of what I think you are trying to get. It had some wobble when crossing under the start joint ( where you were getting the flipping ) but by dialing up the easing and damping on the first joint I was able to get it under control. I did have to turn up the iterations a bit to get the motion smoother, and the end joint finding the target more accurately, but I didn’t notice any speed problems.


HD_IK

Second Disclaimer: I have never used an HD solver in production, so I cant verify its usefulness, or reliability.

I messed around a little bit with running the HD solver over just the last two joints, and setting up an IK or Lookat or something for the hinge part, but didn’t get anything worth sharing after messing with it a bit, but I imagine you can figure something out as a combo, or someone else here might have a bright idea.

I attached the max file with the simple setup

Hope this helps!


#5

Howdy,

Does the IK in 3DS Max have a twist function?

Adios,
Cactus Dan


#6

Hey Aaron Thank you very much for your help.
Getting some advice from such bright people as you and Paul is just amazing.
Yet the problem’s still there, even using an HD Solver.
While testing from the left view, it looks like is working all right and we get the foot under the body without any visible issue. But as soon as we move the IK-HD goal out of that plane and try to put it under the body, all the system start flipping again.


Leg_Rig_HD solver

I’ve noticed this happening also in the test file attached with your post; despite the easing and dumping corrections, the wobble still exists.
Here’s the Link to my HD solver Try: Leg_Rig_HD_Solver _version

I’m quite new to rigging, but I guess this rig doesn’t look like something advanced at all. I’m sure there must be a way to make it work properly!