View Full Version : Knee cap - how would I rig this?
02-09-2010, 03:29 AM
This isn't my first rodeo when it comes to modeling or texturing...however when it comes to rigging I am a big ole noob.
I have rigged some leg bone meshes and at the knee joint, I need the knee cap to slide along the rounded bottom of the as the knee bends. So I am not sure how to rig the knee cap to the rest of the chain. (see attached image)
1. Should the knee cap be on a separate set of bones from the ones bound to the leg meshes?
2. I'm guessing I need to have dynamics with passive rigid body collision on the thigh bone so that the knee cap will slide over that mesh properly?
3. The knee cap will be attached to stretchy tendon meshes coming from the top and bottom of the knee cap...do I use Smooth Bind on the tendon meshes and Rigid bind on the knee cap mesh?
Sorry this may be really big...I'm really just looking for a starting point to set it up correctly so that it will function properly in an Unity environment. So faking the animation is not really what I want to do here. I hope I'm not asking "Hey guys, how do you build real aircraft carrier from scratch?"
Any help would be greatly appreciated, and will gladly trade texture experience if you ever need it.
02-09-2010, 01:19 PM
When you say Unity environment, do you mean the Unity game engine? If so, that restricts what you can/can't do. The dynamics idea on a mesh won't work if it has to be exported to game.
One thing that might work would be to add another bone that is a child of the lower leg, parented to the lower leg, which is centered in the middle of the kneecap. Bind the kneecap mesh to that bone, and then set up set driven keys for the range of motion so that it looks like it is sliding over the knee. You could also then smooth bind the tendons to that bone so that they stretch along with the SDK's that you have set up.
02-09-2010, 02:16 PM
what is the actual model?, what is the purpose? a big help would be knowing the resultant goal of this rig, also knowing what program you're using will get you advice from those who know the program best..
Unity is a game engine i assume? well then do constraints work in the engine, (i know they don't in some), because anatomically, the patella positionally stays pretty close to its relationship to the femur but the orientation changes to keep it "aimed" down the shin, so a child joint like soulcialism suggests would work, with an aim constraint pointing it towards the ankle would work
or just sdk it like soulcialism suggests, that works very clean, i just don't happen to like sdks
02-10-2010, 12:20 AM
Great feedback JessR and Soulcialism! Thank you!
Yes Unity environment = Unity Game Engine - and thank you for the heads up on the dynamics not working in there...that was a big question I had. This is my first time dumping "boned" (LOL!) geometry into Unity and I couldn't find the right information on if dynamics were supported through a Maya import or not - in watching the tutorials on Unity I see that you can have dynamics once the model is within the engine, but they look limited only gravitational and simple geometry collision effects. Sorry...I should have asked the Unity import question first.
JessR the final result will be a game that allows students to move the different parts of the body and it shows them how the body works. In this example, they could click on the foot and pull it backwards to watch the knee bend properly. The tendons will be added, but we will make different parts become invisible so that you don't see them, but the parts that are visible still move properly. (the models are not done, because I wanted to make sure I could make this work in Unity before I spent a whole bunch of time doing all the modeling necessary)
Good call on the aim constraint - that is what I was thinking it needed if I couldn't use the dynamics.
In Maya, can I somehow parent the aim constraint to the lower bones so that it will move with the lower bones accordingly? Sorry never used the aim constraint before - I know, I know...freakin noobs!! ;-)
Two questions Soulcialism...since it sounds like you are somewhat familiar with Unity.
1. Does Unity recognize aim constraints?
2. About the child joint in the Maya bones structure, do I pull that from the root joint, knee joint, or the joint that ends at the bottom of the leg and will this negatively effect the IKSolver already in place. Er...rather, should I start over an make sure all the bones are in place before adding IKSolvers. Sometimes these little things make for frustrating experiences and I am just trying to approach this so I am not pulling my hair out or bugging you generous folks too much.
Again, thank you for your help so far - I'll do some experimenting tonight based on what you told me and get back to you with any questions based on my McGrubber attempts.
02-10-2010, 12:57 AM
ok well...yes for a noob as you put it to be trying to build an ANATOMICALLY CORRECT skeleton with tendons and such like that...is a bit like building an aircraft carrier from scratch, but more power to you for trying, just set the ankle joint to be what the patella joint is being aimed at
02-10-2010, 11:37 AM
just to clear up the dynamics thing... generally speaking, the only way to use dynamics in a 3d package and get it into a game engine is to bake it to a bone system. you could use dynamics in this case, but what you would do is have a bone be parent constrained to your dynamic mesh. then whatever movement the dynamic mesh gets would automatically be put onto the bone, which can be exported to game. if that doesn't make sense, don't worry about it, because you don't want to use dynamics in this case anyway.
as far as unity, i don't have any experience with it, but i do know a good bit about game engines in general, so there are certain assumptions that you can make when looking at 3rd party game engines like unity, unreal, etc. this is not an advanced feature for a game engine so it's safe to assume that it should work.
usually you can't export an aim constraint... the way most game exporters work is that you tell them what bones you are exporting, the frame range that you are exporting, and basically all it does is check the translation (sometimes) and rotation (all the time) on every frame and export that data. the exporter doesn't know shit about ik or fk or constraints or anything, it just wants to know where the bone is. that makes it really flexible for the user, because they aren't restricted in their rigging options in the 3d package. sometimes game engine editors can create constraints within some sort of animation editor. you set them up similarly to how they are set up in maya, and then they become dynamic based on whatever animation is being played in-game. sometimes they're called look-at constraints too, if you're trying to find them in the unity docs or something.
i would put the bone under the femur just because the patella moves mostly with the femur. it will probably save you some work, regardless of whether you go with set driven keys or a constraint system. it won't break the leg ik. don't forget that aim constraints don't translate anything, they just rotate. all the aim constraint will give you is the patella always pointing towards the ankle. if the translation doesn't look right, you'll need another way to do it (whether it be point constraints, set driven keys, expressions, whatever)
02-10-2010, 11:37 AM
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.