Monday, 23 December 2013



Week Six - Putting my car rigging Skills to the Test

So what am I Rigging now - As a side Project to the Main car I am Now Going to Attempt to Rig a Vehicle Based Crane

See Image Below for the Crane i am Rigging


The Plan

The Plan is to spend one Week rigging this Vehicle, Finish the Other Car Off, and Start my Character This week. But why have i started another Car, Well Basically I wanted to show of Two sides of rigging, Skinning the Main Vehicular body of the character and Rigging the Crane side of the Vehicle

Bones and Joints




I set up the Main vehicle part of the car Similarly to the Previous car I had rigged, Wheels, Doors, Support Suspensions. I then had to consider how to rig the Crane, I needed the main Body to be able to rotate, And the Crane Arm to both Rotate In the Y axis

Points to Consider

Main Crane Body needs to Rotate in  X axis and Control whole Movement of Crane
Crane Arm needs to be Rotatable in X and Z axis
Crane Arm needs to Extend in Correct Axis
Piston that supports Crane Extension and Rotation needs to Correspond to Correct Movement


Bone Structure

In the final Skeleton structure i have added bones for pretty much everything i can think off

F_R_Wheel_JNT
B_R_Wheel_JNT
F_L_Wheel_JNT
B_l_Wheel_JNT
F_R_Support_JNT
B_R_Support_JNT
F_L_Support_JNT
B_l_Support_JNT
F_R_door_JNT
F_L_Door_JNT
Crane_Rotation_Central_X_JNT
Piston_Rotation_Z_JNT
Piston-Extension_JNT
Crane_Arm_Rotation_Z_JNT

Controllers




Controllers

I set up my Controllers based Purely on Preference, I like for things such as my Suspension, Steering and Doors to have Controllers based in GUI's that I can move and see what they are doing, Then for things that have major Movement I prefer to have custom attributes, In This case i am rigging the Crane part of the Crane to Custom Attributes.


Weight Painting


I had to set up the Crane Arm in a way , It was both Rotatable (so that you had height) and it could be extended

The Black Arrow
The Black Arrow Represents the vertices that are Painted/Constrained/parented to the Crane_Arm_Rotation_Z bone


I then set up the Second Part of  part of the Crane extension (its called something like a boone?)

i Set this up exactly the same, Selected parts of the mesh that you want to be bound to the correct joint - In this Case Crane_Extension_JNT



(in the above Image you can see I have already set up the extension and Rotation correctly)

I did this by setting up an SDK for the Rotation in the Z axis - And attached this to a Custom attribute on my Controller, This was the easy part, From here i then had to set up an SDK for my Extension - the issue is with this is the Arm sits and an Angle - meaning its translating in 2 axis, as well as the fact it has to work in conjunction with the rotation

1) I set up and SDK for when the Arm has 0 rotation on it

2) This SDK as linked to the X and Y Translation  of the Crane_Extension_JNT (this was the driven object)

3) I SDK the joint to a Custom Attribute (the Driver, Crane Arm Extension) I then set it up s it translates from 0 - 50 and correspond in all axis, because of the hierarchy of the Joints even when the Joint Rotation is in a different Position it still works (1 Win for me)

The Piston

The piston which would support the Crane - needs to work in a similar way,, The main difference is that the Piston will extend based upon a staying in the same location when the crane is at maximum point of rotation which is 50 Degrees - You can see how this works Below


 Window


I add the Cockpit_Window_JNT into the Hierarchy, specifically the Crane_Operator_Door_JNT  - This means the Window will rotate with the door correctly - I do this with the Rest of the Vehicle adding  corresponding joints into the Correct Hierarchy's 

I then create the Controllers for the doors so that they will move correctly in position with the door - which is done by Constraining the GUI and Controller to the corresponding Joint in the Hierarchy in the Out liner


The Main Vehicle

The Main vehicle consists of allot of different items that need to be rigged correctly

Front Wheels - Suspension

The suspension is quite easy to set up - I started by creating a GUI and Slider to correspond to the moving suspension - Made using the EP Curve tool and a single NURB's Circle - The Nurbs circle will act as the Controller for now - I then freeze Transformations - Which means the Zero point will always correspond to the center of the wheel - I Then limit the Translate options for the Controller - as it only needs to only within the GUI The next step From here I then set up the Suspension using SDK's - i Set these up in the Y axis - AKA up and Down and then use the same sett ups and setting ion the 3 remaining Wheels


Turning - Turning is obviously quite important, especially with a Vehicle

GUI and Controller

