Daverave asked if I could make a video on modeling and rigging a three piston actuator.
This tutorial demonstrates how to use the polygon boolean operation to join objects. I also go over how to use aim and point constraints and a locator to rig the actuator so that it behave properly.
Here is what we create:
The tutorial was shot in a single take so there are points where I may stutter or have brain freeze so I apologize.
Here is the link to the video:
The last section on rigging gets a little ahead of me and I have to rush the narration so here are some points that I could not fit in the video.
1. For aim constraints you need an up vector that maintains its orientation relative to the actuator. For this we create a locator and in an actual model that locator would be parented at the top of the hierarchy containing all the actuators so that it always maintains the same relative orientation to the actuators as the entire hierarchy rotates.
In this example I just parented it to the actuator group itself.
A brief description of why you need the up vector is this. Consider what would happen if we use the world Y axis as up. This would work as long as the pistons never rotate beyond 180 degrees. As soon as one of the ends goes beyond 180 degrees +Y would then be DOWN relative to the pistons and they would fly apart.
If you parent a locater to the hierarchy that contains the pistons they will always be in the same relative orientation so UP will always be UP. As Albert would say - It's a relativity thing!
For this system we have 3 aim constraints. When setting constraints you pick pairs of objects. The LAST object picked is the one that is going to get the constraint.
1. pick the bottom piston, then the top piston, pick aim constraint make sure the locator is named and set as the up vector. Set the direction vector to [0 -1 0]
2. pick the top piston, then the bottom piston, pick aim constraint with the direction vector to [0 1 0]. The up vector will be remembered so you don't have to enter the name again.
3. pick the top piston, then the middle piston, pick aim contraint with the direction vector to [0 1 0]
This keeps all the pistons pointing the right way now to keep the middle piston alway between the top and bottom ones set two point constraints on it...
1. pick the top piston, pick the middle piston, pick point constraint (the middle piston pivot will pop to the top piston pivot.
2. pick the bottom piston, pick the middle piston, pick point constraint and the middle piston will pop midway between the top and bottom pistons pivot points.
and you are done.
This system works nicely because the parts are aligned straight up and down. If that were not true then there would be one additional step.
After setting the constraint, the up vector, and the direction vector, the parts will not be aligned if the up directions of the part and the up vectors up direction are not aligned. To correct this you would go to the channel box and adjust the x,y,z rotation offsets until everything comes into alignment. This may seem confusing, but in general the up vector will be parented in the top of the hierarchy and will most like start out matching world +Y but all the pistons and objects with aim constraints in a real world model will not be straight up and down. That is okay, don't panic, just follow the the steps above and after you apply the constraint adjust the offsets in the channel box to get things properly aligned.
The main idea for this project came from the work done by Andrew Brown, who works for Luxology - the maker of Modo. Andrew is a wonderful teacher and orator. I was inspired by his works and the clarity of his presentations. Although the concepts presented here are the same, the methods used in Maya are slightly different, so I hope Andrew does not mind me re-encapsulating some of his work here in the hopes of aiding Maya users.
"If I have seen further it is by standing on the shoulders of giants." Sir Isaac Newton, 1675