How to manipulate the pivot point
To move the pivot point select the move tool and if you have a full key board hit the 'insert key' key, otherwise hold down the 'd' key. This will toggle between the move tool and the pivot point manipulation mode. (you can use your snapping keys along with this function, so holding 'd' & 'v' will snap the pivot point to a vertex) Ensuring pivot points are positioned properly is very important in the rigging process.
When we are ready to animate an object it there are two things we do every time, the first is delete the objects history and the second is freeze transformations. To delete an objects history go to edit - delete by type - history. (deleting history speeds up a rig and lessens the potential of crashes) And to freeze transformations go to modify - freeze transformations. What does freeze transformations do? If we select the object and move it, look at the channel box we will see that the Translate, Rotate and Scale have changed. When we freeze transformations these changes will zero out meaning that this is now the objects default position.
If we select an object in our scene and put it in a group by pressing 'ctrl' & 'g' keys we will have made that object a 'child' of the group. To see this open up the outliner and beside the group will be a plus icon press this to open the group and inside we will find the objects geometry. The group is the 'parent' and the object is the 'child', this means if we are to move the group the 'parent' the object the 'child' will follow it, however if we move the 'child' it will move independently of the 'parent'. This can be built upon exponentially so the parent group can be a child of another group and will act like a child to that group but still act like a parent to its child object. We can also create these hierarchies by selecting the object we want to be a child and shift select the object or group we want to be the parent and go to edit - parent or just hit the 'p' key. We can also drag objects in the outliner using the middle mouse button into hierarchies.
Lets look a little deeper at these connections in the Hypergraph Hierarchy window and the Node Editor window. First we will create a second object in our scene, now open the Hypergraph Hierarchy window by going to windows - hypergraph:hierarchy. Using the Hypergraph Hierarchy window we will place the second object into the same group as the first object, select the object and middle mouse button drag it onto of the group. You will now see that the two objects are a child of the group. With the channel box open select one of the objects you will notice that it has a transform node and a shape node, but if we select the group you will notice it only has a transform node. This means that the group has no display information, only a information relating to its position in space. (the shape node is whats used to tell maya how to display an object)
Now open the node editor by going to windows - node editor if nothing is visible select one of the objects in the outliner and middle mouse button drag it into the node editor. You will see a shape node and a transform node appear, if we do the same thing with the group you will see that only a transform node appears. What is a transformation node? It tracks how far the pivot point of an object is moved, rotated or scaled from the worlds origin point and will be very useful for animating or geometry.
Lets explore how nodes work before we move on, create an object and manipulate by an extrude and a bevel. Open up the node editor and drag the object into the editor select the shape node and press the 'input and output connections' button (looks like a box with two arrows on it). The node should now show all the nodes connected to it. We will lay the nodes out in a way that makes sense to us. The first node will be the polygon primitive node this is created as soon as we use a create polygon primitive (for example it might say polyCylinder1) follow the purple line running out of the node to the next node which will be on of the modelling tool nodes (for example polyExtrudeFace1) again follow the purple line running from that node to the next these will eventually lead us to the shape node which is using all these nodes to understand how to display the object (you will notice a grey line we can ignore this it is to do with world matrix which is another day) We will also notice a black line leaving the shape node to a shading node this will change depending on what render you are using. Try deleting the history of the object and see what happens to the nodes.
Animating an object
Create a cup, once happy with creation remember to delete history and if you have moved it either zero out the channel box or freeze the transformations. We never want to animate the geometry directly and so we will always be creating ways of manipulating the geometry with out touching it directly. In this case we will drop the geometry or mesh into a group. Open the outliner and select the group (this is a good time to name or objects select the mesh and call it cup_GEO and select the group and call it cup_GRP, try to get in habit of naming as you go) choose a frame on the timeline where you want the animation to start and press the 's' key this will set a key frame on the selected frame on the timeline for all the items in the channel box. We can select individual items such as translate y and only animate that by right mouse button clicking on it and choosing key selected but we will us the 's' key for now. Now move along the timeline and chose the frame where the animation will end and move the object to the position you want and hit the 's' key. If we play back the animation you will see that you have successfully animated the cup with out touching the mesh. This has more advantages than not just running the risk of damaging or breaking our meshes but that we are animating a transform node that can be applied to any mesh. Lets say instead of a cup we want to animate a donut but using the same animation as the cup. This will be easy we will create a donut, take your time, once it is created instead of redoing all the animation we will make it a child of the group which we animated. We will use the hypergraph hierarchy window for this, in the window middle mouse button drag the donut (which we have renamed in the outliner to donut_GEO) onto the cup_GRP you will see the donut is now a child of the group. (Notice that in the hypergraph hierarchy window a node that is tilted to the side means it has been key framed) If we play the animation now both the cup and donut will move, lets use the channel box to hide the cup. Select the cup and in the channel box chose visibility and turn it off by typing in 0 and hitting enter (0 means off and 1 means on). The cup should have disappeared. ('ctrl' & 'h' is the short cut for turning visibility off)
Animating with groups in a hierarchy
With just the cup geometry in the scene, we will create a basic group based hierarchy to allow us to spin the cup and also tilt the cup while maintain a consistent rotation. First we will create a spinning group from the cup geometry. Select the cup and press 'ctrl' & 'g' to create a group which we will call cupSpin_GRP, select this group and create another group which we will call cupTip_GRP and lets create on more group and call it cupFall_GRP. We need to know set the pivot points for our groups, we can centre the cupSpin_GRP pivot, and place the cupTilt_GRP pivot to which ever point we want the cup to tilt on and the cupFall_GRP pivot point isn't important for placing but to keep things clean we will place it on the centre point at bottom of the cup geometry. Now we can animate the cup spinning by selecting the cupSpin_GRP and setting some rotation keyframes on the Y axis (assuming the scene is set up in Maya default). Next we can add the tilt by selecting the cupTilt_GRP and setting some rotation keyframes on the X or Z axis depending where you placed the pivot point and how you want the cup to tilt, once the cup is spinning and tilting to its side we will have the cup fall. Again select the cupFall_GRP and this time we will set keyframes on translate Y.
Lets have a look at deforms as these can be very helpful when we are creating simple rigs. The first thing we need to know when using deformers is how important edge loops are for animation. To demonstrate this we will create a simple box like in the image below, and we'll call it box_GEO, first make sure there are no subdivisions on the box. We will put a simple bend deformer on the box, to do this first make sure the box_GEO is selected and then go to deformer - non linear - bend. If you don't see anything change don't worry first check the 'outliner' and you should see 'bend1Handle' has appeared or select box_GEO and under inputs a bend1 node will have appeared. If we turn the box to wire frame we will also be able to see the bend deformer inside the box geometry. Click on the bend1 node in the channel box the options available are 'envelope', 'curvature', 'low bound' and 'high bound'. Start with 'curvature' if we try to change it by selecting it and then middle mouse button drawing on on a blank area in the viewer you will see something happens but not what we were expecting and that is because of the lack of edge loops, we need edge loops to provide enough tessellation for the bend to happen.
Create another box this time with enough subdivisions for it to bend correctly. (try to keep the edge loops evenly spaced like slideshow below) Reapply a bend deformer and lets try the 'curvature' again, this time the box_GEO is bending smoothly from the top and the bottom. (second image below) The 'low bound' and 'high bound' control the amount the bend effects the bottom or the top of the object, we will change the 'low bound' to zero and the bend will be removed from the bottom of the box. The last option is the 'envelope' and this controls how much the bend deformer effects the box object, try sliding the 'envelope' controller and se that the box returns to its normal shape when at zero, this acts like a blend shape which we will cover later in this course.