0
$\begingroup$

I wanted to use the floor bone to save on animation time by making my robot feet hit the ground when stepping and act like a suspension by bending the flaps. Using the flap bone IK to the floor bone (small green bones) but since it can't be connected to the rig to work it ends up not working as it wanders away from the end of the feet bones. As the one on the left of the image is doing.

How do I set up the floor bone to cause the feet flap to keep from digging into the floor automatically?

Basically, when the purple object goes downwards the white flaps should bend from the hinges to avoid going through the floor.

enter image description here

$\endgroup$
  • $\begingroup$ Not sure if I understand your question properly, but have you tried the limit location in world space on the IK-bones? $\endgroup$ – Bert VdB Jan 8 '18 at 13:47
  • $\begingroup$ @Bert VdB Basically, when the purple object goes downwards the white flaps should bend from the hinges to avoid going through the floor. I just haven't been successful designing this. I did try limit location but with no success as it lets the flap go through the floor. In any constraint order. $\endgroup$ – Eric Huelin Jan 8 '18 at 16:08
1
$\begingroup$

You can parent the control bones (the small green ones in your image) to your robots foot so they stay with your foot, they just can't be parented to the flap bone. The easiest way to set this up is to use the IK constraint, so you're on the right track.

Here's the rig that I used to test this out on. It's a simple IK setup with one extra bone as the main foot control and the flaps and control bones parented to the foot bone. The center green bone has a copy rotation constraint so that it follows the IK control bone.

enter image description here

Once you add the floor constraint, you will need a floor, so make sure you have a plane for the foot to collide with. Once you add the floor constraint and have the IK constraint setup as well, it should collide. If it doesn't, see if you can move the control bone manually. If you can't move it manually, constraints can move it either, so make sure you can move each flap manually.

Since it doesn't look like the flaps will move that much in your case (not a huge angle) this next step might not be necessary. However, you may still notice that as the control bone hits the floor, the IK bone will still point at the root of the control bone (as it should), but the distance from the control bone to the root of the flap bone will have shrunk, meaning the tip of the flap bone will dig into the floor a little bit as the tip passes through the root of the control bone (the more the flap has to move, the more noticeable this will be). To fix this, we can use the limit distance constraint on the control bone. Set the target to be the corresponding flap bone. Set the clamp region to Outside so that the control bone will always stay a set distance from the root of the flap bone. The default distance should be fine, if not just click the reset distance while the foot is off the ground and you should be good to go.

Now you may notice another issue. After adding this constraint, the control bone stays at the tip of the flap, but now passes through the floor a bit. I'm not sure why this is exactly, but I think it has to do with how blender handles multiple constraints. A quick fix is to add a second floor constraint to each control bone with the exact same setup, so you have one floor constraint before and after the limit distance constraint. The control bone should now stay on the floor better (in my test is still passed through but only a tiny amount that wasn't noticeable except when looked for closely).

My final rig looks like this:

enter image description here

The flaps have an IK constraint and nothing more.

After recreating this to add some images, it some of the bones seem to glitch after a transform and they end in the wrong position. Once I move them again, they snap back to normal though. This may simply be an error in how I did my setup, but if you have issues with it I will look into it further.

$\endgroup$
  • $\begingroup$ The ordering of the constraints matter! Make sure the limit distance is stacked on top of the floor constraint! $\endgroup$ – Bert VdB Jan 8 '18 at 20:14
  • $\begingroup$ Maybe you should provide some images to support your answer. Your answer gave me a correct result I think. $\endgroup$ – Bert VdB Jan 8 '18 at 20:15
  • $\begingroup$ Thanks for suggestions, I updated my answer. Putting the floor constraint last did make the limit distance ineffective though. However, it had an effect when two floor constraints were used. $\endgroup$ – Brenticus Jan 8 '18 at 20:57
  • $\begingroup$ @Brenticus I appreciate all the effort you put into trying to figure it out. The main problem I had was the floor constraint bone was wandering so I found a way to keep it where it needs to be $\endgroup$ – Eric Huelin Jan 9 '18 at 18:44
  • $\begingroup$ The floor constraint moves it in the direction of the floor plane's normal, while the limit distance constraint moves it in the direction pointing to the target of the limit distance constraint. That's why the toe is never going to be quite perfect, no matter how many times you floor/limit distance. I haven't found a way to make it perfect, outside of drivers (where it's a simple enough task, you just need some trig) or the use of booleaned mesh for shrinkwrap constraints (which are irritating for dependency, resolution/snapping problems.) $\endgroup$ – Nathan Jun 19 at 19:40
0
$\begingroup$

foot.l.limiter.001 >> Constraint = floor
foot.l.limiter.001 Parent = calf_l.001 (Inherit Rotation AND Connected = unchecked)
calf_l.001 Parent = calf.l (Inherit Rotation = unchecked)
foot_l = IK >> foot.l.limiter.001 (Inherit Rotation=unchecked)

To keep the floor bone from wondering is to put its parent bone below and directly under it, this limits its motion to just vertically under its parent bone.

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.