The GUI is a simple Arrow shape which shows which direction the wheels will turn in, Again I use a NURBS Circle for the main Controller this will translate in the X axis - AKA left and Right 


Once this has been created its a case of Using SDK's on the Wheel Joints to create the Rotation this is done by Using the Controller you just crated as the Driver and using X translation as the slider , The Next step is to use the corresponding wheel Joint and using Y rotation as the Driven object of the wheel

Driver - Steering Control
Driven - ?_?_Wheel_CTRL - Front ( ? refers to the Front or Back Position and Left or Right )


Images Above and Below show the Slider and SDK's working Correctly



Movement and X Rotation
The next big thing to set up are the Wheels, There are a few different ways to do this but for me the way I like to do is Orient Constrain the Controller, to the correct Axis for the forward/Reverse rotation which is the X axis, You also have to make sure this is to the Correct corresponding joint





Conclusion

Although i am happy with the final results of my RIG However I would of like to of added more features,

Gear Control - Through the gear Stick
Steering Wheel - So that the steering wheel moves in accordance with the wheel and Steering controller
Joystick Control in the crane Cockpit that works in conjunction with the Cranes Rotation, Arm Extension and Rotation.





Thursday, 28 November 2013

Blend Shapes


Week Tens Lecture is all to do with Creating and Setting Up Blend Shapes




Setting Up A Wink

On the First head to the Left I am going to Quickly set up a Wink.

1) Select the Head

2) Move the Vertexes of the Second Head Into A Correct wink Position

3) Menu > Edit Defromers > Bend Shapes > Add, This will then show up as a Pre Created SDK - Or that is how I see it in my Mind

3) Menu >  Window > Animation Editors  > Blend Shape

6) This will then show up as a Slider for the Eye on the Original Mesh - Allowing for you to Easily Animate thinsg such as Eye Movement and Lip Synch.

Blinking Eye

Using The Same Process as Above I Create a Bend Shape that can be Used for Blinking



Other uses of this 

Lip Animation - Lip Synchronisation - Animation for Words and Facial Expressions

Eyebrows - Eyebrow Movement, Would be moving with Eyes as well

Nose - Nose Movement - Basic Deformation


I would like to look at these further, However I Need to finish setting up my Rigs for Characters and Vehicles First.


Thursday, 21 November 2013

Rigging Zoe the Character

The Character


This is the Provided Character for Rigging, I have chosen to stick with this as 

1) Its Topology is Correct
2) Low Triangle/Poly Count - It currently sits around 6k Triangles

The Legs

I started rigging with the standard Route, Hips to Toes, Instead of Reverse Toe Rig where you start at the Toes and Work up. I also Added the Master JNT (for UDK) which I Have called Spline_JNT, I need to Duplicate this so I have two here (one for UDK and another for the Rig.


Adding The Foot Controllers

For the Foot Controllers I Extracted the Edge of one of the feet and Converted to Edge Curves, this created the Correct sizes for the Feet.



These are the Constrained to the Joint Chain for the corresponding legs, Both an Orient and Point so that the are attached to Movement and Rotation of the Joint Chain.


I then need to set up Custom Attributes for me Foot Controller

Once you have Done this it is Time to add the Skin for the Mesh. (But I am Going to Do This Later)

Rigging the Arms

The arms are pretty similar to the Legs in lieu of how you layout the structure.




Having created the Joints, Which should have a clavicle, Shoulder, Wrist and Hand - For the Hand you will want joints that correspond to each Finger,

Next its time to have some fun in the Outliner


Naming Conventions are important when rigging, I Have Mentioned this in a Previous Blog Post..

_JNT/BNE - Refers to an item in the Outliner that is a Joint or Bone
The Suffix (before the_JNT) refers to the correct Anatomical name for that Joint - Logical Naming, (note that I forgot to add the Suffix for L_?????_JNT (I Shall change this now)

Also in the Hierarchy for the Fingers I forgot to add _JNT to the end of the Names, I have changed this Now

Adding IK and Controllers for the Wrist/Hand and Mirroring

The first step is to Mirror the Joints and then Re-Orient them to the World (all I ill  need for now is Y to follow the Bone Structure, X and Z can be reversed (it will just mean Negative is Positive and Vice Versa) I then add a single IK chain to arm, from the ?_Shoulder_JNT (? indicates the Left/Right arm)

Spine

The spine is one of the most important parts of the Rig, in terms of it connects the Lower and Upper Rigs, a swell as the characters ability to bend and well generally have any form of natural movement and realism, I crate this using the joint tool, I decide it should have 6 Total joint starting at the Hips and the final being the Shoulders


as you can see the spine is made of a total of 6 Joints - from Hips to Neck - Using the correct Spline IK  Tool I end up with a pre-Created Curve, which is something iIneed. having the curve in place allows me to create a series of Clusters from - This can be found in the create deformers menu - Clusters - Once create i I then move the Pivots to the Correct Pivot Positions - One at the Lower Vertebrae - Called Lower_Spine_cluster and One somewhere in the region of the upper spine - Called   Upper_Spine_Cluster, The Controller

The spine needs some form of Controller - This will control the spines ability to rotate forward and backwards, it also needs have some form of Twist, which you can set up by using the 
Controllers, Set Driven Keys and the Spine IK

1) - I create a simple NURBS circle - I move this to the correct position, This one will be the Lower Spine Cluster
2) - I create another Circle - I move this to the Upper Spine Cluster
3) - I constrain these to the corresponding _Spine_Cluster
4) - By default the Clusters are automatically parented to the Spine and based upon your Pivot is that where they effect



