Simple Mechanical Animation

Simple Mechanical Animation

Ok,

I'm delving into a new area for me -- animating using IK. What I want to depict is a simple crankshaft and piston animation to test my understanding of how use C3D's IK animation features. I've watched this tutorial, but I'm such a newbie at this that it glosses over and assumes way too much. Plus, it's deforming a mesh, whereas I'm interested in simple pivot joints. Can anyone point me to a really basic intro on how to "link" joints to meshes?

For that matter, is a mesh even required for what I want to do? Can simple parametric objects be animated using IK?

Thanks for any help you can provide.

-Steve
 

Attachments

  • Image.jpg
    Image.jpg
    30.6 KB · Views: 1,040
  • Articulated Arm.zip
    8.3 KB · Views: 545
Best Attempt So Far

Okay, here's my best attempt at the piston animation so far. In this file I used the Target tag approach as Francois implemented in the first example for the linkage animation. (Thanks for pointing it out, Frank.)

I was hoping to animate just one parameter, but I had to animate both the rotation of the crankshaft and the position of the piston head in order for everything to work. Is there a way to somehow "bind" the piston head to the end of the connecting rod so that it remains "fixed" to the end of the connecting rod? As it is, the animation is far from perfect, as the piston head moves relative to the end of the connecting rod (to which it is supposedly attached).

I've attached the model if anyone wants to improve upon it. If you do, please post your modified version here so that I can learn from it.
 

Attachments

  • Piston (Target).jas.zip
    20.9 KB · Views: 506
Last edited:
Yes, Steve. Have a look at the attached example. Animation was made by moving the IK Handle at various positions and recording the "Folder" parameters. Note that "key hierarchy" is ON when recording.
Thanks, Francois! I'm still studying your example. I tried IK initially, but I was adding skeleton tags and binding objects to them. I didn't realize joints could be used like you're using them. IK might be the best approach for my piston animation after all. I'll be studying your example closely. Thanks!

-Steve
 
Reward for Solution!!!

I'm nearly ready to give up and have just about lost my mind. I can't get this simple animation to work as desired.

It's a simple piston animation. I've tried the IK method, and the behavior is correct when dragging the IK handle to set key frames. However, the interpolated values between key frames result in the piston shifting side to side. It should be constrained to vertical motion only. I've tried a point constraint, and it won't work. I'm at a loss for what to try next.

Scrub through the first 15 frames of the attached file (or run the animation) while looking at a top view, and you'll see what I mean. The piston shifts from side to side. I'll give a cookie to anyone who can solve this problem without having to key every frame! :smile:

-Steve
 

Attachments

  • Piston (IK-3).jas.zip
    24.4 KB · Views: 477
This is far from being perfect, but keep in mind I just made 17 keyframes.

Cheers
Frank
 

Attachments

  • Piston1.jpeg
    Piston1.jpeg
    30.2 KB · Views: 935
  • Piston1.MOV.zip
    59.9 KB · Views: 545
This is far from being perfect, but keep in mind I just made 17 keyframes.
Cool, Frank! Nice rendering too!

Having spent nearly an entire day messing with IK stuff, I went back to the "Target" method you pointed out initially. I could do the animation in 2 keyframes if I didn't have to pull tricks to keep the piston head reasonably constrained to vertical-only motion.

I've attached my "new and improved" version using the Target method. It, too, uses 17 keyframes - only two of which are needed the rotate the crank one revolution. The others are used to "constrain" the piston head.

Anyway, this was sure a learning experience and a bit more of a challenge than I was expecting, but at least I know a little more about animation than I did a couple days ago.

I'd love to see the approach you took if you're willing to share the C3D file!

:smile:
 

Attachments

  • Piston (Target-3).jas.zip
    23.2 KB · Views: 471
Here is another way of doing it. I only recorded 2 Keyframes on the crank_assembly to get the full rotation.
 

Attachments

  • Image 2.jpg
    Image 2.jpg
    37.2 KB · Views: 1,018
  • Piston (Target-3)-1.zip
    24.7 KB · Views: 567
Wow,

...that is so cool&effective.
Very well done François.

4Cylinder.gif


Cheers
Frank
 

Attachments

  • 4Cylinder.jpg
    4Cylinder.jpg
    35.3 KB · Views: 915
  • 4Cylinder.MOV.zip
    99.6 KB · Views: 534
Last edited:
Here is another way of doing it. I only recorded 2 Keyframes on the crank_assembly to get the full rotation.
Yessss!!! You da man! I knew there was a way to use a point constraint somehow! It's simple and effective. I actually tried something similar at one point but confused myself in the process. Your solution is exactly what I was looking for. You've helped me gain some valuable insights and techniques.

Thanks again, Francois! :mrgreen:

-Steve
 
Not yet done?

It seems that the joint acting as connecting rod is extending. As a consequence, the piston motion is incorrect.

It's not obvious for low angle but as the size of the crankshaft increases, it gets clearer.

I couldn't find a fix however. Any solution?

Gerald
 
Hi.
Can´t find that issue. How did you scale up the rod?

With kindest regards
Frank
 

Attachments

  • LongRodPiston.jpg
    LongRodPiston.jpg
    52.6 KB · Views: 478
  • LongRodPiston.mov.zip
    133.7 KB · Views: 435
Increasing the crankshaft "diameter" while keeping the same size for the rest of the system.

Here is the file modified. View it in front view and look at the rod deformation. What is constant is the projection of the rod on the Y axis, not the rod size itself.

Gerald
 

Attachments

  • Piston Target Modified.zip
    16.7 KB · Views: 425
Same as for rigged characters; you can´t simply drag&scale&rotate their components without loosing its functionality when joints&skeleton were involved. You´ll have to disassemble the set up; at least to pull out the skeleton tag - and after resizing you will need to adjust the weighting.


With kindest regards
Frank
 

Attachments

  • LargeCrank.jpg
    LargeCrank.jpg
    34.6 KB · Views: 476
  • LargeCrank.MOV.zip
    105.2 KB · Views: 451
It doesn't look to be related to the skeleton Tag. Joint1 to joint2 lenght is changing with the connecting rod angle. I wonder if it is possible to force a fix length for a joint with Cheetah.

In the attachement, the rod is removed and the joint works like rubber... You can rebuild it from scratch. I doubt it will change anything.

Gerald
 

Attachments

  • Piston Target Modified 2.zip
    12.1 KB · Views: 422
Back
Top