Character/Rigging

Rigging

A character rig is essentially a digital skeleton bound to the 3D mesh. Like a real skeleton, a rig is made up of joints and bones, each of which act as a "handle" that animators can use to bend the character into a desired pose.
A character rig can range from simple and elegant to staggeringly complex. A basic setup for simple posing can be built in a few hours, while a fully articulated rig for a feature film might require days or weeks before the character is ready for Pixar-level animation.
We plan on working up a basic rigging tutorial sometime next month, but in the meantime, it's a good idea to at least familiarise yourself with some of the major concepts:

Placing the Skeleton

Placement of a skeleton is perhaps the easiest part of the rigging process.
For the most part, joints should be placed exactly where they would be in a real world skeleton, with one or two exceptions.
  • Joint Hierarchy: In order for a rig to work properly, the bones and joints must follow a logical hierarchy. When setting up a character's skeleton, the first joint you place is called the root joint. Every subsequent joint will be connected to the root either directly, or indirectly through another joint.
  • Forward Kinematics: Forward kinematics (FK) is one of two basic ways to calculate the joint movement of a fully rigged character. When using FK rigging, any given joint can only affect parts of the skeleton that fall below it on the joint hierarchy.
    For example, rotating a character's shoulder changes the position of the elbow, wrist, and hand. When animating with forward kinematics, the artist typically needs to set the rotation and position of each joint individually—to achieve a desired pose the animator would work through the joint hierarchy sequentially: root → spine → shoulder → elbow → etc. The final position of a terminating joint (like a knuckle) is calculated as a function of the joint angles of every joint above it in the hierarchy.

Degrees of Freedom/Constraints

When rigging, keep in mind that joints like the elbows and knees limited to a single degree of freedom in the real world, meaning they can only bend along one axis. Likewise, a human neck cannot rotate a full 360 degrees.
To help prevent unrealistic animation, it's a good idea to set up joint constraints when you're building your rig. We'll address this further in a tutorial.

Squash and Stretch

Another consideration that must be made is whether the rig will support squash and stretch, or whether the character will be constrained to realistic motion. Squash and stretch is an important principle in exaggerated cartoon animation, but typically doesn't look right in realistic film/VFX work. If you want your rig to maintain realistic proportions, it's important to set a constraint to lock the position of each joint in relation to the rest of the rig.

Facial Rigging

A character's facial rig is usually altogether separate from the main motion controls. It's inefficient and incredibly difficult to create a satisfactory facial rig using a traditional joint/bone structure, so morph targets (or blend shapes) are usually seen as a more effective solution. Facial rigging is a topic in and of itself, so be on the lookout for an article exploring the subject in depth.

https://www.lifewire.com/what-is-rigging-2095


How to rig a face for animation- All this information came from https://www.creativebloq.com/how-to/how-to-rig-a-face-for-animation


When I was first learning to create character rigs in Maya way back in 2002 while working on the Playstation 2 title Superman: Shadow of Apokolips, I remember that they weren't the most efficient rigs and Set Driven Keys (SDKs) were used for nearly everything. The hands were driven by them and so were the facial expressions, in fact nearly every control had some sort of SDK involved. Don't get me wrong, the Set Driven Key is a powerful tool in Maya, but you might have to plough through a load of Maya tutorials to figure it out, it can be time-consuming to set up, and is easy to break and a pain to fix. Plus, your scene size can end up bloated by animation curve data.
Over the past few years I have been experimenting with another approach, but this time for more high-end rigs as opposed to game ones. One which is more efficient and in most cases easier and much quicker to implement into a rig. Although it was created in Maya 2016, the process should work in previous versions, and give you the basics of rig creation. 
In this tutorial I will be taking you through the steps of rigging a character's face, but rather than focusing on the more basic areas like joint placement and weight painting, we will be looking at an often overlooked aspect of Maya… the utility nodes.
The word nodes can seem like an intimidating one and be associated with highly complicated rigs involving locators, splines and other complex systems, but don't worry. With this setup you will be using a combination of blendshapes, joints and nodes to make a highly flexible character capable of a wide range of emotions. 
Once you have followed this process you can then adapt this rig for another character, adding more controls to simplify animation and make it easier to create. 