Hands - Controllers

I have already covered how I create the joint system for the hand, but now I need to explain my controllers and the SDK's

I create a simple controller for hand, Essentially just a Nurbs circle and name this appropriately for the job it will be doing - controlling the Hand movement, so I name the Controller - L_Hand_CTRL  - This will mean I can find it easily in the Outliner, 

Pivot and Position - Once the Controller has been created it need to be moved to where it will control from - I position it to match the Centre of my Bone 

he next thing I do is constrain this Controller to the correct joint - Which is the - L_Wrist_JNT

Orient Constraint - The First Constraint will be an Orient Constraint in all Axis with maintain offset ticked on, This will make sure that the Controller does not affect the position of any of my Joints. 

Point Constraint - The Second constraint I set up in a point constraint, Again  I set it up to constrain in all axis as well as leaving maintain offset ticked.  - This will allow me to move the hand in the X, Y and Z axis based on the position of the Wrist CTRL

Custom Attributes

Because I plan on using SDK's for the Characters Hands instead of an IK chain 

I need Four custom attributes one for each finger of my character, Not Including the Thumb I am still deciding at this moment if the Thumb will have an SDK or IK chain 

the first set of attributes will be for the finger curl - And then I will look at adding span /Spread to them once I have got them working correctly,I then use the Channel Box/layer Editor - Which is where you usually find your values for Position of  X,Y,Z  in scale, Rotation and world position to create my own attributes- From here I used the Edit - add attribute option - In the image above the second image down shows how this works. I then name the attribute relative to the ones below - Its an integer, and then minimum and Maximum values as well as starting points.

Naming Conventions for Custom attributes
- Middle Finger 
- Ring Finger
- Index Finger
- Little Finger/Pinky 

Things to consider

- Maximum  Roll of fingers
- Negative value (how far you fingers can be bent backwards)
-Start point - 0?

SDK's for the Finger

I decided that instead of having one large SDK for making a fist I would have a series of Individual SDK's for each finger meaning you could create a series of different Gestures with the Hand,  - I  also decided that an IK was needed the Thumb - Which gives you more choice for positioning the Thumb

Things to Consider

- One hand has a glove on - Most likely made of thick leather restricting Movement
- The Other hand has no Glove - Unrestricted Movement






Head

I was really worried about how to rig the head correctly, as I thought it was going to be really complex however once I got into it I did not find it that difficult

The Rig

I kept the rig pretty simple, I added Four Joints to the Rig, two for the Head and Two for the Eyes, Once skinned these will control the head

Main Controller

i create a simple arrow shape using the EP curve tool - generally I have used this tool to create any controllers where NURBS would not give me the desired affect. Once the initial shape is created I use a bend deformer to create the shape, Duplicate this four times and create a locator - You then group these under the Locator

I then group the controllers to the Head_Locator - This acts as the main  point of selection for when rotating the head, I then orient constrain this to the Head_Base_JNT- This will mean that the head works like a head essentially



Eyes

The eye rig is slightly more complex to set up - I started by remodelling the eyes - The eyes attached to the Character originally where not working correctly so i Modelled a sphere and positioned it to work like an Eye
The Controller

The eye is a pretty simple Controller - It is really down to personal Preference how you model this and put it to use

