tgj2o_3d-rigged_characters_blender

include component="page" page="course_tabs_header" include component="page" wikiName="jmcintyre" page="menu_tgj2o_crumbs" include component="page" page="menu_tgj2o_animation"

include component="page" page="menu_tgj2o_3d_blender" =Animating using a rigged character= 

Alternate assignment to UFO
We are going to assume you've created a complex wire-mesh character, and you've "boned" the character (that is to say you've assembled an armature for the character that resembles bones to move it properly). The next stage of animation is to use your boned character and make it move. For this exercise you're going to use [|this model here]. I've provided it for you in this 7zip file which will save the board a bit of bandwidth.

[|>>>DOWNLOAD THIS <<<]

You will need to use 7zip in order to unzip the package. Within the package you'll get a series of files. If you don't have 7zip, [|get it here]. Make sure it's on the D: drive and install it.

Once the package is unzipped into a folder make sure you move it to a location in your server-space (or on the D drive).

Step 1: Turn on armatures/cameras/lights
When we open the blender file called //**"Flash_Barry_Allen_hero127.blend"**// in the folder we see a really cool model of the Flash! But we want to be able to move him. To do that we need to see his "bones".

Go to the Scene navigator in the top right and unhide everything.

You'll now notice giant blocks pushing through Flash. That's gotta hurt! These are his bones with the exception of the one main post that seems to be pushed up his nether-regions (the control bone). There are 2 clickable objects now when you click on/near Flash. Flash himself (the mesh) and the armature.

But sometimes a problem exists - we can't see the armature where it penetrates into the model's body. To ensure it's working properly we select the ARMATURE in __object mode__, look to FAR the right side at the properties editor. Notice something you haven't seen before? An Armature and a Bone tab both exist. You want to go in the armature tab and under display you want to click __**on**__ X-RAY if it is unchecked. That allows us to see through the mesh at the bones. Your model should now look like this:

Step 2: Pose-Mode
Some theory - because somebody's already parented the body to the bones inside of them, when the bones are moved, the mesh nearby moves. This is a part of modeling known as "Weight Painting". While that's beyond the scope of this course, if you wanted to adjust the location of where an armature's influence is, you'd change the parts of the mesh that would be affected. For example, below is an example of the mesh-area that is impacted by the bone underneath it. Areas close to red are areas of more influence.

We are going to only be working in POSE MODE and translate/rotate ONLY various bones to give our model the appearance of walking. To enter pose mode you select only the armature, then either press CTRL+TAB or go down the the menu at the bottom of the 3D window and switch the selector to POSE MODE.

Step 3: Switch the rotation center
By default, the rotation center in this model is the origin. We need to change this. Why you ask? Go into FRONT ORTHO view (1 on your keypad). In pose-mode __**select the right collar-bone**__. The author of the model didn't call bones by their proper names or heirarchy (a professional boo-boo). Instead his armature name for the model's right shoulder is __**VisualSceneNode41**__ (likely a default name).

When you attempt to __**rotate this bone (R) around the Y axis**__, the whole shoulder deforms weird and pulls the mesh from the body. This is because our rotation point for that bone is set to the 3D cursor, which is at the origin still. We want to switch the rotation point to something OTHER than 3D cursor (in this case BOUNDING BOX is just fine - it's at the bottom of the screen next to the shading menu).



Now when you rotate (R) around Y axis (y) the shoulder deforms properly. Notice you can't really rotate it too far before it looks silly? This is because humans can't do that either.



Play around with various bones in the body, rotating them around their various axes. Get used to what the body can do. In our next step we're going to make Flash walk.

Step 4: Walk cycle - setting up for poses
In modern animation people use what is knows as Inverse Kinematics (IK). IK allows us to grab controlling bones for the body and move them to allow the rest of the body to move easily. We are only partly doing that sadly (legs only, but typically it's done with the arms and torso as well). Because this is a model from taken from the internet we don't have control over what bones have been placed where. I edited the leg structure so that IK works for them, but the hands have been "boned" oddly, thus we're going to have to work with what we have.

Next we are going to create a library of poses, then allow the animation library to access them to create a walk cycle. Below is an example of how easy life can be using IK. If you want to know more about IK, [|here's a (not so) quick and dirty tutorial] media type="custom" key="25433516"

So we're going to create a walk cycle manually using this POSE LIBRARY. First things first, we're going to rotate all the bones along X/Y/Z so Flash looks normal standing there. It's easiest to do this with what is called QUAD VIEW (CTRL+ALT+Q, or VIEW>Toggle Quad View). Arrange Flash so he looks comfortable



You may want to change the bone view to STICK instead of OCTAHEDRAL at this point to make viewing bones for poses easier. Finally, we want to open up the pose library section of the properties manager and create a new library called **Flash.Walk**

We're now ready to start entering poses.

Step 5: Walk Cycle
We're going to drag our left foot control bone (the thing leaving the bottom of his foot) and move it a bit forward, we're also going to cant the body forward and swing the arms according to how somebody walks (leading leg means trailing arm). Crucially, **__we need to select all the bones__** and then going to press the + symbol (Add Current Pose to library) in the Flash.Walk library of poses. This will enter the pose in the library. Rename this pose to Flash.Walk.1.

We are going to insert this as a keyframe in our animation. You are to navigate to frame 1, press the i key, and insert a WHOLE CHARACTER frame. End your animation at frame 24 (1 second of motion). Now go to frame 24 and hit 'i' to insert whole character again. This ensures that the first and last pose are the same so our "loop" works nicely. Before we do anything else, on frame 1 select all the bones (A key) and press CTRL+C (copy, or alternatively, POSE>Copy Pose from the menu). Next we're going to go to frame 12 (the midpoint of our stride). At this point our bones should be mirror images of each other, so we're going to SHIFT+CONTROL+V (or alternatively POSE>PASTE X-FLIPPED POSE). Our legs will be nice mirror images of where they were, but the arms go all wonky. We need to fix the arms into their new position. As well, any other adjusted bones may need to be re-adjusted now. Do so. Once you're happy with a "mid-stride" pose insert it into our Pose Library at the right. Call it __**Flash.Walk.2**__

Press play on the animation. Fantastic you think - but notice how the character is "gliding". We want him to walk normally (i.e. bounce). As such, we're going to go to frame 6, and grab the main control-bone (the one sticking up his keister, called VisualSceneNode1) and translate it up the Z axis just a little bit (less is more is the old adage, small changes make things far more believable than large changes). If you like the change enter the pose in the library as Flash.Walk.3

Change to frame 18 and select all bones. In the Pose Library, click on Flash.Walk.3 and click on the icon that looks like a magnifying glass. This applies the library pose to your current bones. This is good. Pressing play makes it look like Flash is actually walking. media type="custom" key="25436684"

Step 6: Make it interesting
Fine. We have a walk cycle. What would make it interesting is if we were able to continue on and have, say, a background and make it look like Flash is actually walking around. Thanks to our Pose Library, we can. We can copy those basic poses, and apply them every 6 frames (1/4 of a second). First we're going to. Then we're going to go back into OBJECT MODE. [souce:http://sciencelakes.com/data_images/out/19/8829938-wheat-field-background.jpg]]

Once in OBJECT MODE turn OFF the Automatic Keyframing for animation purposes. __Switch to an overhead view__ and put the 3D cursor along the Y axis off behind our friend Flash.

Now, press SHIFT+A and insert an empty image

In the Properties Editor on the right, open the Wheat Field Background. You'll see a tiny copy of the wheat field from overhead.

Now we're going to scale it bigger and rotate on the X axis it so it is behind Flash.

We're now going to go back to quad-view which is CTRL+ALT+Q. This will help us position Flash to make a more realistic walk-cycle against the background. Set up the distance between the Wheat Field image, Flash and the camera such that AT FRAME 1 the camera view looks like this.

Notice in OBJECT MODE I have the armature selected to move where Flash is. Once you're happy with how far away he is, turn on the KEYFRAME INSERTION button (Red circle) to start animation. Press i to insert a LOCROTSCALE keyframe. Turn OFF keyframe animation now switch to frame 24. Reposition Flash and the camera such that your final picture looks like this. turn on KEYFRAME INSERTION and insert a LOCROTSCALE for the armature placement. Notice Flash is still going through his poses even though the armature is moving?

The danger of not actually modeling our ground is that we have to be particularly careful about making it look like he's walking at a realistic speed. Even here it's easy to make his step "slide" while he switches feet.

Step 7: One extra thing
Ok, that's cool and all, but what about making it even more believable? Aside from lighting (which you can do if you want, but the purpose here is simply to introduce poses), the other things that could be done to increase believability would be a head turn, and a longer walk. We're only going to introduce a head turn as if Flash was looking at something to the side.

Go into POSE MODE. Turn on KEYFRAME INSERTION and grab Flash's neckbone. Go to FRAME 8 and turn Flash's neck (rotate) so that he's looking off to the side. Press i to insert a LOCROTSCALE keyframe. Now, with ONLY the neckbone selected, press CTRL+C (copy). Go to FRAME 15 and paste (CTRL+V). Notice how Flash's head goes to the same rotation? Press i to insert a LOCROTSCALE keyframe. Play your cycle.

Great - we're done! Only when we go to export the animation (using the same type of render settings as in the last assignment), the background isn't showing up is it?

Step 8: Replacing empty with a textured surface
What we need to do next is create a surface with that exact same texture on it (picture) with that exact same size. To find out the size of our empty is easy. We are going to click on the protractor/ruler button

Let's drag the protractor across the bottom of the empty. Your value may be different, by my empty is 46.3 units across. My vertical value is 27.8 units.

So what I need to do is ADD>MESH>PLANE and on the right side with N key (the property inspector) open, put in your X and Y values for the plane. You will probably have to rotate the plane 90 degrees to make it line up with your empty. I also had to increase the size of Y from 27.8 to 28.972 in order for it to cover it properly. When viewed from the front, side and top the plane you made should line up with the empty that has the drawing on it. Quad View is helpful for that.

Now all that remains to do is texture the surface of the plane just like how we put the starry sky on the dome in our last assignment. We'll make sure that the PLANE is selected and go to MATERIALS on the right side properties panel. Create a new material slot for the plane (top right +), then create a new material IN that slot (the + sign farther below). Now to go textures.

So, what we're going to do is make a **new world texture** (the blue circle to the left of the one displayed below) called BACKGROUND. Now click on the next circle that is TYPE OF TEXTURE and choose source as IMAGE and go down to the image-select dropdown. Navigate to your WheatField picture and select it.



Finally, up in the Scene navigator at the top right you'll notice that you can hide the EMPTY and with only the Plane (I've renamed mine to Plane.WheatField.background) turned on you can still see our wheat field.

Setup up the render for export now using the H264 codec as in the UFO tutorial.

Complete the rigging tutorial and submit the BLEND file and the H.264 file.
by teacher and documentation of progress in journal), but required reminders on one or more occasions to do so. || Used time poorly (as shown by observation by teacher and/or documentation of progress in journal) in spite of several reminders to do so. ||
 * **CATEGORY** || **4** || **3** || **2** || **1** ||
 * **Diligently follows tutorial** || Judicious use of tools lead to an exemplary product || Small errors in the use of the tools results in a product that is completely acceptable, but does contain noticeable flaws || The piece has many distracting elements but the tool use is obvious. || Either in following the steps, or mistakes in the use of the tools, the work is largely flawed. ||
 * **Practical product** || Stylistic choice in tones, arrangement and colour choices in presenting the render show no errors in following steps || Overall the piece is well constructed, but the some steps have been missed. || Generally the piece is satisfactorily constructed, but the end result is lacking in many areas. || The render is incomplete, or shows signs of obvious neglect in process. ||
 * **Use of Time** || Used time well during each class period (as shown by observation by teacher, and documentation of progress in journal) with no reminders. || Used time well during most class periods (as shown by observation by teacher, and documentation of progress in journal) with no reminders. || Used time well (as shown by observation