Mesh topology

Before you start to build your rig you need to do some investigation work. The model you are rigging and its topology are critical to how well the character will move, especially if, like in this instance, you are focusing on the face. It's important that the topology is not only clean but that the edge loops follow natural muscle lines. If they do the face will deform in a much more realistic way. 

Foundation shapes


Once you are happy with the topology it's time to start creating your first batch of blendshapes and doing this now will also highlight any trouble areas with the mesh early on. These blendshapes are full facial poses covering all the main expressions needed, but sectioned into key areas like the mouth and eyes. We are looking for the fundamental shapes here like a smile, frown and so on, as well as the upper and lower eyelids fully closed.

Additional shapes

With this rig you are going to rely on eight main controls to manipulate the lips so it's important to also add blendshapes for a wide mouth as well as a narrow one which could also double as the pucker. This is so manipulating a single control can essentially pull around the corner of the mouth to achieve a wide number of expressions and move between all four blendshapes at once.

Split the blendShapes


With the main shapes created it's time to move to phase two. What you need to do next is split them into left and right sides meaning you can pose them independently. A quick way to do this is to create a blendshape node and then edit its weights, as illustrated in the box on the left. This will limit its influence to just one side of the model meaning you can then duplicate it and keep this copy to create your specific side.

Build the skeleton

The next stage in the facial rig is to build your skeleton and as mentioned earlier, for this setup we are going to be using both joints and blendshapes to pose the characters features. I like to use blendshapes as they can give you more precise shapes, but then the joints can help to push and pull areas of the face around to give you more flexibility.

Controls or a UI?

Whether you create controls which float in front of the character's face or use a separate user interface is up to you, or more likely up to the animators who will be using your rig. Now it's time to start creating these controls and for this tutorial we will be using a combination of the two. A main UI will be used to control the majority of the blendshapes, but a series of controls will also help to manipulate the rig in places where it needs to move in all three axes. 

Use direct connections

When using a separate UI as we are, you have to approach the rig differently. Traditionally you could use Constraints to tie a specific joint to its master control and in turn this control would naturally follow the head. With a UI, the controls are static and don't follow the head so using Constraints will lock the joints to the controls meaning if you move the head the joints stay where they are. A way around this is to use direct connections instead of constraints.

Driver locators

But using direct connections via the Connection Editor will force the translations, rotations and scale attributes to match those of the controls. Your joints inherently have translation values applied which will end up changed when connected. You could work on an offset system or you could create a locator in the place of each joint, freeze its transforms and then Parent Constraint the joint to the locator. So the locator, now with zero attributes, will drive the joint.

Connect the locators

With the locators now in place and the joints parent constrained to them, you can connect the controls from the UI's attributes to the locators using the Connection Editor. If the locators are also parented to the head control they will follow its movement regardless of where the UI controls are. Also, the joints will now move relative to the head's position and not be locked to the UI meaning you can also place the UI anywhere in the scene.

The condition node

It's time to start connecting the blendshapes and introduce the first utility node, which will be the Condition node. This is my favourite utility node and what it does is take a value, like the Y translation of a control and, if it goes over or under a specific value it outputs another value. As an example, if the control goes over 0 in the Y translation then we can trigger the smile blendshape, if not, it is ignored. So let's set this up.

 Bring everything in

Open the Node Editor and select the Lip_Left_Outer_Control, clicking the Add Selected Nodes to Graph button to bring it in. Now press [Tab] in the Node Editor and start typing Condition in the small window and select it from the menu below to create it. Finally select the main blendshape node on the character's head model, called Head_BShapes, and follow the first step again to bring it into the Node Editor.

Connecting the node

Now connect the Lip_Left_Outer_Control.translateY attribute to the First Term attribute in the Condition node. Leave the Second Term as 0 and change Operation to Greater Than. Next connect Lip_Left_Outer_Control.translateY to the ColorIfTrueR. (This means when the First Term is Greater Than the Second Term it will use the true value.) Connect the OutColorR attribute to the Left Smile blendshape attribute and move the control to see what happens.

MultiplyDivide node

