<?xml version="1.0" encoding="utf-8"?>
<tutorial>

<description>Learn how to connect and animate bones in 3D Studio Max.</description>
<keywords>3d studio max, bones, connecting, animate, video, tutorial</keywords>
<title>Connecting and Animating Bones</title>

<slug>
Connecting and animating bones is one of the fundamental skills required for making computer-generated animation. This tutorial will how to do it and in spoonodelic style, nonetheless.
</slug>

<mid>
 
<p>The following tutorial works best if you have a character that you have created and would now like to animate.  If you don't have a character, the following 3DSMax file will provide you with something to practice on. Please right click and <I>Save As...</I> <link><url>leg.max</url>this link</link>. This tutorial will go through the motions of applying a simple <B>IK Bone Setup</B> and key frame animation.</p>

<p><B>Part One: Laying Down The Bones</B></p>
<p>Creating bones is a fairly simple process, however, it is important to remember that you can only create things on the home <B>Grid</B>.  If you attempt to create bones from the perspective viewport without a <B>Grid</B> directly behind your character (or limb), then the bones will be placed in areas you did not think they would end up.
</p>

<p>
<stepnumber>1</stepnumber>
 Go to the <B>Command Panel>Create Tab>Systems</B> and choose <B>Bones</B>.
</p>

<p>
<center><image><name>info.gif</name><width>215</width><height>168</height><alt>Information</alt></image></center>
<stepnumber>2</stepnumber>
Select the display window that displays your limb and the grid directly behind it.  The following uses the <B>Left Viewport</B> as a correct choice, and the <B>Perspective</B> as the wrong choice.
</p>

<p>
<center><image><name>leftperspective.gif</name><width>302</width><height>245</height><alt>Picture 2</alt></image></center>
<stepnumber>3</stepnumber>
Click and drag for each bone you want to create.  This is a fairly simplistic IK chain and will only require four bones, for the hip, knee, ankle, and toes.  Right-click to end the chain.
</p>

<center><image><name>bones.gif</name><width>120</width><height>296</height><alt>Bones</alt></image></center>

<center>---------------------------------------------------------------</center>
<p><B>Part Two: Creating the IK Chain</B></p>

<p>
<stepnumber>4</stepnumber>
If you try moving any of the bones, they will swivel from the bone above it and the bones below will remain locked.  However, 3DSMax will do a lot of the work necessary to constrain the bones to bend more naturally.  Select the bone between the toe and the ankle so that it is highlighted.
</p>

<p>
<stepnumber>5</stepnumber>
Select the <B>Animation>IK Solvers>HI Solver</B> from the top menu (6th from the right)
</p>

<p>
<stepnumber>5</stepnumber>
Before continuing, make sure that the mesh editing selection tools are unselected. Just as the image above shows that the vertices are chosen (in yellow), they must be clicked again to shut it off (and removing the yellow highlight.) 
</p>

<p>
<center><image><name>animation.gif</name><width>321</width><height>47</height><alt>Animation</alt></image></center>
<stepnumber>6</stepnumber>
Complete the creation of the <B>IK Chain</B> by selecting the top most bone.
</p>

<p>
<center><image><name>topmost.gif</name><width>60</width><height>268</height><alt>Top</alt></image></center>
<stepnumber>7</stepnumber>
Complete the creation of the <B>IK Chain</B> by selecting the top most bone.
</p>

<center>---------------------------------------------------------------</center>
<p><B>Part Three: Skinning and Envelopes</B></p>

<p>
The final portion of this animation will skin the bones to the limb so that when you move the cross-hair, the leg will move in the same way.  However, even though it should work 'out-of-the-box' it never does and some tweaking will need to take place.  This is where <B>Envelopes</B> will come in.
</p>

<p>
<stepnumber>8</stepnumber>
Select the limb and then select <B>Modify</B> on the <B>Command Panel</B>.
</p>

<p>
<stepnumber>9</stepnumber>
Click the <B>Modifier List</B> and scroll down to the <B>Skin</B> option.
</p>

<p>
<stepnumber>10</stepnumber>
In the <B>Parameters Rollout</B> click the <B>Add Bone</B> and choose the all the bones and the IK Chain.  Click the <B>Select</B> button when done.
</p>

<p>
<stepnumber>11</stepnumber>
<center><image><name>skin.gif</name><width>163</width><height>356</height><alt>Skin</alt></image></center>
Try moving the IK Chain (the blue cross) now.  The limb will probably move, but there is something obviously wrong!
</p>

<p>
<stepnumber>12</stepnumber>
Leave the leg out of position so that you can see the stretching.
</p>

<p>
<stepnumber>13</stepnumber>
Select the limb once again and select <B>Modify</B> and then <B>Edit Envelopes</B>
</p>

<p>
<stepnumber>14</stepnumber>
Select any of the bones and it will provide you a highlighted area of the leg.  These highlighted areas are envelopes that control how much strength and control each bone has on a limb.  Wherever two envelopes overlap, a bending will occur that is much softer and create the movement expected at a joint in the body.
</p>

<p>
<center><image><name>envelopes.gif</name><width>421</width><height>189</height><alt>Envelops</alt></image></center>
<stepnumber>15</stepnumber>
Both ends of each <B>Envelope</B> has handles.  By adjusting the coverage of these handles the bones will highlight vertices with red, blue, and yellow colours.  The red is unyielding, yellow is a shared control between two <B>Envelopes</B>, and blue shows minimal control.
</p>

<p>
<stepnumber>16</stepnumber>
The final result will allow your limb a normal movement without any stretching or abnormalities.  The bones can be taken further by examining the <B>Skin</B> modifier properties.  By selecting <B>Skin</B> so that it is highlighted, <B>gizmo's</B> can be setup for muscle and joint movement.  Imagine having the muscle bulge when flexed! Below is what it should look like.
</p>
<![CDATA[

<p align="center">
<OBJECT ID="MMPlayer1" WIDTH=320 HEIGHT=240 classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"  
			 CODEBASE="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"
			 standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject">
			<PARAM NAME="FileName" VALUE="spoono.mpg">
			<PARAM NAME="ShowControls" VALUE="1">
			<PARAM NAME="ShowStatusBar" VALUE="0">
			<PARAM NAME="ShowGoToBar" VALUE="0">
			<PARAM NAME="PlayCount" VALUE="10">
			<Embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/download/default.asp" src="spoono.mpg" Name=MMPlayer1 ShowControls=1 ShowDisplay=0 ShowStatusBar=0 ShowGoToBar=0 width=320 height=240>
</embed></p>
</OBJECT><br><br>

<div class="gray13" align="center">----------------------------------------------------</div>

<P> As a final note, you may want to take a look at the leg provided for this tutorial.  It was created out of a single box with nothing more than the bevel tools and a smooth modifier.  Notice that wherever the joints move, lines and vertices were created to allow the bending to occur.  Consequently, the absence of points, or too few points can make the animation look horrible no matter how the bones have been setup.
]]>

</mid>

</tutorial>