1) - I create a GUI/Surround for the Controllers (this is the blue cube you can see on the outside
2) - I create a NURB's Circle (this will act as the controller, and is conveniently similar to the shape of an eye) I then Rename this in the Outline - L_Eye_CTRL
3) - Duplicate this - Rename - R_Eye_CTRL -
4) - Aim Constrain these controllers to the Corresponding eye - I use Maintain offset and the All axis options enabled
5) - I grouped the eyes - these are linked to the GUI
6) - Hey Presto my eyes correctly follow a point



Evidence of Eyes Working










Adding the Skin
At this point in the process I add the Skin - This allows for me to see the kind of issues that i am having with my Rig at this moment in time, Especially when I start adding SDK's - I had actually been adding and removing the skin throughout rigging so that I could see if the changes I was making on the rig would work -



Skin Issues and Paint Weights 

The skin is pretty easy to set up, I select my Mesh and then Skeleton, Or the Joint System, I leave the options as default which skins my mesh pretty well.



Issues

There are a few issues with the skin - and that certain fingers meshes are being caught in the next fingers bones influence - which is an easy fix - the issue was that the Skin is generates based upon the bone as well as the Mesh overall - the fix is simply using the Paint weights tool to remove the weight from the joint that is affecting the joint you do not want it to

hand issue

The hands main issue was the Influence of the glove and how it skinned in comparison to the position of the Elbow,  and the way the mesh is Modelled in regards to the elbow - Below shows the fix for this issue


The other issue was the Hip, more specifically the Belt and The weird, Knife like object that hangs of the side - The main issue was how to go about skinning this correctly - I needed it to


Blend Shapes/Facial Rigging, Controller and GUI

I am going to create a controller for a simple series of facial animations, some of the controllers will have a slider and some will just be done with custom attributes (putting to the test what I have learnt over the last six weeks)

I use blend shapes to create a simple series of Facial Animations, This will allow me to create something on the face

Please Note - I did the separation of the head from the main mesh before I skinned the Rig - However as this is an extra on my rig and is not necessary, Also I have seen this done a few times before, where the Head mesh is separate - I always thought maybe this was to do with texturing but maybe it was rigging?

How they work - essentially a blend shape works by creating a slider between the original mesh and the blend shape - You can then access the blend shape in windows, Animation, Blend shapes

Left Eye Wink

Blend Shapes are simple to set up  - I duplicate the head mesh, Move the duplicated mesh to one side and name it - In the first image below you can see this shown  (the Green box indicates the blend-shape meshes and the red indicates the original meshes)- Once duplicated you use the Create Deformers - Blend Shapes, I also make sure that they have proper naming conventions


From Left to right are Blend shapes for, Blink, left Eye Wink, Right eye Wink, Smile, Frown, Left Eyebrow, Right Eyebrow


The Video/Giff below shows all of my Blendshapes working in one go








Conclusion

Over the last Twelve weeks I have Made allot of mistakes, learnt allot and done some stupid things in the Unit. The main issue for me was the actual meshes, having to find suitable meshes, that  I liked and was happy working on was a pain in the arse - Turbo squid is extremely unreliable, most of the Meshes I downloaded had bad topology and each time we had to do this I wasted a good amount of time trying to find a mesh I liked working with.

What would I do Differently? - There is not much i would do differently, I acknowledge my mistakes, I forgot to add locators to the Knee's IK chain which means you cannot reposition the Knee easily, the Other issue is the GUI - I really wanted to create one that Mimics the face and has some form of Dynamic interaction, meaning if I Move a point on it it affects the Face





Wednesday, 16 October 2013

Tutorial 02 - Car rigging 01 - Groups, Curves, Constraints and Pivots

The first step is to find a car that is usable for rigging and animation

Step 01 

The first step in the process for the car rig is to check the model -obviously it has to be a car so 4 wheels, 2 or more doors a boot and bonnet and lights. 

Front of car (bonnet) is facing the front (use the view cube)

Wheels are sitting on the grid (as accurately as possible)

Mesh is separated so you can group it.


Step 2 - Naming Conventions and Grouping

The first part is to name the Mesh - Name it logically using the drop down bar and option rename at the end of the shelf


Then start grouping your mesh 

:-Doors - As you group the doors its important to keep naming the parts of the mesh you are grouping with similar naming conventions to the door


- Boot


- Bonnet


-wheels


Naming conventions and groups, how to use them?

naming conventions -

It up to how you rig as to how you name your naming conventions, in my case I like to abbreviate and shorten words so

frnt_rght_wheel_mesh - front_right_wheel_mesh - either way its right its just up to your preference

doing this will help to keep your organised, its also important to logical , so name the items position, what it is, what it doe, and if its a mesh, GUI, Controller etc