The smile blendshape is now triggered only when the control is moved in the Y axis, but it may be influencing it too much. You can use a multiplyDivide node to reduce its influence and slow down the movement. In the Node Editor press [Tab] and create a multiplyDivide Node. Connect the Lip_Left_Outer_Control.translateY attribute to the input1Y attribute in the multiplyDivide node and its OutputY attribute to the ColorIfTrueR attribute on the Condition Node.

Adjust values

When you move the Lip_Left_Outer_Control, the smile will look no different, that is until you adjust the Input2X attribute in the multiplyDivide node, which is the amount the Input1X value is being divided by. Changing this to 0.5 will half the amount the blendshape moves because it's halving the Y translation value. Equally, a value of -0.5 will reverse it and half it, which is important to remember when you connect future controls. 

Connecting controls


That's just the smile blendshape added, but you can now follow the same process to make the X translation of the control trigger the wide mouth blendshapes. With the opposite directions, so a minus X and Y movement, trigger the pucker and frown shapes, making sure you also change the Operation in the Condition node to Less Than. This will ensure that those blendshapes are triggered only when the value drops below 0 rather than above.

UnitConversion node

You don't always have to create a new node to edit the influence a control has over something. With the jaw movement, rather than use a utility node you can use a simple, direct connection to make the translations of the control effect the jaw joints' rotations. When connected Maya will automatically create a unitConversion node by default between the connections which you can use to your advantage.

Slow the jaw

If you find your jaw is rotating too quickly you can then edit the Conversion Factor attribute found in the unitConversion node, rather than introducing another multiplyDivide node to slow it down.

BlendColors node


With just these few nodes you can see how much we have achieved and from here you could happily work your way around the face and connect up the remaining controls. We can, however, do more with the help of the blendColors node. Even though this can work with your typical RGB values, you can also utilise this node to blend between two other values or controls, making switching and blending easier.

Sticky lips

An important part of any mouth rig is for it to have the ability for the lips to stick together, regardless of where the jaw is. Imagine the character needs to chew something, even though the jaw is moving the lips need to remain sealed. To help achieve this you can use the blendColors node to dictate whether the lower lip driver locators follow the jaw or the upper lip control.

Lip groups

First you need to divide the lip control locators into three groups. Upper_Lip, Lower_Lip and Corner_Lip and make sure their pivots are in the same place as the jaw joint. This is so they rotate around the same point. Next bring the StickyLips_Control, Lips_Control, Lower_Lip group and also the Jaw driver locator into the Node Editor and create a new blendColors node. 

Connect the lips

Connect the Lips_Control.rotate attribute to the blendColors.color1 attribute. Repeat with the jaw locator connecting its rotations to the blendColors.color2 attribute. Connect the blendColors.output into the Lower_Lip group's rotation attribute. If you manipulate the Blender attribute on the blendColors node the lower lips will blend between the two values. Connect the StickyLips_Control's Y translation into the Blender attribute so the control drives it.

As an extra tip you may find that due to the linear nature of blendshapes, the eyelids move through the eyes when activated rather than over them. In this instance you may need to create a halfway point blendshape for when the eyes are partially closed. This can then be added as an in-between target on your bendshape node, which is then triggered up to a specified point before the main shape takes over.


How to rig a character for posing in Maya - this information came from https://www.creativebloq.com/3d-world/maya-tutorial-rig-character-posing-9134476

Pivot points

Work your way around the left-hand-side of the model, placing joints at major pivot points around the body. Start with the left arm, before adding in joints for the hand and fingers. You may also want to include extra joints at the bicep and wrist to ensure these areas deform correctly. Remember, your wrist isn't a simple ball and socket: when you twist your hand the radius and ulna bones roll together, giving a gradual rotation along your forearm.
We add the extra joint at the bicep for a similar reason. When you twist your upper arm, the muscles of your arm makes it look like this area is also twisting around the bicep area. Next add a Root joint - which will be at the character’s waist - and work your way up to the head before creating joints for the leg, foot and jaw. When done, simply parent the thigh joint to the root, and the shoulder to the clavicle to turn it into a single skeleton hierarchy.

Check your axes

