8

Skinning Your Character

image

Character by Cheryl Cabrera (2007).

Former Student Spotlight: Tonya Payne

Skinning can be a really frustrating process if you are new to character modeling and setup. It’s also a very important step in the process of setting up your character for animation. It will ultimately determine how your character deforms.

Having enough joints and having those joints in the right place is part of whether or not your character is going to deform in a desirable way. However, there are other things to take into consideration as well that will determine whether or not your character will deform properly. Perhaps more important than bone placement is the model itself. This is where bad edge looping will make you want to pull your hair out. This really comes into play around areas that bend, especially the shoulders. The shoulders are really the number one place where bad deformations occur. You can avoid having to do extensive weight paintings around the shoulders if, when you are modeling your character, you make the edge looping follow the musculature. In much the same way as you concentrate on looping the edges around the mouth and the eyes to follow the musculature, you should do the same with the shoulders. Unfortunately, many modelers do not do this. By having edge looping follow the musculature of the character, you will have fewer weights to tweak.

Also, you want to keep the number of edges down to a minimum. You want just enough so that the model can deform, but not so many that you are painting weights on thousands of vertices. More edge loops should be allowed where the character is going to be bending at, such as the elbows, the shoulders, and the knees. You can always apply a smooth skin after you paint weights on a lower poly version of your model.

Another thing to take into consideration when skinning is the interpenetration of clothing and other geometry that is close together. A great way to solve this problem is to make sure that the vertices are weighted identically using the weight table. On a bat character that I rigged, the wings had double-sided geometry that was very close together and we had problems with the vertices on the back of the wing going through to the front of the wing and vice versa. We solved the problem by making sure vertex pairs had matching weights on each joint they were weighted to. Skinning and painting weights can be a tedious and painstaking process if you are sloppy about the way you’ve modeled your character, but if you are careful and plan ahead, you will save yourself a lot of time and extra work.

image

Mr. Hyde – Bat rig by Tonya Payne (2006) for the short film Bait by Luke Nalker.

Tonya Payne graduated from the Savannah College of Art and Design with a BFA in Animation. She currently works for BreakAway Games in Corpus Christi, Texas as a Character Setup Artist and Animator.

Workflow

image

Skinning Workflow.

image

FuMan by Chris Beaver (2007).

The final step in character creation is the process of skinning. Skinning is another type of deformer, which means it is a tool that changes the shape of the geometry. This deformer takes points from the geometry and assigns them to one or more joints in the skeleton so that when the joints rotate, the geometry bends and moves with them.

Skinning can become a tedious and arduous task. Many times, problems that arise during the skinning process are caused by problematic or inadequate geometry, or inaccurate joint placement. This is why it is so important to test bind after joint placement. If problems exist in the geometry or joint placement, it is good to see it at that point during the workflow and much easier to make changes.

With the release of Maya 2008, new tools are now available to help make the skinning process less painful and more productive. Knowing what tools to use and in which order to use them also speeds up and refines the skinning process.

There are two types of skin deformers: rigid bind and smooth bind. This chapter will focus on the smooth bind process. Rigid bind is generally used when creating characters for game engines, as most game engines at this point in time do not support the smooth bind process. Rigid bind simply assigns one joint influence to each point on the character’s geometry. Because of this, when a joint bends the geometry has a tendency to crack in areas or look rigid. Smooth bind, however, will assign multiple joints to each point, allowing the ability to spread the influence over several joints, giving a more natural look and smoother deformations.

image

Smooth bind (left) compared to rigid bind (right).

Skinning Tools in Maya

There are several tools available that can speed up the process and make it easier. Knowing these tools can make the difference from having a great result or pulling your hair out in the process. Again, we’ll take a look at those that we’ll be using during the assignments.

Creating the skin deformer [Skin > Bind Skin > Smooth Bind – option box …]

For best results, the smooth bind options will need to be adjusted before the smooth bind has been applied. I have found that some of these options work fine in the default setting for testing the skin binding. However, for the final bind, it is best to adjust some of the options in this window. The following settings are the changes that I suggest:

Bind to: Selected Joints (This will only bind the geometry to the joints you select, which is important when you have multiple joint chains in each area, like the arms and spine.

Bind method: Closest in hierarchy (This will bind to the joints connected to each other so that points are shared by nearby joints).

Max influences: “3” (This means that no more than three joints will share the influence over a single point. I find that more than three usually creates too many problems).

image

The Smooth Bind option box with suggested settings.

image

Make sure that the only history on your geometry is your blend shape input. Geometry history can cause all types of problems during the skinning process [Edit < Delete by Type > Non-deformer History].

Adjusting the Skin Weights

image

Character by Tim Robertson (2005).

The Component Editor [Window > General Editors > Component Editor]

Once the skin deformer has been applied, there will probably be joints that pull on areas of geometry where those joints clearly should have no influence. For example, the left foot will probably pull on the right foot. The shoulders will probably pull on the face and hair. This is actually a pretty simple problem to fix when using the component editor. Simply select the CVs or vertices in question, and open the component editor. Choose the Smooth Skin tab. Here you will see a list of the selected points in the left hand side of the window, and across the top you will see all of the joints that affect those points. The values total “1” for full influence. Left mouse button (LMB) click and shift + select all of the values for the joints in question. This highlights the values in the columns for the joints where you can type “0” to remove the influence. On occasion, the column may not disappear because the value may be “1” indicating that joint has full influence on a point. If this happens, simply type “1” on a joint that should influence the point. (For example, if the left toe joint is affecting a point in the right foot toe area, type “1” on the right toe joint column for that point.)

image

The Component Editor showing several vertices and which joints affect them.

(New in Maya 2008) – Smoothing the Skin [Skin > Edit Smooth Skin > Smooth Skin Weights]

Once the skin deformer is applied, there will probably be areas that push in or pull out of the geometry when the joints are rotated. The most common areas where this occurs are under the arm in the armpit region, around the waist in the pelvic area, and at the top of the thigh. To fix this problem, select the vertices in question and go to [Skin > Edit Smooth Skin > Smooth Skin Weights]. This new feature does a pretty good job of fixing those faulty areas. Any remaining issues can be adjusted with the Paint Skin Weights Tool.

image

After smooth binding, you may have undesirable deformation (left). After applying the smooth skin weights, the results are much better (right).

Adding Influences [Skin > Edit Smooth Skin > Add Influence]

Once the skin deformer has been applied, there may be areas that pinch when rotating the joint (such as the elbows and knees). First make sure that there is adequate geometry in the area. If lack of geometry is not a problem, additional joints may be added as influences to help keep the shape from pinching when the joint bends the geometry. Influence objects can also be used to create muscle bulges and breathing motion.

image

The Add Influence Options.

Paint Weights – [Skin > Edit Smooth Skin > Paint Skin Weights Tool]

Additional skin deformation problems can be addressed interactively with this tool. The approach to use is the idea of adding influence to joints (that should be affecting a particular area) as opposed to removing influence from joints that affect the area incorrectly.

image

The Paint Skin Weights Tool.

Mirror Weights – [Skin > Edit Smooth Skin > Mirror Skin Weights – option box]

For solid pieces of geometry (like the torso, or a seamless character), you only need to paint weights on one side (left OR right, but be consistent). This tool can be used to mirror the skin weights to the other side. For this tool to work properly, the character must be completely centered at the origin on the X-axis, and the geometry must be identical on both halves.

image

The Mirror Skin Weights Options.

One Final Challenge

Now that you have a foundation in the rigging process, challenge yourself with characters that are not bipeds. All of the tools and techniques that you have learned can be applied to other types of characters and creatures. Remember, start in the beginning and do your research.

image

Mr. Bojangles by Luke Nalker (2006).

Summary

8.1  Skinning is a deformer that controls geometry points with joints.

8.2  There are two types of skin deformers: rigid bind and smooth bind.

8.3  Rigid bind assigns each point to only one joint in the skeleton.

8.4  Smooth bind assigns each point to one or more joints in the skeleton. Smooth bind allows a single point to be shared across multiple joints. Because of this, smooth bind provides smoother deformations.

8.5  The component editor provides a quick and easy way to edit individual points on the smooth skin.

8.6  The total amount of influence that point can have must equal one. This can be spread out on several joints or found on a single joint.

8.7  The smooth skin weights tool provides a quick easy way to spread the weights of selected points to joints nearby.

8.8  Influence objects can be added to a smooth skin and used to help obtain the results of a particular shape during the deformation process when joints are rotating. They can also be used to mimic muscle contractions and breathing.

8.9  The paint skin weights tool is an interactive approach to adjusting how the joints influence the points in the geometry.

8.10  Correcting the skin weights on the geometry is a tedious and time-consuming process. The mirror skin weights command provides the ability to reflect the corrections from one side of a character to the other. Because of this, the time correcting skin weights can be reduced in half.

8.11  It is important to remember to save often during the scanning process. It is a good idea to save versions of your files and save often.

Assignments: Skinning a Character

Because of this process can be a long and tedious one, it is a good idea to save your work often. In case there is a problem, you can simply reopen the latest file. Many times the undo command does not work during the skinning process.

Assignment 8.1: Skin the Character

Set up your work environment by doing the following:

1.  Open Maya and set your project.

  From your computer’s desktop, go to [Start > Programs] and select Maya.

  Once Maya is open go to [File > Project > Set …] and browse to your project folder then click OK.

2.  Open your last saved file: Go to [File > Open] and select 07_asgn01.ma.

3.  Turn off X-ray Mode. In the view panel, go to [Shading > X-ray].

4.  Import your objects from the reference file if you didn’t do this in Chapter 6.

  Open the reference editor by going to [File > Reference Editor]

  Click on the filename to highlight it, then in the reference editor window, go to [File > Import Objects From Reference]. This will PERMANENTLY import the reference file into your scene.

5.  If you didn’t do this in Chapter 6, make sure that history has been deleted from the geometry, except for the blend shape deformer. To do this, go to [Edit Delete by Type > Non-deformer History]. DO NOT DELETE HISTORY FROM THE EYELIDS if you have created them using the NURBS sphere method as discussed in Chapter 2.

6.  If you didn’t do this in Chapter 7, take time now to go through the outliner and hypergraph and rename your geometry nodes as appropriate.

7.  Make sure that your geometry layer is set to normal by clicking on the R until the box is empty so that you are able to add the geometry to the selection.

image

Setting the geometry layer to NORMAL.

8.  To make selection easier, open your outliner by going to [Windows > Outliner]

9.  Select the skinnable joints (open the + next to skinJoints in the outliner and drag select all joints).

10.  Hold down the shift key and click on the character geometry piece(s).

11.  Go to: [Skin > Bind Skin > Smooth Bind – option box] and reset the settings. Then change the following:

  Bind to: Selected Joints.

  Bind method: Closest in hierarchy.

  Max influences: “3”.

  Click apply.

image

Skinning your character.

12.  If the Master_ctrl is moved at this point, the body geometry explodes out of the rig because it has two inputs of control: the skin deformer and the Master_ctrl (acting as a parent node). This leads to double transformations in the geometry (moving twice as far as everything else).

image

Geometry moving with double transformations.

To solve this problem, do the following:

  In the PERSPECTIVE window, select the geometry that is moving away from the control rig. (If your geometry was already in a group, like mine is, make sure to find the group in the outliner and select that instead.)

  Press (ctrl+a) to open the attribute editor.

 i.      Select the first tab.

ii      Under Transform Attributes set the following:

1.  Remove the check next to inherits transform. (This makes the geometry free from the parent Master_ctrl transformations.)

image

Turning OFF inherits transform on the geometry or the geometry group.

13.  Save your file as 08_asgn01.ma.

image

If your character has multiple pieces of geometry, it is possible to skin each piece separately instead of all at one time. This usually provides for cleaner binds and less problems to fix. To skin individual pieces, select only the joints in the area of the piece of geometry plus one additional joint beyond, then select the piece of geometry, and then apply the Smooth Bind procedure. (For the head, I would select the neck, skull, chin, jaw, AND the top IK spine joint.)

Assignment 8.2: Fix the Skin Weights Using the Component Editor

1.  Continue working on scene 08_asgn01.ma.

2.  Test the movement of your character by selecting controllers and translating or rotating them around.

3.  Determine if joints are affecting the wrong area of geometry (e.g. the left foot moves the right foot geometry).

image

The main areas for shared weights are usually in the legs and feet, the head and shoulder, or the fingers. Basically, anywhere when you have parallel areas of geometry and joints.

image

In this example, the toe geometry is being affected by both the left and the right toe joints, so there is a pulling of the geometry when the feet move.

4.  In the view panels, go to [Show > None], then go to [Show > NURBS curves], [Show > NURBS surfaces], and [Show > Polygons] (this way you don’t accidentally select joints or IK handles while making corrections).

5.  Select the vertices or CVs that are being affected incorrectly RMB (right mouse button, to display them, and then drag your mouse around to select them).

image

In this example, the right toe geometry vertices are selected. Work only on one area at a time to avoid confusion.

6.  Go to [Window > General Editors > Component Editor] and click on the Smooth Skin tab.

7.  In the top list, find the joints that are affecting these points and should not be. Click on the box in the very top row, scroll down to the bottom of the list, hold down the shift key and click on the bottom row, then type “0” to remove the influence (e.g. the left toe joint should not be affecting the right foot geometry).

8.  Repeat this for other affected areas.

9.  Return the controllers back to their default position by typing “0” in the channel box for the translations.

10.  Save your file as 08_asgn02.ma.

image

Highlighting the column of influence on the joint that should NOT be affecting the area.

Assignment 8.3: Fix the Skin Weights Using the Smooth Skin Weights Tool [Skin > Edit Smooth Skin > Smooth Skin Weights] (New in Maya 2008)

1.  Continue working on scene 08_asgn02.ma.

2.  Test the movement of your character by selecting controllers and translating or rotating them around.

3.  Determine if joints are affecting the geometry too much (e.g. the arm rotation causes the underarm area to indent too far, or the leg translation causes the pelvis area to collapse).

image

In this example, the movement of the foot control is collapsing the pelvis region.

image The main areas for collapsing weights are usually in the pelvic region, the buttock area, and the underarm area.

4.  In the view panels, make sure only NURBS curves, NURBS surfaces, and polygons are seen. If not, go to [Show > None], then go to [Show > NURBS curves], [Show > NURBS surfaces], and [Show > Polygons] (this way you don’t accidentally select joints or IK handles).

5.  Select the vertices or CVs that are being affected incorrectly (RMB to display them, and then drag your mouse around to select them).

image

Selecting the points in the problem area.

6.  Go to [Skin > Edit Smooth Skin > Smooth Skin Weights].

image

The results look MUCH better!

7.  Repeat this for other affected areas.

8.  Save your file as 08_asgn03.ma.

Assignment 8.4: Adding Influence objects

You can use influence objects (additional joints or geometry) to help the knees, heel, and elbows hold their shape when bending. You can also add an influence object in the character’s chest cavity and create a control for breathing. Influence objects can also be used to create simulated muscle flexing, such as in the bicep.

If your character’s knees and/or elbows are pinching when they bend (and you have ruled out that it is a geometry issue, like the flexi straw and regular straw comparison in Chapter 5) extra joints can be placed in those areas and added as influence objects to help hold the shape.

1.  Continue working on scene 08_asgn03.ma.

2.  Test the movement of your character by selecting controllers and translating or rotating them around.

3.  Determine if the geometry is pinching in the elbows and/or knees.

4.  In the view panels, turn X-ray ON.

5.  For the knees: In the side view panel, use the joint tool [Skeleton > Joint Tool] and click a single joint behind the knee at the top of the calf and in the outliner, rename this joint left_knee_influence.

6.  In the front view panel, use the move tool by pressing (w) on your keyboard and position the left_knee_influence and align it with the left leg.

7.  Go to [Skeleton > Mirror Joint].

image

Creating and positioning the knee influence joints.

8.  Select the left_knee_influence, shift select the left_knee, and press (p) on your keyboard to parent. Repeat for the right side.

9.  For the elbows: In the top view panel, use the joint tool [Skeleton > Joint Tool] and click a single joint in front of the elbow at the bottom of the bicep and in the outliner. Rename this joint left_elbow_influence.

10.  In the front view panel, use the move tool by pressing (w) on your keyboard and position the left_elbow_influence to align it with the left arm.

11.  Go to [Skeleton > Mirror Joint]

image

Creating and positioning the elbow influence joints.

12.  Select the left_elbow_influence, shift select the left_shoulder, and press (p) on your keyboard to parent. Repeat for the right side. You should also add influence joints for the heels and parent them to the ankle joints.

13.  To add each new joint influence, do the following:

a.  Select the geometry (if there are multiple pieces, select only the geometry in the area of one influence joint), select one influence joint, and then go to [Skin > Edit Smooth Skin > Add Influence – option box].

b.  Uncheck the use geometry option.

c.  Click Apply.

d.  Repeat for each new joint influence.

image

Adding a new joint as an influence. This must be repeated one at a time.

14.  For the breathing influence, go to [Create > NURBS primitives > Sphere] and rename the sphere breathing_influence.

15.  Using the move tool by pressing (w) on the keyboard, reposition the sphere into the chest cavity of your character. Using the scale tool by pressing (r) on the keyboard, resize the sphere so that it fills the chest cavity of your character, but does not extend outside of the character’s geometry. You can also go into component mode (F8) to reshape the sphere.

16.  To add the breathing influence, do the following:

e.  Select the geometry (if there are multiple pieces, select only the torso geometry), select the breathing_influence sphere, and then go to [Skin > Edit Smooth Skin > Add Influence – option box].

f.  Check the use geometry option.

g.  Click Apply.

image

Adding a piece of geometry as an Influence Object.

17.  In the outliner, select the breathing_influence and the breathing_influence_base that is created. Press (ctrl + g) to group them and rename the group breathing_influence_group.

image

Grouping the influence object and base.

18.  With the group still selected, press (shift) and click on the nearest IK spine joint (mine was IK_spine5). Then press (p) to parent the group to the joint.

19.  Create a control for the breathing influence by doing the following:

h.  Select the upperBody_ctrl and go to [Modify > Add Attribute] and enter the following:

 i.      Attribute name: type “Breathe”.

ii.      Under Numeric Attribute Properties

1. Minimum: type “–1”.

2. Maximum: type “1”.

iii.      Click “OK”.

image

Adding the attribute “Breathe” to the upperBody_ctrl.

i.  Select the breathing_influence and go to [Animate > Set Driven Key > Set …] (this places breathing_influence as the driven in the Set Driven Key window).

 i.      Select the upperBody_ctrl and click “Load Driver” in the Set Driven Key window.

ii.      In the Driver section of the Set Driven Key window, choose “Breathe” in the right column.

iii.      In the Driven section of the Set Driven Key window, choose “ScaleX” in the right column, hold down the (shift) key and also click on “ScaleY” and “ScaleZ”.

iv.      In the Set Driven Key window, click “Key” to set a default pose at “0”.

image

Loading the Set Driven Key window and setting the first key so that when Breathe is set to “0”, the breathing influence is in the default (original) position.

 v.      In the channel box, change Breathe to “1”.

 vi.      In the Driven section of the Set Driven Key window, click on breathing_influence to select it.

vii.      With the scale tool – (r) on the keyboard, scale the breathing_influence until the chest looks inflated with air, as when inhaling.

image

Do not worry if the inhaling does not look correct. You can fix this using [Skin > Edit Smooth Skin > Smooth Skin Weights] or the [Skin > Edit Smooth Skin > Paint Skin Weights Tool – option box] All influences will appear in the Influence section of the paint weights options. The weights will be painted in the next assignment.

iii.      In the Set Driven Key window, click “Key”.

image

Setting the second key so that when Breathe set to “1”, the breathing influence is scaled for inhaling.

    ix. In the Driver section of the Set Driven Key window, click on upperBody_ctrl to select it.

     x. In the channel box, change Breathe to “–1”.

    xi. In the Driven section of the Set Driven Key window, click on breathing_influence to select it.

   xii. With the scale tool – (r) on the keyboard – scale the breathing_influence until the chest looks slightly deflated as when exhaling.

  xiii. In the Set Driven Key window, click “Key”.

image

Setting the second key so that when Breathe set to “-1”, the breathing influence is scaled for exhaling.

j.  Hide the breathing_influence by selecting it in the Perspective window or the outliner and pressing (shift + h).

k.  Test the Breathe attribute by selecting the upperBody_ctrl. In the channel box, click on the word Breathe. In the Perspective window, MMB (middle mouse button) click and drag the mouse left to right to test the breathing motion.

20.  Save your file as 08_asgn04.ma.

Optional assignment 8.7 creates an expression to give automated breathing animation to your character using this Breathe attribute.

Assignment 8.5: Fix the Skin Weights Using the Paint Skin Weights Tool (optional) [Skin > Edit Smooth Skin > Paint Skin Weights Tool – option box]

image

I say this assignment is optional, because you will probably be able to solve all of your weight issues with the tools that we have already used. If you are working in an earlier version of Maya (before Maya 2008), you won’t have access to the Smooth Skin Weights tool, and you will need to paint all of your weights as shown in this assignment.

1.  Continue working on scene 08_asgn04.ma.

2.  Test the movement of your character by selecting controllers and translating or rotating them around.

3.  Identify the problem areas that could not be corrected using the component editor or the smooth skin weights tool.

image

In this example, the movement of the arm shows that the shoulder geometry is not moving with it, causing it to crack slightly.

4.  In the view panels, turn X-ray OFF.

5.  In the view panels, go to [Show > None], then go to [Show > NURBS curves], [Show > NURBS surfaces], and [Show > Polygons] (this way you don’t accidentally select joints or IK handles).

A great tip is to select all of your controllers and set a key frame (Keys can be set by pressing (s) on the keyboard) on all of the controllers on frame one. Move the timeline to frame 10 and rotate or move the controllers to place the character into a pose where the problem areas can be seen. Key the controllers again on frame 10, then move to frame 20 and pose the character again where you can see different problems, and key this pose. MAKE SURE TO DELETE THE KEY FRAMES WHEN YOU ARE FINISHED. To do this, select all of the controllers and in the channel box, click on the top attribute name and shift click on the bottom attribute name. Then RMB and choose break connections.

6.  Select the vertices or CVs that are being affected incorrectly (RMB to display them, and then drag your mouse around to select them).

image

Selecting the points in the problem area.

7.  Go to [Skin > Edit Smooth Skin > Paint Skin Weights Tool – option box].

8.  Under Display section, UNCHECK multi color feedback to see the weights in black and white.

9.  In the Influences section of the Paint Skin Weights Tool – option box, select the joint or influence that SHOULD be affecting the area more (e.g. in this case, the left_shoulder joint).

10.  In the Paint Weights section, use the ADD paint operation and change the value to about 0.1.

11.  You can adjust the size of the brush. Simply hold down the (b) key, place your brush over your model, and LMB click and drag left to right to change the brush size smaller and larger.

12.  Begin painting (single clicks on top of the cross areas of your geometry lines) or click and drag on the geometry.

image

Painting skin weights in a problem area.

13.  You may need to check the surrounding joints and add a little influence there (e.g. the spine joint above and below the one you originally chose to paint, if working on the spine).

14.  Scrub your timeline (to scrub the timeline, click on the indicator in the time line and drag your mouse left to right) to see how it looks (if keys were set on the controls). If keys have not been set, test the deformation of your character by selecting controllers and translating or rotating them around.

15.  You may need to change the Paint Weights section to SMOOTH and paint the joint that should NOT be affecting that area (in this example, the shoulder joint), then also smooth the other joints in the area.

16.  Repeat this for other affected areas.

17.  REMEMBER, you only need to paint the left side or the right side as we can mirror the weights to the other side in the next assignment.

18.  Save your file as 08_asgn05.ma.

image

MAKE SURE TO DELETE THE KEY FRAMES on the controllers if you created them. To do this, select all of the controllers and in the channel box, click on the top attribute name and shift click on the bottom attribute name. Then RMB and choose break connections.

Assignment 8.6: Mirror the Skin Weights [Skin > Edit Smooth Skin > Mirror Weights – option box]

1.  Continue working on scene 08_asgn06.ma.

2.  Select the geometry that needs to have the skin weights mirrored. Go to [Skin > Edit Smooth Skin > Mirror Weights – option box] and set the following:

a.  Mirror across the YZ axis (on the X axis).

b.  Uncheck positive to negative only IF you painted on the character’s right side and need to mirror to the left (your left to right – character’s right to left).

image

Mirroring the Skin Weights from positive X to negative X.

3.  Save your file as 08_asgn06.ma.

image

This tool doesn’t always work predictably. You may have to go back and paint weights here and there, but it does generally save you a lot of time.

Assignment 8.7: Create a Breathing Expression (Optional)

1.  Continue working on scene 08_asgn06.ma.

2.  Create an expression that will automatically animate the Breathe attribute by doing the following:

a.  Select the upperBody_ctrl and go to [Modify > Add Attribute] and enter the following:

 i.      Attribute name: type ‘BreathSpeed’

ii.      Click ‘OK’

image

Adding the attribute ‘BreathSpeed’ to the upperBody_ctrl.

b.  Create the expression. Go to [Window > Animation Editors > Expression Editor] and type the following in the Expression section:

upperBody_ctrl.Breathe = sin(time * upperBody_ctrl.BreathSpeed).

 i.      Click ‘create’

image

This expression makes Breathe equal to the value of BreathSpeed (the number set in the channel box) times the current time line value and multiplies it with a sine wave. The sine wave causes the value of Breathe to fluctuate between –1 and 1 (where –1 and 1 are also the min/max of the Breathe attribute).

3.  Test the expression:

a.  Select the upperBody_ctrl.

b.  In the channel box, change BreathSpeed to ‘5’.

c.  In the timeline, press the play (>) button to see the breathing occur.

image

Creating the expression for breathing.

image

The BreathSpeed Attribute can be set to ‘0’ for no motion, or any other number to vary the speed. The breathing motion will automatically occur when animating.

4.  Click on the attribute word Breathe in the channel box. Since the channel is purple, hold down the RMB (right mouse button) and choose Hide selected.

5.  Save your file as 08_asgn07.ma.

Assignment 8.8: Create a Smooth Switch for Polygonal Characters (Optional)

This should be done AFTER skinnings!

1.  Continue working on scene 08_asgn07.ma (or 08_asgn06.ma).

2.  Select the polygonal geometry and go to [Mesh > Smooth]. (If any geometry is parented to other geometry, this will not work. You must first un-parent by selecting the children and pressing (shift + p) on the keyboard, smooth, then reparent.)

3.  Select the Master_ctrl and go to [Modify > Add Attribute] and enter the following:

a.  Attribute name: type ‘SmoothSwitch’

b.  Under Numeric Attribute Properties

 i.      Minimum: type ‘0’

     ii. Maximum: type ‘2’

c.  Click ‘OK’

image

Adding the attribute ‘SmoothSwitch’ to the Master_ctrl.

a.  Select each piece of polygonal geometry (or the one combined piece, if you took the time to combine it in Chapter 2), in the Inputs section of the channel box, click on polySmoothFace1, and then go to [ANIMATE [>] SET DRIVEN KEY [>] SET …] (This places the geometry as the driven in the Set Driven Key window.)

 i.      Select the Master_ctrl and click ‘Load Driver’ in the Set Driven Key window.

ii.      In the Driver section of the Set Driven Key window, choose SmoothSwitch in the right column.

iii.      In the Driven section of the Set Driven Key window, click on polySmoothFace1to select it.

iv.      In the Driven section of the Set Driven Key window, choose ‘divisions’ in the right column.

 v.      In the channel box, change divisions to ‘0’

 vi.      In the Set Driven Key window, click ‘Key’, setting a default key.

vii.      In the Driver section of the Set Driven Key window, click on SmoothSwitch to select it.

viii.      In the channel box, change SmoothSwitch to ‘2’.

ix.      In the Driven section of the Set Driven Key window, click on polySmoothFace1to select it.

x.      In the channel box, change divisions to ‘2’.

xi.      In the Set Driven Key window, click ‘Key’.

xii.      Return the character back to the non-smoothed version. In the Driver section of the Set Driven Key window, click on SmoothSwitch to select it.

xiii.      In the channel box, change SmoothSwitch to ‘0’.

image

Loading the Set Driven Key window and setting the first key so that when the SmoothSwitch_is set to ‘0’, the Polygonal Mesh will not be smoothed.

image

Setting the second key so that when the SmoothSwitch_is set to ‘2’, the Polygonal Mesh will be smoothed.

image

This provides an easy way of switching the display of the low res polygonal mesh at SmoothSwitch = 0, and the higher res for rendering at SmoothSwitch = 2.

4.  Return your geometry layer back to reference by setting the layer to R so that you are unable to select the geometry by mistake when animating.

5.  Save your file as 08_asgn08.ma.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.188.116.83