Grouping -

Its important to group your meshes for a few reasons

1 - Groups can have a group pivot
2 - Items in groups can have individual pivots
3 - Helps to stop confusion later on and keep your rig 'organised'

its also important to mention group grouping, which is what I have done with the wheels and doors, because there are more than one but identical items.


Curves, Deformers and constraints - as well as pivots

its up to you how you go about the next step but you need to create a controller for the axis of movement on the rig.


Creating an EP curve

Using the crate - EP Curve tool you want to create a controller for the rig - When you create this you want to make sure there are enough points in the curve for when you add the deformation later



Adding a Deformer to create the actual curve

Using the animation tool bar, you can find the create deformers, non linear and Bend, and add it to the EP curve. From here you need to rotate it so that the straight part of the deformer is following the X axis, and the curve is lying flay on axis.




Its up to you how much you set up the curvature of the EP curve, I prefer something in the middle of so bent the arrow heads line up with the car wheels and to flat that its not noticeable

WHEN DONE DELETE ALL BY TYPE - History - This will delete the bend deformer.

Reposition the pivots for the wheels if you have not already - This is what I said earlier - Items within groups can have individual pivot information as well as one for the overall group

Contraints

Constreaints work similar to parenting, however you select the item you want to be the 'controller' first and then the items you want to folow the 'controller' second

So, select the currve first then. right_front_wheel_mesh followed by left_front_wheel_mesh and go to Constraint - Orient and click the Options box next to it, and set it up for what you want, in this case we are just con-straining to the Y axis (Left and Right movement)

From there the next step is to create a group and naming convention for the controller. From the Image belowe you can get an idea of my naming conventions and how I use them - Its also good practice as a 3d modeller to using naming and naming conventions if you do not already.




As you can see my naming convention for the Left and Right movement of the wheels is

Y_Movement_Left_Right_CTRL

I chose Y because the movement is constrained to the Y axis,

Movement because it moves (orient may have been a better choice or ratation)

Left and Right (because thats what the Controller controls (maybe angle would of been a better option)

CTRL - To indicate its a controller - CTRL is also short for Control on keyboard so it made sense

Thursday, 3 October 2013

Another year another new Blog ;) this time its for 3D rigging.

Lecture One - Introduction to Rigging

Basic Parenting

Parenting is a system in Maya by which you set up a control system where one object is Parent to a Child object. In the image below you can see a 3 point Bone or Joint, Start, Middle,End or Shoulder, Elbow and Wrist.

Step 01 - Create the Bone or Joint

I first create the Bone or Joint - Which can be found in Skeleton - Joint Tool - It does not matter which shape or size the object is.




As you can see in the outliner there is already a hierarchy of a parent child system present by creating the joint we will be replacing this default parent child situation with control objects.

Step 02 - Creating the Control Objects

I decided that I would create an example of a basic arm joint with simple control objects - using NURBS Primitives


Step 03 - Parenting the control objects

Using the P Hot key I parent the objects in order of which i want them to be parent Child - Obviously if this was a human arm it would be  Shoulder - Elbow - Wrist -Hand - Fingers, I am only showing a joint chain with shoulder, Elbow and Wrist so it does not matter about hand and fingers.


The sign that the Joint has become parent or a child is that the joint has become invisible, which can be sorted by Un-parenting the selected objects - You can also parent objects in Maya that are not parts of joint

What I learnt

I learnt how the parent child hierarchy works properly in Maya and what you have to do to create a properly working parent child situation - I also learnt how the parent child system affects bones and joints in Maya and how I can control them, There advantages being simplicity and ease of use, and there many disadvantages

Constraints an equivalent to Parent/Child

Again for this i am going to start with a Bone/Joint in Maya - I did not want to change the item i was using as I wanted to show the advantages and disadvantages of both

Step One

Step One again was to create the physical Bone/Joint system - again in the Shoulder, Elbow and Wrist format - Or 3 Joint System


Step Two - Creating the Constrain Objects

Similar to the parenting part i want to create and object to point constrain the Joint to, Im going to use NURBS spheres again to show the same advantages and disadvantages as previously stated




Step Three - Adding the Constraint to the Bone/Joint


Using the constrain Point Tool 

The constrain point tool has an options menu, Similar to many tolls in Maya  By default it should be set up as below with a value of 0.0000 in all offset, Animation later set to non.

Then Below are the physical constrain option - Which are X, Y and Z axis  - This is the main constrain (from my knowledge and opinions) You can fiddle with these options - Each one locks to an axis essentially.