Now you have one side of your skeleton, it's important to check how it actually rotates before you move on to create the opposite side and bind it to the model. One of the main areas to investigate is the rotational axis in each joint.
Each rotational axis dictates how the joint will rotate around its pivot when manipulated. When adjusted, you are in effect editing the pivot so that the X, Y and Z axes point exactly where you want them to. This is important as misaligned axes can cause huge problems.
To edit the rotation axes on your skeleton, select the Root joint and also the hierarchy - go to Edit > Select Hierarchy - so you have all the joints selected. Now go to Display > Transform Display > Local Rotational Axes to see how yours are currently looking.

Adjusting joints

If you do find some joints that need adjusting, like the wrist, fingers and possibly the spine, go to Skeleton > Orient Joints and open the options. C If you remember, these options were also available when you were creating your joints, but this will allow you to edit each axis individually depending on your needs.
As mentioned, the default settings should work well, with the primary axis being the one that points down the bone, and the secondary attempting to point up. For the wrist though you may find that the orientation will attempt to point down a particular finger, whereas it should be central. To rectify this quickly, use the Orient Joint to World option.

Complete the skeleton

With one half of the skeleton complete, you can now quickly mirror the left side in order to generate the right. Before you do, go through and rename each joint correctly while also adding an L_ prefix.
Select the left clavicle and open Skeleton > Mirror Joints. This is quite a simple tool, and depending on the way you created your skeleton, you may need to try a few options before you get a correct right-hand side. Start by mirroring across the Y and Z axes.
The Mirror Function you choose will also depend on your personal preferences, but Behaviour will mirror the joints and also flip the orientation and rotational axes - in effect, mirroring the behaviour. Orientation will keep the same rotational axes, making it easier to copy animation between sides.
Maya will also replace your L_ prefix with R_ so you don't get joints with clashing names. With the arm mirrored, repeat the operation on the leg to complete your skeleton.

Binding

Your skeleton is now ready, so let's connect it to your model. Select both the model and the skeleton's root joint, and go to Skin > Bind Skin > Smooth Bind and open the options. Again, if you are using a more recent version of Maya you will find the Heat Map Binding Method will give you a much nicer default bind, meaning fewer clean-ups later on. For older versions the default settings will work for you here, with the Bind Method set to Closest Distance.
The only other adjustment I would recommend would be to set Max Influences to 2 or 3, which will restrict how many joints are able to influence each vertex. Setting Dropoff Rate to around 10 will also give you a tighter falloff, which will be easier to manage and work with.

Adjusting joint influence

Now your model is moving with the skeleton, but you will find she isn’t deforming very well. Try rotating her head, or even her jaw and arms, and you will see the problem. The default bind is just a starting point, so now you need to go in and adjust each joint’s overall influence. It sounds like a long and tedious job, but Maya has a nice, intuitive way to handle weight adjustment.
Select the model and go to Skin > Edit Smooth Skin > Paint Skin Weights and open the settings. The tools options may appear intimidating, but you only need to focus on a few initially: you can experiment with the rest once you know the basics.
You will also notice that your model will now be black, with a greyscale around the selected joint that illustrates the weighting falloff. All you are going to do now is select your brush type from the top, specify a joint to work on under the Influence tab, and then select your painting operation. Stick to Replace in the beginning, which will just replace the values with the ones you are painting.

Opacity and Value

Advertisement
The last sliders to adjust are Opacity and Value. Value is the actual amount you will be physically painting onto the model: 1 will be a 100% influence, and 0 is no influence. Opacity allows you to adjust how much each brush stroke will paint, so in a way this is a percentage of the Value. With all that in mind you can now work your way around the model, correcting those deformation errors, and making sure her head and jaw move separately.
The best approach when painting weights is to pose the character first so you can see the issues as you work. You can also speed up your workflow if the character is symmetrical by focusing on the left side, and then using Skin > Edit Smooth Skin > Mirror Skin Weights to copy the weighting information across quickly.

Rigging the legs

