Tuesday, 23 October 2012

Post 3 - Advanced Leg Rigging

Now with the car completed we have gone back to the leg rig again, though this time we will be going further to create a more advanced rig.

Like before I created a basic leg using the joint tool, but from this I first checked the orientation for each joint to make sure everything moved how it should. To do this I selected each joint individually and chose the local rotation axis option. This shows the direction the axis is pointing in each joint, and as this had just been created from scratch they were a bit off. To get them how they need to be for this to work, the axis in the joints needs to be the same as the world axis, meaning Y should be facing straight towards the next joint, with Z pointing forward and X pointing to the side.

This is achieved by selecting a joint and then going to Skeleton > Orient Joint where by we have a number of options to align the axis correctly. As the primary axis orients down the bone, the second orients forwards and the third orients sideways, in this case the joints were orientated to YZX.

Below is a picture of the final outcome, showing the joint orient options and the joints axis after aligning.



Tuesday, 16 October 2012

3D Rigging - The Car Rig

Post 2 - Rigging A Car 

Now we had learnt the basics of rigging we started the task of rigging the whole of a car. To do this we first had to obtain a car model from a free 3D model site, and then once in maya begin to group main parts of the car. 

To do this we selected the parts of the model that we wanted to group and pressed "G" on the keyboard. This puts them in a group, which you can further re-name. Re-naming anything in the outliner is a worthwhile thing to do as once the rig becomes more complex, without naming parts of the model, it will become much harder to find and work on specific areas. As I was saying though, I grouped all the main areas on my car model, which for me only ended up being the body and the 4 wheels separately. As I mentioned though, naming groups is important as well as using certain terms to help further find areas quickly. 
Below is a picture of my outliner with all the separate parts grouped, named smartly and made easily identifiable with the word "grp" at the end just to show it is a group. 


Next just before I started to rig I set up a custom shelf in maya for tools I would be using frequently throughout the rigging process. In this case it was the freeze transformation, centre pivot and delete history options. 

With everything set up I began to create a controller for the wheels to be steered left and right. To do this I used the EP curve tool, with curve degree set to "1 Linear" and Knot spacing to "Uniform", snap to grid set on and in top down view to create a double headed arrow shape. With this I then applied a bend deformer, and with some tweaking was able to get it to curve around the front of the car. 
Below is a picture of the outcome

With this new controller, I froze the transformation and deleted its history to make sure it was clean and ready to use, then finished off by adding a name to the controller, in this case being "Steering_Control".

Now to make sure my wheels were set up ready to be rigged up to the controller, I selected a wheel and created another group of it so that only this version of the wheel would move with the controller. I then moved the pivot point into a better position, this case being the edge of the axle so that it would steer how a real car would. Below is a picture of the pivot set up for steering.


Now to finally make the controller turn the wheels I selected the controller first and then the wheel, went onto Constraint and down to Orient so that they were both connected and then finally went into the attribute editor of the controller and changed the rotation order in transform attributes to Z,X,Y to try prevent gimbal lock. 

I then copied the process I did on the first wheel for the second wheel on the front of the car so that they both turned together. 

Below is a picture of the final outcome for this process, the controller turning the wheels how they should. 

Next I added wheel rotation, and like before I started with a controller that I made using curves and once I was happy with the look and placement, I froze transformations and deleted its history. Also as I was making this for the front and back wheels I copied the first controller and named them accordingly on where they were for example "Front_rotation_controller" for the wheels at the front of the car.


From here I did similar actions to setting up steering, by creating a group within the steering wheel group and then realigning the pivot so that it was in the centre of the wheel. I then selected the controller and the wheel rotation grp in that order and orient constrained them together. Finally I went into the transform attributes again and changed the rotation order to Z,X,Y. 

This process was near identical for the back wheels, though Instead of worrying about creating this wheel group within the steering group, I just did it at the top of the group. 

Although I cant get a photo of how the wheel looks spinning, here is a photo of my Outliner so far.


With the steering and rotation now done I moved onto the third and final movement for the wheels, the suspension. Because of how the suspension works, having this group below the two previous ones would create gimbal lock, so to stop this I created the suspension group for each wheel at the top of its own hierarchy.
I then moved the pivot into position which in this case was at the base of the wheel and created another controller which would go below the wheel. After freezing the transformation, deleting the history and renaming the controller I went to Constrain and into Points options where I changed the constrained axes to Y, making the wheel only able to go up and down. 
I did this step for each wheel separately and below is a picture of the final outcome, showing the outliner and wheel groups. 

3D Rigging - Lesson 1 - 25/09/2012

Post 1 - Rigging Introduction and First Rig

Before doing any rigging myself in these lessons I already had an idea of what rigging was and its importance in animation. I knew that by creating a rig for a 3D model it can be made to do anything as long as the parts on the model are capable of moving, for example the wheels on a car can be rigged to spin or turn, or for a human character to blink and open their mouth, as long as the model has these areas separated. 

I also knew about Inverse kinematics and Forward kinematics vaguely thanks to the Intro to Animation module from last year which is the main two types of movement in animation. 

It is also possible to create controls for these rigs to help with the animating process, as they can be placed away from the actual model, making it a cleaner and easier to use interface.

First Rig

Within the first lesson, we was able to create a basic rig for a characters legs using joints. To do this within Maya I changed my mode to Animation so that I was able to select the joint tool, and from here I dragged 
out joints into the scene to create the basic shape of a leg. 

To create the second leg I instead went back to the tab I found the joint tool in, called the skeleton tab, to find the mirror joint option. From here I went into its further options by pressing the square to the side of the button where I could make sure the axis on the joints I was mirroring would be correct. In this case the axis had to be set to YZ.

I then next had to connect both the legs together and to do this I created another joint in-between the two legs and once that was on the scene I was just able to select one of the legs with the joint in the centre and press "P" on the keyboard to join them together. I did this again for the second leg and the joint in the centre became the pelvis joint.

Finally I tried using the IK handle tool on parts of the joints to help it further move like a human leg.

The picture below shows what I ended up with.