Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

Simple Piston Rigging

Simple Piston Rigging

layomayolayo
Explorer Explorer
2,839 Views
5 Replies
Message 1 of 6

Simple Piston Rigging

layomayolayo
Explorer
Explorer

Hey guys, as you can see I've made a simple piston contraption, and would like to know how to first constrain the position of the block, and then constrain the orientation of the pipe and block to point at one another, while keeping one end of the pipe stationary. (It's quite self explanatory just looking at the image) I haven't had very much experience in rigging so apologies for the rather simple request. Thanks!

 

 

 

 

riggingquestion.PNG

0 Likes
Accepted solutions (2)
2,840 Views
5 Replies
Replies (5)
Message 2 of 6

stephenkmann
Collaborator
Collaborator

I'm assuming the lower half spins around the shaft, and has a gap for the piston to go thru,

 

you can do you use an ik handle to drive the piston. 

 aim the joint up the piston. and parent it ( or parent constraint) to the spinning drive . 

then key once,  or point/parent/parentConstraint the Ik handle up in the piston housing. 

 

hth

-=s

0 Likes
Message 3 of 6

osidedan
Advocate
Advocate
Accepted solution

Another approach too is to use a combinations of constraints and a locator, and drive all the movement from the crankshaft rotation.

 

I'm attaching a maya file of what I think you're after, just scrub the timeline to see it move. 

 

if that is indeed the motion you want, here's how to set it up. Also, this walkthrough assumes that you have maya set to where the Y axis points up (this is the default, unless you changed it)

 

First off, make sure you are in the rigging toolset , so you can get the constraints menu later:

2019-07-04 14_50_45-Autodesk Maya 2018 - Student Version_ C__Users_dan_Desktop_WORKING FOLDER_piston.png

1. Adjust the pivot of the rod geo to the very bottom of the rod if you already haven't:2019-07-04 14_47_19-Autodesk Maya 2018 - Student Version_ C__Users_dan_Desktop_WORKING FOLDER_piston.png

2. create a locator (create>locator), and place it at the base of the rod:

2019-07-04 14_44_13-Autodesk Maya 2018 - Student Version_ C__Users_dan_Desktop_WORKING FOLDER_piston.png

2. make the locator a child of the crankshaft. note, the crankshaft, not the rod! This will move the locator around when the crankshaft turns.

2019-07-04 14_53_24-Outliner.png

4. now we are going to point constrain the rod to the locator, so that the rod follows the locator: select the locator, shift select the rod, and choose Constrain>point, and click the option box. in the window that pops up, select the following, and hit apply:

2019-07-04 14_55_37-Point Constraint Options.png

now if you rotate the crankshaft you will see the rod follow! now let's aim the rod at the piston.

5. select the piston, shift select the rod, and go constrain>aim and select the options box. In the window that pops up, make the following selections, and hit apply:

2019-07-04 14_59_15-Aim Constraint Options.png

this makes the rod point it's y axis towards the center of the piston no matter where either of them move. 

6. Lastly, select the rod, shift select the piston, and go constrain>point (options box). In the window that pops up, select the following. IMPORTANT! notice we are ONLY constraining the Y axis:

2019-07-04 15_02_46-Point Constraint Options.png

after that's done, the piston will move up and down in the Y, relative to how much the rod moves up and down in the Y. 

I know that's a lot, hopefully it makes sense. Let me know if you run into any trouble, or need clarification. Best of luck!

0 Likes
Message 4 of 6

osidedan
Advocate
Advocate

Edit: the forum stripped the maya file attachment from my original post? Not sure what that is about haha. Either way, here's a video of it working. just let me know if you can get it to work or not given my walkthrough!

0 Likes
Message 5 of 6

layomayolayo
Explorer
Explorer
Accepted solution

Thank you so much! You've taught me how aim constraints and point constraints work. I can't believe someone made a comprehensive tutorial for me haha. This is my first step into rigging and there is much more to learn.

0 Likes
Message 6 of 6

osidedan
Advocate
Advocate

You're welcome! I'm glad you got it to work, and that my instructions were clear enough to follow haha. 

 

If you're interested in rigging/automating things, I'd say another good step would be to look into Maya expressions as well. There is A LOT of power to be had from using expressions in Maya. You can do stuff like drive the rotation of wheels on a vehicle so that it matches how far its traveled. Or turn the hands of a clock based on what frame the time slider is at. Those are just a few simple examples, but expressions really let you do just about whatever you can think of.

0 Likes