Now the model is bound and weighted, but in its current state this character would be difficult to pose or animate. Trying to create a walk cycle, with each foot planting correctly on the ground, would be extremely difficult. To make your job simpler, you need to add a layer of controls on top of the skeleton; a bit like the strings on a marionette, these will drive the joints in a more intuitive way.
Let's look at planting those feet first, and to start you will create a Reverse Foot. A Reverse Foot is a copy of the existing foot joints, but reversed to make animating each movement and foot placement easier. Before you create the main controller, you should apply three IK handles running down the leg and to the tips of the toes.

Rotation of the knee

Advertisement
First create an IK handle from the hip to the ankle. This must be set as an ikRPsolver - which is a Rotation Plane solver - and will allow you to gain control over the rotation of the knee. Create a second handle from the ankle to the ball of the foot, and a third from the ball to the tips of the toes. These last two should be ikSCsolvers, as you don’t want them to inadvertently rotate.
With those in place, you can now duplicate your foot joints and un-parent them from the main skeleton hierarchy. Next, duplicate the toe joint and move this back to where the heel would be. At this point the new joint will be parented to the ball joint – you will need to adjust this so it is parented to the toe.
At present this doesn’t look like a reversed version of the original foot, not until you select the heel and go to Skeleton > Reroot Skeleton. This will reorder the hierarchy, reversing the foot. Parent each IK handle to the corresponding joint on the reverse foot. Now when you move the Reverse Foot, the foot that is bound to the model will follow, and will happily bend as you rotate the joints.

Final step

The final step is to add an extra control that will allow you to lock and adjust the position of the knee. Just like the foot, you first need an icon to control the knee – a curve-based solution would work well, but for now a simple locator will do. Position this directly out in front of the knee joint.
With it still selected, add the leg IK handle to the selection and go to Constraint > Pole Vector to restrict the knee rotation to the locator/icon. Now when you move the locator, the knee will follow.

Rigging the arms

Let's move up to the arms next and add an easier solution for controlling them. Just like you did with the feet, you are going to add a simplified master controller on top of the arms, so that you use three joints rather than the existing five.
Advertisement
Duplicate your arm joints and delete the fingers. You can raise the arm to make it easier to work on. Un-parent this new control arm, and also use the Skeleton > Remove Joint tool to strip out the bicep and wrist rotation joints.
What you have now is a simpler arm and, with the help of the Node Editor, you can wire this directly to the skinned arm so it has complete control. Go to Window > Node Editor. Select your shoulder joint on your control arm and the skinned shoulder joint, and graph them
in the Node Editor. This will show you the selected nodes and any connected nodes.

Node Editor

Rearrange the Node Editor a little so that you have the three main joints in view - Main Shoulder, Control Shoulder and Shoulder Twist - and click on the blue boxes at the top of each node to expand the attributes.
The next step is select the circle next to each attribute and connect it directly to another. To do so, click and drag the Rotate Y attribute on the control shoulder onto the Rotate Y of the main shoulder. You can also do this for the Rotate Z attribute.

Twist the arm

Next connect the Rotate X attribute to the Rotate X attribute on the shoulder twist joint. Now if you rotate the control arm you will see that the main arm will move with it - but more importantly you will see that when you twist the arm, it doesn't twist from the shoulder. Instead it moves from the bicep rotate joint.
The final step is to ensure that this new control arm moves with the actual rig. To do this, select the main skeleton's shoulder and then the control shoulder. Now go to Constrain > Point which will lock the control arm's position to the main shoulder.
What you may notice is that as the rig moves, the control arm will not keep the same orientation as the main arm. This is because you used direct connections, which feed off the attribute values. To fix this, simply break the connections on the shoulder’s Rotate Y and Rotate Z attributes, and instead use an Orient Constraint to control the orientation on those two attributes.

Extra controllers

Now you have seen how to rig your arms and legs, these simple steps will allow you to pose your character quickly and easily. However, what if you want to add more controls to other areas of the character?
These could be as simple as a direct connection - like you did with the arms - or perhaps you might want to use Constraints or Set Driven Keys to add slightly more complex controls.
Hands can be time-consuming to pose as you would need to select each joint and apply a rotation, so you could apply a few quick controllers here too. The key is to have a simple, intuitive rig, and ideally one that is separated from the actual skeleton with no controls lying inside its hierarchy, so you can easily bake the animation onto the skeleton for export if you need to.

