Jump to content

Blender animation constraints question


Myst42

Recommended Posts

Ok this is related to my animation project, which Im happy to say is coming to an end

 

But this one is tricky, so I could use some professional advice

 

I need to lock a bone to the ground, like putting a nail trough the foot, so in the process of making the animation, it doesnt move AT ALL

I had been using the Inverse Kinematic Constraint, to make some effects, but I need more locking

The IK constraint limits its owner's movement a lot, but not entirely, the bone still has movement and I need it fixed. Locked to the ground. No movement. At all.

 

What I tried:

 

 

I tried to use the limit location/limit rotation constraint

250px-ManConstraintsObjectCxtLimitLocati250px-ManConstraintsObjectCxtLimitRotati

First I experienced the problem that I couldnt set the right position in space

If I press N in pose mode, I get the bone's coordinates to be 0,0,0, I did get some rotation values

I figured those coordinates are "local space"

So I tried to put those values into the constraints

ManConstraintsCSpaceBone.png

Local space doesnt do anything and its worthless

The other three send the bone to a random location away from where its supposed to be

 

Limit loctation in local space with coordinates 0,0,0: WORTHLESS, doesnt do anything in this set up

Tried changing the space to world space, but I needed new coordinates

So I tried creating an empty object at the bone's position to determine its coordinates in world space and then use them as limits for location

Did this by pressing Shift+I, which calls the Inverse Kinematics menu, but it also can create an empty object at the bone's tip.(then I deleted the IK constraint)

Limit location in world space using empty object's coordinates: worked

 

But I still had the rotation problem. I cant figure out a way to determine what number to put in there so it actually works

Limit rotation in local space with rotation values from bone: Half-worked

At least I could set the right bone orientation, but it conflicted with limit location, so the foot stretched a bit.

Also discovered is still worthless, cause the bone still rotates when i move the leg (limit location didnt present this issue), meaning previous chained bones, and the whole point of this is nailing a foot to the ground so to speak...

 

 

 

So is there a way to continue from here?

Is perhaps a better way of nailing a foot to the ground?

Another constraint, another feature... what?

Being used for so many animations I figure there MUST be a way to immobilize a bone in an animation right?

Link to comment

you could try limit location. it will keep the constrain to certain offset. if you know what the real coordinates are. Limit rotation is other way around it will prevent you to rotate a bone a certain part. when pressing the r key. limit so let say you want the bone to not move at all open limit location and check all

 

you need to check the options minX minY minZ you have to check all 6 options minX minY minZ maxX maxY maxZ and cspace i think needs to be local space. and for transform also needs to be checked if keep all 0 you should not be able to grab that bone anymore even by pressing g it should stick like a rock on the same position.

 

Under armature bones tab there is option called Hinge or something like that by activating this it will no longer be influenced by the bones above it like it always does if this option is not used. Should also work the same way i think.

 

So let say you have foot and you want you ik contraints to not influence the foot you can temporary use hinge so when you use the upper foot the foot itself will keep pointing the direction it is already facing. so even rotating the upperfoot should keep it in place.

Link to comment

In the spoiler I said what I did, so yes I tried limit location and pushed all the buttons, tried limit rotation too, but it still didnt work, limit location in local space got me the bone fixed, but only when grabbing it, moving the rest of the leg still moves it like the constraint wasnt even there

 

Hinge... has the same effect, the leg still moves the bone

 

New combination tried:

-2 IK Solver Constraints one for the feet's tip and one for the previous bone

-the one on the tip with chain lenght = 1

-the other one can go upwards to the hip

