Blender IK madness

Vitus

Resource contributor
Hi folks!

After days, I finally finished modelling my gear and started rigging it:



But I have a problem with the screw-drive that pulls the main arm with the undercarriage up. I rigged it using an armature with three bones. The first one is linked to the wormgear on top. Connected to that bone is a bone that is IK linked the bone of the main arm. It is set up to contract along its axis to allow the movement of a nut, at the end of the arm, along the threaded shaft. The nut itself is set as a child to the little bone connected to the IK bone, however it has no constraints applied and the IK Stretch is set to 0. I hope this all makes sense...

The problem is that this little nut-bone seem to scale with the parent bone of the thread (KF 0-50-100):



There are also no KFs assigned to the nut or the bone that parents the nut. So I have no idea where this transformation comes from. I hope someone here has an idea.

Cheers,
Vitus
 

Vitus

Resource contributor
Oh no, I forgot to update this thread.
So I solved this issue a while back, by adding a bone constraint to the tiny wormgear bone. I constrained the scale and set all three axis to 1 and now the gear will only move, not scale. Great!


But now I've got a new problem. The animations won't show up in the sim.

To preface this: there currently is an issue with armatures in the publicly available version of the Blender toolset. I spent some time to fix this and we're currently working on the next update for the Blender addon which, apart from other things, addresses some problems I found with armature/bone animations.

That being said, I was hoping that someone here has experiences at least with this with the previous version of the toolset for Blender 2.79 and can give me some pointers.

Soooooo I parented the individual parts of the gear to the various bones. I selected the part I want to pair, then the armature, went to pose mode, selected the appropriate bone, pressed Ctrl+P to parent and selected "bone" from the list of options.

This works fine in Blender, as far as I can tell from my limited experiences, this is the way to go.

I then went on to attach the animation tags and just to be safe, I tagged the armature, each bone (that's only possible with the current WIP version of the toolset) and each of the gear components.

Exported the model to P3D aaaaaaand the animation doesn't work, everything stays at keyframe 0.

Any ideas what I'm doing wrong? :scratchch
 

Pyscen

Resource contributor
Vitus

Just wondering if it would not be faster to put it through MCX? Have you looked at the default jetway, which uses bones, etc? It might help in determining the cause.

That is weird how it is scaling. Is this part weighted or have any constrictions of movement? Maybe only giving 1 bone being the parent and the rest follow it. Sounds like you have multiple parents - so to speak.
 

Vitus

Resource contributor
Just wondering if it would not be faster to put it through MCX?
Possibly, but I'd rather have everything working directly from Blender. I'll update the addon if necessary, but my problem is that I have 0 idea why nothing gets animated in the way I did it. I ran a test a few days ago to check the new bone-animation functionality. In that case I had a skinned mesh animation and that worked just fine. This time around I want the parts to simply follow the movement of the bones, without the skinned mesh material. But I think one issue is that when you parent a bone to an object, the hierarchy doesn't change. It's like Blender is adding some internal flag to set this relationship and it's possible that our toolset doesn't take that into consideration. But that's just my guess at this point..

Have you looked at the default jetway, which uses bones, etc?
Since I never looked into sceneries, I don't even know how to access the default jetway. How would I go about doing that? :D


That is weird how it is scaling. Is this part weighted or have any constrictions of movement? Maybe only giving 1 bone being the parent and the rest follow it. Sounds like you have multiple parents - so to speak.
I'm still learning how Blender deals with armatures, bones, constraints and all that and I am probably just lacking understanding. For some reason the child-bone seems to copy the scale transformation of the parent bone and I don't know why it's doing that and how to switch this off - other than constraining the scale as I did.
But the purpose of Inverse Kinematic is exactly that you can work out a valid path of an object with multiple constraints or, in this case, IK relationships.
 

Vitus

Resource contributor
I looked further into this and I believe that the main issue lies with the exporter. For Blender, bones are special kind of objects for which the relationships are handled differently. At the moment our exporter doesn't take those type of relationships into consideration and as long as my question over at blenderartists.org doesn't get answered, there's not much I can do about it.

So I thought about a different approach that solves this problem at least for now. Is it possible to somehow convert a parent's transform, including the keyframes, into the child objects? I figure that the method to create my animations would be to "bake" the bones' animation into the various parts of the landing gear and then delete the bones from the scene altogether.

Did someone here do that before? If so, how?
 

Vitus

Resource contributor
aaaah, nevermind. I found it.
Here's what you need to do:
1. select the armature and all the objects that are animated by the armature.
2. change to pose mode.
3. Select Pose->Animation->Bake Action
4. type in the frames you're interested in, deselect "Only Selected Bones", enable "Visual Keying" and enable "Clear Parents". Also change Bake Data to "Object"
5. Click OK.

This will create keyframes at every frame for the selected objects. You can now go ahead and delete the bones if you choose to do so. The animation will still work.
 
Top