Pulling faces

Your model can now be moved and posed quickly and easily, but without a set of facial expressions she will still seem a bit wooden. Animating a face can be approached in a number of ways: for instance, joints can be used in conjunction with Set Driven Keys to achieve any number of poses, but these may also feel stiff.
Blend shapes - or morph targets as they are also known - are versatile and easy to set up, plus they can give a more organic feel to your animation. To create a blend shape, simply ensure your rig is in its default, bound position and create a copy of the main model.
Make sure Reflection is enabled in your Move Tool settings so you can work on both sides at once as you model, and create your first expression. First close her eyelids to create a blink - this is a standard and always needed blend shape.

Create a copy

Advertisement
Because you created both sides at the same time, you can generate two blend shapes from this single model. Create a copy of your first blend shape and move it to one side, then roughly select the vertices that were edited on one side of each head.
If you look in the Channel Box you will now see the option CVs (Click to Show). Opening this will show you the X, Y and Z coordinates of each vertex. Zeroing out the selected vertices will essentially reset that side of the face. Repeat this on the other model, but on the opposite side of the face. You now have two blend shapes, a left blink and a right blink, meaning you can control each side independently.
Continue generating more blend shapes to cover your initial needs, focusing on key expressions such as joy, anger, surprise etc, and break these down into eyebrow, eye and mouth shapes.
When they are all created, select the blend shapes and add your skinned model to the selection. Go to Create Deformers > Blend Shapes and open the options. Keep your settings the same - although you can add a name if you like - but switch to the Advanced tab.

Blend shapes

Advertisement
Because you are adding your blend shapes after the model has been bound to the skeleton, you will need to change the Deformation Order to Front of Chain. This will ensure the blend shapes will evaluate after the skeleton’s influence. If you don’t do this, when you enable a blend shape the whole model will be treated as a blend shape, rather than just the vertices you adjusted.
To edit and animate your blend shapes once you have created them, simply go to Window > Animation Editors > Blend Shape. You can now adjust each slider and combine each blend shape in order to generate an unlimited amount of facial expressions.
As a final step it's important to work your way around the rig and lock any attributes that are not meant to be editable. Doing this now will ensure that your rig is solid, and won't break easily if passed to other animators.










Game Characters Mid maps

Sketch Ideas



















Step 1 silhouettes.

2. Colour schemes
3. Sketches




Modelling/Rigged









Renders
I rendered this using a dome light so you can see it from all angles giving a clear shadow ratio.
My video of the making of my video


Evaluation

For this project we had to create a character of own and rig it so it moves. For this project we did have some trouble with having a swap of tutors and not having a specialised tutor to help us so that's why i feel I didn't produce the work that I wanted but I'll talk more about that further on. The start if this project I looked a lot at many retro characters because I didn't want to make anything to complicated with the lack of resources and help from tutors but with my knowledge from the last project I was able to create a mouse looking character. I found the modelling relative easy but I did have many issues when It came to maya and mudbox, I lost a lot of my work because of maya crashing and files being corrupted so I did loose about 7 weeks worth of work and even when I did try to do more in my spare time I always crashed or ended up corrupted so it was worthless after having spending so much time on it. After all that I did end up making a mouse that I had to work my concept around my model with how much I had to change it and even then I had to some what change my concept. For my concept piece I picked the theme of pink and used the pallette of pink so I could show a theme of colour because I wasn't able to show it in my model because I wasn't UV'ing it. For the concept, I wanted to make something that would be seen in games like animal crossing for Nintendo stereotypical games they bold structure usually with big eyes and something that stands out about them and I've picked the ears this time for that. 
If I had to do it again I would try and not lose so much of my work, it isn't my fault but I do wish I could have shown my full potential on this project but I'm glad I have made something that moves and  is to a standard that you could see in a game. 
If I had to do it again I would probably also pick a different animal to model as I found there was not elements to the animal I picked to make him start out, maybe if I UV'ed that would have been have made it better from the choice of colours to make it stand out. Overall I think I did the best I can on this unit with what I had to deal with and I am happy with the outcome.

No comments:

Post a Comment

Art

German expressionism