-1 limit location on world space (local is useless

That gets it done

The limit location is where Im getting trouble, cant find a good way of getting the world space coordinates for the bone, adding an empty object with IK menu places one to the tip of the bone, but the true coordinates of it are on its root (not the skeleton root, the bone's root)

But it looks ugly as hell when trying to move anything...

So even If I were to get the real coordinates, still not the desired effect...

 

Uhhh...  :(

Why does it have to be so freaking hard?

All I wanted is an effect similar to Inverse kinematic but with fore fixation to the chain's end...

Why cant they just make it easy to simply lock a bone's position?

And I KNOW for a fact there must be a way of doing it... Ive seen the vanilla animation for casting in Oblivion Im trying to replace and there is no movement to the last bone in the foot. 0 movement. Nada. A perfect Inverse Kinematic or Closed Kinematic chain as its called in physics...

 

Im starting to feel like I need to go to the Rant Thread...

Link to comment

I think you are misunderstanding the concept behind IK or bones in general or i am misinterpret what you are asking.

Even with IK you will be able to keep the feet on it's position to certain length but going beyond this point will auto make the bones the follow the one above it.

 

Because the one above it tells it it must follow me now. because it is master from the one under it. if you really want the bone to stay in position you need to clear it's parent bone. because it the parent bone who is telling the bone to follow so that probably what you are facing.

 

Also clearing the parent bone is bad idea due to how the mesh will be stretching now. if you move the bones too far.

 

Is something like this you are trying to accomplish ??

 

 

As you can see with the bones stay put till you move it too far from ik bones then it will follow the body the normal way but keep pointing at the ik bone it self.

Link to comment

Something like that but more related to bone position...

 

Attached file is a vanilla casting animation

Im trying to make a better one

 

CastVanilla.rar

 

Notice the left foot last bone which i had selected at the time of saving

It barely even trembles.

Also the right foot bone, doesnt move at all from frames 2 to 27, only the ankle but never the foot

Ive used IK to similar fashion but never to this degree of accuracy in maintaining the foot still... not with this much motion going through the rest of the body

 

Or perhaps they just got lucky so the foot didnt moved much... but seems unrealistic, seems more like the efect of some other constraint besides the normal IK

Link to comment

I see it now:

ISeeItNow.7z

 

When i first posted you that zombie rig i also said it was not very good idea too jump on something like this.

 

When i gave the shortcut key about Shift i i also thought you used i loc rot on it in should give you yellow marker that spot been pointed you see: when you used shift i the empty object is not part of the skeleton so you have to use i loc rot on it too when you animate or else it will not where to put it.

 

zombie rig i uploaded has new boned directly edited to the zombie skeleton. so when you select with a all constraints are also selected because they are all part of bip01 using shift I this is not part of bip 01

Link to comment

Hmmm...

What you said sounds  a lot like another way of "making constraints work" or the official term which is "baking constraints"

 

Some time ago, when I first tried to use a constraint nothing happened because of what you said, the other object is external to the skeleton so its not respected by the final exported version

Baking constraints function takes care of that by creating a copy skeleton that mimics the original constrained skeleton which is now totally erasable.

 

Heres Is what Im doing

Cast.rar

Still have a lot to refine even after I pass through this foot issue

Thats a casting animation for throwing fireballs and i intend to use the same one for touch spells, and a similar "mirrored" version for no weapon, using the right hand and doimg some other gestures with the left arm

 

It has an IK constraint in the left foot, thought it is for purpose of designing the animation, once Im happy, its gonna pass bake constraint process to make it functional in game

 

In this one notice that unlike the vanilla casting animation, even with the IK constraint applied, the foot bone moves a lot more in my project than in the finished vanilla version

 

I could apply the IK to the last bone instead of the one before, but the effect is worse

And if I put IK in both the last bone and the one before, the last joint between the two is the one that moves

Link to comment

When i create a ik constraint for the foot i always make sure there are 3 bones in this IK. One i call heel this will keep the constrain in place the other one is foot this can be used to rotate just the feet. And the 3rd is knee witch is a target bone.

 

When you setup the ik constrain and open that ik tab don't you notice there are 2 options ?? pole target and target ?? Target is what you use to setup the bone, pole target is how you point the feet at. Like the knee.

 

foot will have a hlp_foot for me is what i use with copy rotation of this bone, this will make sure when i use r key on hlp_foot will allow me to rotate the feet only calf bone is what i use to ik my hlp bones at.

 

so under calf bone in skeleton i will setup the ik and make sure that hlp_heel will point below so when i open ik tab i use hlp_heel as target and knee will point farther away at the top of calf bone right under thigh bone this so hlp_knee will put under pole target. Check my zombie rig it is actually the same as the vid here.

checkFootIK.7z

Link to comment

Ok I see what you mean, thats how it should look, but you got me a little confused, but I think Im getting the point now

 

In the zombie rig, I noticed 3 main points

-It has 3 main extra helping bones for that particular effect. One used to maintain rotation on the foot, one to use as IK target for the calf placed at calf bone's tip and the other in front of the knee

-The foot bone has "copy rotation constraint" to its target bone which I figure keeps the the foot's orientation in place

-The calf bone has IK targeting a bone directly below it, which i figure keeps it in place, and a pole target which keeps the knee facing forward from what I see

 

I tried to simplify things and generally this is it, right?

 

The main problem is I didnt want to create new bones cause first I dont know what will happen, will it still work once I bake them into the copied one and delete the "helper bones" after? And second Im not sure how to create them right. In blender is easy to screw up things when they are not done correctly, I figure its not a simple matter

 

So between these 3 things, rotation was never the biggest problem, the pole bone, kind of limits the knee rotation forward so I guess all the magic resides in the target bone for IK being inside the skeleton and thats why the ankle joint stays still like I want for my animation right?

No matter how low you get the rest of the body, the ankle always stays there

With target created using Shift+I the target is in the same place, but the IK is not as locked as with the other case

 

Sorry for not knowing some stuff... 

Im not professional just free time modder and this is hobby, my work has nothing to do with computers, programming or design, so Im half experienced/half newbie when it comes to this stuff

You said not a good Idea to start in this, but I dont want to start making animations, I want to finish my animation project, see it done and then never see an animation again  :P ...well... I cant promise that...

Link to comment

Tried again to do it creating new bones, but as I thought there is something im missing here cause I still cant get the desired result

 

I took that zombie rig and it has a lot of stuff I wasnt interested at the moment, so i started deleting features that were of no use to my purpose and left only the ones that create the effect. Ended up with a body mesh and a skeleton with only 4 extra bones for 2 IK chains. I would be satisfied If I could make my animation behave like that.

-One constraint is IK which locks the ankle in position

-The other is Copy rotation which holds the foot in position

 

Tried it on mine, copied exactly the same parameters as what there was in the zombie rig, I only need 1 IK for now, so I made 2 extra bones. The IK locks just fine

But the Copy rotation doesnt work at all, it does nothing and even worse I cant even move the pose without it deforming permanently instead of returning to position like it should. (Normally it takes the I key to record a frame and now it doesnt, and the auto record button is NOT pressed)

 

Words.. words... they cant explain enough so I ask anybody willing to help with more knowledge on this to please take a look and see what am I missing that I cant get to the point even if I copied exactly the same organizations for things...

 

In file:

-Zombie Rig wig everything deleted except for the absolutely necessary

-Cast animation project with half working Constraint set up

Anims.rar

Link to comment

If your real hellbend on the rigging i suggest you to start using google search engine and start putting in it rigging for blender 2.49b

Even though this is for blender 2.6 you can still use the same principle for blender 2.49b:

 

http://cgcookie.com/blender/2011/12/12/blender-introduction-to-character-rigging/

 

 

this blender advanced footrig:

http://www.youtube.com/watch?v=CHdp7Os8l5Y

 

Good luck.

 

I checked your blend file and you still did not see the clue in zombie rig : why is your target_calf part of the calf itself ?? if you checked my rig properly you should have seen that foot rig was pointing to bip01 not calf then when you grab that target calf you can move the the entire upperleg around. The way you set it up it is part of the calf and when you move target calf it does nothing because target calf is a child of calf and it can't move that.

 

Here is you fixed up file:

 

 

 

 

Link to comment

Ahhh there it is!

So all I was missing was I had to create the extra bones from Bip01?

Tried It as experiment and It finally works!!... thank you too for the fixed version, and for the enlightenment

 

The only thing that Im a little confused now is whats the best way to set up the new bones so they are in their rightful location. When I created them from Bip01, I put them in Edit mode to where they were supposed to be, but in Pose mode, they were anywhere...

So I guess my last doubt is now how to position the bones in pose mode to their right location... but I get the sense doing it manually is the only way and Ill just to figure something out

 

But for the purpose of learning and making it look good, it works already, and also tried to make a baking and then replacing only the desired effects and deleting the extra bones just for the safety of exporting. The animation played correctly in Blender, no extra bones, all frames copied an pasted from baked version, just like if the constraints and bones were still there. Didnt tried it on game still, but there shouldnt be anything wrong with it.

 

Now Im pretty sure I definitely have whats needed to finish my project, and I really hope I dont bump into such hard issues again...

I only need to tweak some walking and running animations, which I already have for forward and backward directions, I need the side ones, add some breathing and oscillation to a few Idles, which with this new knowledge on proper IK constraint shouldnt be a problem, finishing this casting animations and Im done!

 

I cant thank you enough for your patience and explanations

Im no pro, in design, animation or even software... like I said, I know a some things few people know about it but I still consider myself a newbie, even If Ive made in the past things that are difficult to many other people

 

Thks again!  ^_^

Link to comment

When i start placing bones in edit mode. i don't duplicate all bones but just use the E key witch extrude key from an excisting bone then just use the either y x z key to point in the direction it needs to be.

 

So in this case it was calf witch was pointing down so i select the tip of the bone press E then Z key to move it down till it touches grid axes.

 

As you noticed since i extruded it from calf it is currently auto placed under calf bone so this new bone is child of Calf, but then i just switch the child of and point it to bip01 and then it is set and rename the bone to heel or usually hlp_heel. For the foot bone is different since i want this bone to actually be able to rotate the foot then i use duplicate of the foot bone. then point to be part of the heel bone we just created and rename it hlp_foot. for the knee i will just use the extrude again and now move between tigh and calf press the e and use y to point forward make the bone slightly bigger so i can actually see it. and deselect child of temporary so i can move the bone forward then when it is placed correctly make it part of hlp_heel.

 

So now when you switch to pose mode and open scene root append bip01 you should see this bone hlp_heel expand that again and there should now be 2 new bones hlp_foot and hlp_knee and now you can start making constrains.

 

I never make the full rig in one i just take it small steps at a time. This way it easier to see if anything is wrong go back to edit mode and fix it again.

Link to comment

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use