5 Skeletal Editing

This chapter is about various ways to edit skeletal data, that is, data that’s rotational in nature. The skeletal editing techniques that will be discussed include retargeting, blending, inverse kinematics (IK), floor contact, rigid body, looping, and poses. Let’s start with retargeting.

5.1   Retargeting

When we have mocap data that has been applied to a target skeleton, it is very possible that the source skeleton (the skeleton in the data) and the target skeleton do not have the same proportion. That is almost always the case between the capture subject whom markers were attached to and the 3D character that you want the motion to go onto. Some allowances must be made for the proportional differences in order for the motion to fit the target skeleton as well as possible.

Retargeting is more than just slapping the rotations and translations from one skeleton to another. It is about trying to adjust for the proportional differences while keeping the motion from suffering, looking too stiff, quirky, or weird. Retargeting itself is a discipline and one of those challenging research areas that people are constantly working on.

The key to retargeting differs depending on the type of motion you are working on. A retargeting strategy works well for a walking character but may not work for a character crawling on the ground. The retargeting setup for a quadruped or non-biped creature must be different from the ones for biped humans. To deal with a variety of situations, retargeting requires sets of strategies. We will discuss a retargeting method for a biped human here. We would like you to look at the retargeting process as a whole and what it does, and understand why you do what you do. That way you can develop an effective retargeting strategy when you come to a scenario that we do not cover in this book.

5.1.1   Reducing need for retargeting

The classic retargeting problem is “We’d like to capture this actor who is 6 feet and 2 inches tall but apply the data to the character that will be only 3 feet tall.” Even with casting, it is extremely difficult to find a 3-foot tall person for the motion (Figure 5.1). Kids do not have the same proportions or move the same way as adults. Look at a book on figure drawings. You can see differences in proportions between adults and children, men and women. Drawing in a sketchbook can help you create differently proportioned skeletons, instead of trying to use one skeleton based on an adult male for all of your characters.

Image

Figure 5.1   Large source and small target

You need to work closely with whoever is directing the mocap shoot as well as anyone else who has a say in the final outcome. Should the 3-foot tall person act like an adult, a child, or something altogether different? You will be editing motion differently for each scenario. Understand what is needed as well as what can be done during the mocap shoot to solve possible problems before they happen.

One method is to have a scaled-up set in which everything is larger than normal. In the set the 6 foot 2 inch tall actor should behave like a 3-foot tall person. This method works well unless you have to mix several differently proportioned characters. Another method is to place multiple targets for differently sized characters in the mocap space. If a small character needs to reach up to hit a target (e.g., it is going to shake hands with a taller character), it reaches a higher target while the taller character reaches down to touch a lower target. This will get the captured motion closer to its target but it will still require editing.

5.1.2   Scaling a skeleton

If you are going to apply the motion of a tall person (the source skeleton) to a much shorter character (the target skeleton), what are the obvious problems? One is that a normal stride for the tall person is much greater than the smaller person. To match the stride, first try to scale the source skeleton down to make as close a match between the two skeletons as possible (Figure 5.2). Assuming that the feet are normally in contact with the floor, the length from the waist of the skeleton to the bottom of the foot is important. This is what you need to try to match up. Do not worry if the overall heights do not match up. In this case the waist to foot length is more important.

Image

Figure 5.2   Same size source and target

You can scale the target skeleton up or the source skeleton down. Each will give you the same basic results. When an end character’s size and proportion are set, you need to scale the source to match the character rather than the other way around. Either way write down your scaling factors so that you will use them consistently.

If multiple capture subjects who interact with each other are captured together, retargeting must be done without scaling source skeletons or with scaling them all using the same scaling factor. If you scale the source skeletons using various scaling factors, the target skeletons’ relationship to one another will be skewed and none of their interactions will line up. Shaking hands is one of the best examples. If you capture two people who are 6-feet tall shaking hands and apply the data to a 3-foot tall character and an 8-foot tall character, the hands will no longer line up. This is a problem that you can overcome with retargeting to some degree. But think about it before the capture. Instead of relying on retargeting, have the actors compensate for the size differences during capture. Preventing or reducing the need for retargeting is important.

If the corresponding joints of the source and target skeletons are in different locations, you may see some unusual hyperextensions or the knees locking out, appearing very stiff (Figure 5.3a). If this happens, start playing around with the scale factor until the legs look more normal (Figure 5.3b). If you are really stuck and cannot get it to work well, try letting the target skeleton be a little larger than the source skeleton. The reason for this is that the target will always be able to reach at least what the source reaches. If the target is smaller, you are more likely to see the joints locked out or hyperextend.

Image

Figure 5.3   (a) Locked out knee rotation; and (b) Locked out knee rotation corrected

5.1.3   Fixing foot sliding

Let’s suppose that your source and target skeletons are pretty close and you have them matched up fairly well. There is no hyperextension or joint locking but the feet are still sliding a lot. MotionBuilder and other motion editing software allow you to use a type of IK that will adjust the target skeleton to place its ankles, balls of the feet, or toes exactly where that of the source skeleton is located (Figure 5.4a). Do this with both position and orientation of the ankles. If you apply this to the ankle and toe of the same foot simultaneously, beware that the constraints may fight each other. The foot may end up with even more sliding if the ankle and toe are constantly trying to push or pull the joints to match (Figure 5.4b). This is difficult to see when looking at a frame, but in motion you can see if the foot is unstable and trying to satisfy multiple constraints.

Image

Figure 5.4   (a) Ankle reaching source’s ankle position; and (b) Toe and ankle reaching source’s positions

When working with the feet, turn off any type of influence to the hips. Many people leave it on at times but it is usually better not to mess around with the hip rotations and translations at all. The reason for this is that the hips are the root of the skeleton and normally the only source of translation. If you rotate or translate the hips everything else in the skeleton is affected. That can change the characteristics of the whole motion. Both the hips affected during retargeting and over-smoothed data results in a motion that looks as if it had no weight at all (called “floating motion”). This is one of the biggest criticisms on mocap, so try to avoid it.

5.1.4   Working on the spine

The spine is a difficult area to edit. Minor tweaks to it can cause large changes but sometimes it has to be edited. You want the spines of the source and target skeletons to match up fairly well but this is not always possible. Sometimes the source and target skeletons have spines with different lengths. If the source skeleton can bend over and reach the ground with its arms, the target skeleton, with different proportions, might not be able to reach the ground when it bends over. In Figure 5.5, you can see that the target skeleton in white has a shorter spine than the source skeleton in dark gray. The target skeleton’s hand does not reach the ground whereas the source skeleton’s hand does. This is where you may have to use some key-frames for your retargeting and also do what we earlier advised against, allow the hips to move. For every so-called rule in mocap, there are usually a couple of situations where you have to break it.

Image

Figure 5.5   Source reaching the ground but not target

In this situation, you would want the hips to dip lower so the spine and arms can get closer to the ground. It is possible that you are using IK retargeting on the spine and hands. If the hand is supposed to touch the ground or an object, it is important that hands of the source and target skeletons are in the same location. This means loosening everything up a little. That will allow the target’s hand to reach the ground. Most systems allow you to key-frame these changes on and off so that it does not affect the entire motion. You may have to have one setup just for this action. Be ready to have special setups for not so special cases like this.

If the back is also loosened up carelessly, it may look unnatural. If the back is not loosened at all, the shoulder may do some strange rotations in order to get the hand where it needs to go. Play around with these to get the best fit. MotionBuilder has stiffness and pull modifiers that can be used to change how much different parts of the body react. Usually adjusting the back (or torso), neck, and head gets the best possible match between the spines of the source skeleton (Actor) and target skeleton (Character). If these are not adjusted, it may appear that the back moves as one piece and does not curve or bend correctly. That will be very evident when the motion is put on the target skeleton, brought into your 3D package, and the motion is rendered out.

Retargeting is one of the most difficult things to do in skeletal editing. Before going into it, be aware that you will be required to do some tweaking. Being precise will save you from spending a lot of time on tweaking. In the next section you will learn how to blend two different motions together.

5.2   Blending Motions

Motion blending is one of the hardest concepts to learn, so this section may get a little long. Motion blending is taking two motions that have been applied to the same skeleton and merging them (Figure 5.6). If you try to blend motions on different skeletons, there will be a large number of issues that need to be taken care of. So, we will talk about blending two motions that are on the identical skeletons. It should be noted that this is all in relation to MotionBuilder’s Blend tool and that the Story tool may be better suited to your application.

First make sure that two motions that will be blended are on identical skeletons. The two skeletons should have the same hierarchies and proportions. The corresponding joints in the two skeletons should have the same names and the same orientation of the local rotation axes. The lengths and orientations of the corresponding bones in the two skeletons should be the same. Blending is basically taking the rotations of the corresponding joints in a pair of skeletons and interpolating them. Different bone lengths could cause the legs not to reach the ground or go through it. Different joint orientations could cause unwanted rotations. The two motions to be blended should be on identical skeletons but not on two different variations of a skeleton.

If you are trying to make a loop or a very long continuous motion, you may use the same motion twice or more. Reasons to create the long motion by looping are numerous. If your mocap space is 20 ft × 20 ft, the most distance you can get is someone walking across the diagonal line in the space, approximately 28 feet. Let’s say you need your character to walk the entire length of a football field, which is about 360 feet including the end zones. You will need to blend a 28-foot long walking section to itself several times over to get it to cover the entire distance. (Looping will be more detailed in Section 5.6.)

Image

Figure 5.6   One skeleton for multiple blend motions

5.2.1   Selecting a blending point

What will be blended are similar body positions and movement qualities from one motion to the other. This is where blending can get confusing. Think of each motion as a section of time. You have two sections of time that you want to put together. If you put them over each other, then you have a blend area that is too long (Figure 5.7a). If you just place the beginning of one next the end of the other, you have no area to blend across (Figure 5.7b). You want to slide one underneath the other, just taking up enough room for a smooth transition from one motion to the other (Figure 5.7c).

To demonstrate this, let’s think about blending a walking motion (motion A) and a turning motion (motion B). Motion A will be a straight walk across the mocap space. Motion B will be a straight walk that then has a 90-degree turn to the left and then exits the space as a straight walk again (.fbx files are on the CD).

You need to find a blending point, that is, places in the two motions that are similar. It is important to plan for blending and give proper instructions to the capture subject. Otherwise your capture subject may walk at different speeds or with different body postures in the motions that you will need to blend. Have the capture subject walk in a relaxed manner at normal speed if that suits your project. Depending on the project you are working on, you may need to have the capture subject walk in a peculiar way or constantly run. The important point is to have consistency. Consistency makes it much easier for you to select blend points.

image

image

Figure 5.7   (a) Blend area that is too long; (b) No blend area at all; and (c) Good blend area

Suppose that you have one motion where a capture subject is walking at a fast pace and the upper body is bent slightly forward, and another motion where the capture subject is walking at a relaxed pace and the shoulders are slumped down. Thus, you have two very different paces and poses. Most blending software does not know how to change speed or posture in an intelligent manner, that is, it cannot correct inconsistencies between two motions. It simply lets a blended skeleton change from one pose to another in an unnatural way.

A common blend point for walking or running is when a character has one foot on the floor and is shifting weight across the foot. If the left foot is firmly planted on the ground, select the point where the right foot is passing the left leg as the mid-point of the blend (Figure 5.8a). The beginning of the blend can be just as the right foot is lifting up off of the floor and breaks contact with the floor (Figure 5.8b). The end of the blend can be when the right foot moves ahead of the left foot and is about to come in contact with the floor (Figure 5.8c).

This is basically what you want to blend across. If you decide motion A is first, find the last useful step with the left foot on the ground. By useful, we mean you do not want the beginning or the ending of the walk to be incomplete or the mocap subject to turn during the motion. Now look at motion B and find the first useful step with the left foot on the ground.

image

image

Figure 5.8   (a) Right foot in mid-stride passing planted left foot; (b) Beginning of blend with right foot lifting off the floor; and (c) End of blend area with right foot starting to touch the floor again

A note of caution: if a character is standing still first and starts walking, the first step is hard to blend into or out of with another motion. From stance to step is a change in body posture and speed. The same can be said for going from walking to standing. That is even more evident with running. It can take several strides to get up to a running speed and several strides to stop, which are good examples of slow in and slow out. During these times, the acceleration of the body is changing drastically as well as the body posture. When you start to run, you throw your upper body forward, and when you are slowing down to stop, you pitch your upper body straight up, even a little back. There are many different postural relations involved in a regular run. For a good run motion, have the capture subject start as far outside the mocap space as possible and have the subject run all the way through without slowing down until the subject is out of the mocap space. This should give a consistent run that will be easy to loop or blend with other motions.

After selecting the segments of motion A and motion B that will be blended, slide the selected segment of motion B under the selected segment of motion A until the selected segments match up. You may have motion before or after your blend that you will not use. That is fine. Focus on the blend section and keep it well defined (Figure 5.9a). Once you match up the selected segments, tighten the blend section even more by specifying the “in” and “out” points. Motion A will end as the left foot is coming down. Motion B will begin as the left foot is coming off the floor. The in and out points let the blending software know where to start blending and where to end (Figure 5.9b).

image

Figure 5.9   (a) Selected sections matched up; and (b) In and end points specified

5.2.2   Matching positions

It is possible that the two motions are not in the same space. They could be at two different locations. The positions need to be matched; otherwise, a blended skeleton will slide from one location to the other as if it were on roller skates. Use of a “pivot point” or “stable point” allows positions to be matched and a motion to be blended from one to the other in a natural way. Let’s look at how positions are matched using a pivot point in MotionBuilder.

In MotionBuilder, select the left foot joint and Alt-drag it into the blended area. The name of the joint shows up in the blended area (Figure 5.10). Now use the “Match Pivot” button (Figure 5.11a. Your skeletons should align (Figure 5.11b). The blended motion should look like one continuous motion. The last thing you need to do is to click the “Process” key to create the resultant motion and the blending is finished.

image

Figure 5.10   Left foot in blended area

The foot was selected as the pivot point in the example above. Since the foot is firmly planted on the ground, having the foot as a pivot point works well. There are other cases where the pivot point needs to be the hips or the head. Find a stable point in the motion that is “stable” in relation to the reference. If the character is walking on its hands, one of the hands is a good choice. If the character is in mid-air, choose the body part that is rotating and translating the least, but still going with the motion, possibly the hips or the back. In MotionBuilder you can keep changing your pivot point and see the results of the changes until you get the result that you like.

You can blend any number of motions by continually blending one motion with another. For each added motion, choose a new pivot point to match positions.

5.2.3   Dealing with less than ideal cases

What do you do if you cannot find good places to use as a blending point in the motions that you must blend? For instance, if the backs are in two very different poses throughout two motions, there is no good blending point for them. If the motions were blended anyway, the back would change from one pose to another very unnaturally in the blended motion. Use the hips or one of the back segments as a pivot point. That will give you a much better result than not using a pivot point, although the positions of the feet will be changed wildly and you will need to lock the feet’s positions down.

How about speed changes? If you cannot reshoot, use a longer than usual segment for blending. Play around with the length of the blend and fix the feet. Check if the blended motion looks right in terms of a balance. If a person is moving forward and stops, the stance changes, especially in the upper body. If the balance looks wrong, make changes to other parts of the body so that the balance makes sense for the action.

image

Figure 5.11   (a) Match Pivot; and (b) Skeletons are aligned

So what if you want to blend a motion of a large person and a motion of a smaller person or vice versa? It is like Dr. Jekyll transforming into a much larger Mr. Hyde. It can be done, but you will have to decide what part of their bodies you want to be stable. Do you want both feet to remain in the same place as the transformation takes place? Do you want the transformation to happen while he is running? Does it happen in the middle of a jump where you can use the hips to be a pivot point and let everything else grow around it? Once you answer these questions, then you will know how to work on the blend.

5.3   Inverse Kinematics

Forward kinematics (FK) is a method of animating a skeleton where the animator specifies and keyframes the position of every joint in the skeleton. In essence, skeletal data is FK. The only difference is that skeletal data has rotational data of all the joints for every frame while FK has rotational data for key-frames only.

Inverse kinematics (IK) is a method of animating a skeleton where the animator specifies only the positions of the end effectors. Software calculates all the rotation angles of the middle joints in the joint chain to reach the position of an end effector. In key-frame animation IK is usually used for animating limbs.

3D applications, such as Maya and MotionBuilder, offer you a tool to edit skeletal data using IK and blending IK and FK animations. We will discuss this in depth in Chapter 8.

IK solvers in MotionBuilder work all at once. MotionBuilder does not currently allow IK passes to be layered (hopefully a future release of the software will). What this means is that it tries to reach all the IK end effectors at once pushing and pulling multiple IK chains around. Because of this, you may fix one problem in one area and create another problem in another area. MotionBuilder does give you the ability to turn on or off parts of the body to be affected by IK but it still tries for an overall fix. If you find one area fighting against another, edit one area of the body, such as the legs, save out the data, and then re-import it to fix another area, such as the arms. A better solution seen in other applications offers layering of IK passes that enables you to solve for the arms, legs, and back independently and all of them at the same time.

In order to use the IK solver in MotionBuilder, you need to characterize a skeleton. Then “plot” the character to the “Control Rig.” This creates a control rig on the skeleton that can be manipulated using IK constraints. Next choose the FK/IK option. To get the data saved back to the skeleton, “plot” the motion back onto the skeleton in the Character Settings tab. If your motion does not look exactly the same as it did before plotting, go to the Animation tab at the top of the interface and choose “Plot All,” then plot to the skeleton.

5.4   Floor Contact

The floor contact is a useful tool. Various versions of it can be used in different situations, such as keeping a foot on the floor, keeping a hand steadily on an object, and keeping a head constantly looking toward something.

Making convincing contact with the floor or other objects is one of the most important aspects of motion editing. A firm interface between a character’s feet and the floor makes the motion look realistic. What are some ways to do this?

Some methods are broader and quicker but give a less accurate result overall. Others are more time consuming but usually give a better look. It is very important that your marker data is as clean as possible. The better the data coming out of your capture session, the less you will have to fix.

One of the major reasons to fix feet is that they have been pulled a little by retargeting applied to another part of the skeleton; retargeting is rarely a perfect fit. The software does not have the same eye as a human, so it works on what is mathematically correct. There are times that mathematical correctness and what we perceive to be correct are two different things, especially when dealing with optimizing or battling IK pulls.

A quick way to fix the feet’s contact with the floor is the “floor plane” option in MotionBuilder. When you characterize your skeleton in a T-pose, a set of virtual markers are set up on the hands and feet. You can tell the program to never let them go under the floor plane. The markers are generally at the heel, ball of the foot, and toe (Figure 5.12). Those push the foot up above the floor plane but may not push it up to the same place it was a few frames before. The reason for this is that the marker positions with regard to the floor are computed using only the translations along the vertical axis, that is, the software just pushes everything up until it is above the floor. A foot may need to be rotated, especially when there are multiple markers under the ground plane. However, the floor plane does not rotate the foot. It simply pushes the foot up.

image

Figure 5.12   Markers at toe, ball, and heel

The floor plane option can shorten the slow in and slow out of the foot motion above the floor and make the motion look unnatural if the timing of the step is relatively slow or the foot is moved from far under the floor. Thus, the timing of the foot motion above the floor may need to be edited using IKs.

The floor plane option usually gives you a good starting point but always remember that if the feet are not seen from the camera that will be used in your final rendering, you do not need to clean them up at all.

When in MotionBuilder, make sure to characterize your skeleton in a T-pose. If the character is not characterized in a T-pose, the hand and foot floor plane markers will be skewed and not line up properly.

Now let’s talk about a more time-consuming way to clean feet. Let’s look at the MotionBuilder’s approach with auxiliary effectors. The auxiliary effector is created at a point, let’s say at a foot, and then is relative to the global space, so it does not move with the rest of the body (Figure 5.13). You can “target” the foot to lock into this position. To do so, first create an auxiliary effector when the foot is making a firm contact with the floor, or move the foot precisely where you want it to be first and create an auxiliary effector.

image

Figure 5.13   Auxiliary effector created at foot

When the foot is supposed to be planted, you want the foot to “seek” the auxiliary effector. In other words, you want the foot to be exactly on the effector but not floating around when it should be on the floor. Use slow in and slow out as your character is stepping into and out of the position. Do not let the foot seek the auxiliary effector when it is not close to the effector; otherwise, it will try to pull the entire leg or body toward the point (Figure 5.14).

image

Figure 5.14   Auxiliary effector pulling entire leg

So if the foot is working, what about the toe? You can set up an auxiliary effector for the toe or a special constraint to keep the end of the toe from going under the ground. You need to pay attention to the toe when a person is walking, running, etc. and be sure that the toe is in contact with the ground. When the toe and the ball of the foot are the only segments that are touching the ground the auxiliary effector is useful.

There are times when the feet are not the only thing that you need to be concerned with. If a character is leaning against a wall and supporting its weight with its hand you need to have the hand in constant contact with the wall and not floating around. This can also be done with an auxiliary effector.

Another situation is your character running with its hand clutching its side. Usually this type of motion is not dead on and you need to help the hand stay in the correct position. You can create an auxiliary effector so it will move with the right side of the body but not stay in one place. Use the parent–child constraint in order to constrain the auxiliary effector to the spine segment that is closest to where the character’s hand should be (Figure 5.15). Look at the movie and .fbx file on the CD.

image

Figure 5.15   Left wrist’s auxiliary effector constrained to spine

5.5   Rigid Body

A rigid body, such as a sword, a bat, or a football, in relationship to a person presents another unique situation. It can either be attached to the mocapped person and follow the person (Figure 5.16a) or separate and its own entity (Figure 5.16b). When you are working with data that may need to be scaled, be aware that if you attach a rigid body to the skeleton and scale the skeleton, the rigid body will be scaled as well.

If a rigid body is a separate entity, it will make things more difficult when trying to blend motions because you will have to blend the character’s motions and then blend the rigid body’s motions.

When editing data of a skeleton and a rigid body, first look at the data and determine which has better positional data; the rigid body or the body part that the rigid body is attached to. More often the rigid body has better data but not always. Secondly, have the one with better data move the other.

image

Figure 5.16   (a) Rigid body attached to a person; and (b) Rigid body as a separate entity

5.6   Looping Motion

One of the most commonly used motions, especially in video games, is the motion loop. In this section we will look at how to loop a motion in MotionBuilder. We will also discuss a few simple preparations that are useful when dealing with video game motions. Even though we are focusing on video games, the same techniques are used for large character simulations that are formulated like a video game and use a number of stock motions.

5.6.1   Getting motion ready

Game engines have certain ways of compiling elements together as specified by the hardware and software. Consult with your programmer and know your application’s specifications. The basic rules below should apply to any game engines.

First, create small motions that will be spliced. You do not want excess or wasted motion. An example would be someone drawing a pistol, firing, and holstering the pistol. Break it into three shots. The first shot is drawing the pistol, the second is firing the pistol, and the third is holstering the pistol. The beginnings and endings of the motions should all line up. The shots should flow from one into the other without having any wasted frames. Wasted frames will create a longer wait before the reaction on the screen and therefore slow down the game play.

In the above example, it is normal to never see a character draw a weapon or holster it. Often the weapon just appears. In order to make the action happen as quickly as possible, there are even times when there is no firing animation. Be sure to know what is needed for your project.

Second, align all the motions in the same direction. The general rule is to face the motion down the positive z-axis. Let walking, running, and any other actions move along the positive z-axis and then take all the z-translation out of the motions. If you are working on a walking motion, edit it so it will look as if the character were walking on a treadmill. The forward motion will be added back in when the game player tells the character how far forward to run and for how long.

Thirdly, have standard beginning and ending frames. In the case of a loop, the beginning and ending frames should be the same pose or a pose that is one frame off so that the loop can be repeated seamlessly with no jumps or stutters in the motion. Other motions, such as a transition from a walk to a stop, require a different end pose. A stopped or idle pose is a possibility. Think about what motions need to transition into what motions. An important question is if you really have time to run a transitional motion or if you want to jump directly into the next motion.

5.6.2   Setting up the loop

Let’s take a walking motion and turn it into a loop. There are different ways to do this but we are going to step through MotionBuilder to show a general way of creating a loop.

5.6.2.1   Walking down the z-axis

There is a walk motion, walk.fbx file, on the CD. Load it into MotionBuilder. We will use this for the rest of this chapter in setting up a loop. The first thing we need to do is to face the character down the positive z-axis and have the character walk down that axis.

Characterize the skeleton. (See Section 4.2.3 for characterization.) Now plot the character to the Control Rig (Figure 5.17). This will give you a control rig so that the skeleton can be manipulated and the result can be key-framed.

image

Figure 5.17   Plot to Control Rig

Now we need to swing the entire animation around to make the character walk down the positive z-axis. When the file is opened, the skeleton is walking diagonally across the space because the diagonal distance of a square floor is the longest distance and gives us the most straight line data. We want to turn this entire animation around. We do not want to rotate, translate, and key-frame the first and the last frames of the motion. We will use the Control Rig’s Character Ctrl: Reference node that will rotate the character over the entire time frame. It is indicated by a circle located between the character’s legs at the bottom of the Character Control panel (Figure 5.18). Once you have this selected, turn on the rotation handle, and rotate the skeleton so that it is pointed down the positive z-axis.

5.6.2.2   Taking out the translation

We are now ready to pull the translation out of the motion. This is called “zeroing out the motion.” The first thing we need to do is release the effector pinning on the ankle. If this is not done, the character will try to keep the feet in the original position instead of allowing them to move when the hips translation value is reset to zero. Select each ankle’s auxiliary effector in the Character Controls and choose Release under the Effector Pinning section (Figure 5.19).

image

Figure 5.18   Control Rig Reference

image

Figure 5.19   Effector Pinning Release

Select the translation mode by clicking the translate mode icon on the side or pressing the T key. Go to the first frame of the motion (frame 70 in our case) and select the Hips Effector. Change the z-value in the Global Translate box to 0 (Figure 5.20).

Go to the Key Controls, change from base layer to Layer 1, and press the “Key” button. This will create a zeroed z-translation for frame 70. If you play the motion, it will now start at the center of the space and walk forward. The next step is to do the same thing for the last frame of the motion. Go to frame 200, set the z-translate value to zero, and then key it on Layer 1. Make sure that the Hips Effector is still selected and that you are changing the effector’s value. Also make sure that both key-frames are created on Layer 1. Your character should now look as if it were walking on a moving sidewalk.

image

Figure 5.20   Zeroing the hips

If you look at the motion from the side, it is obviously staying around the center of the space and walking in place. If you look at it from the front, however, you see a translation when the character moves to its right. The translation is the most notable in the left footfall around frame 116 and in the right footfall around 131. Not all the steps in the motion are needed for the loop that we are creating. Let’s use the frames after the translation, that is, after frame 131.

We need similar frames at the beginning and ending of the loop. Let our selection point be when the right foot is planted and the left foot is moving into a passing position. Let’s use frames 150 as the beginning and 180 as the ending. Change the start and end times in the Transport Controls to reflect this (Figure 5.21).

Select the Hip Effector in the Character Controls. Frames 150 and 180 have z-translation values that are no longer zero. Set these to zero and key-frame them as you did above. Play the motion in loop mode. Looking at it from the side, looping looks almost fine, but if you look at it from the front, you can see a twitch between the beginning and ending of the animation. We will look into how you can use poses to take care of this in the next section, but first, let’s go to the Animation pull down at the top and select “Plot All (All Properties).” This bakes the key-frames that you created onto the motion and the key-frame indicators disappear. We now have a clean timeline to start using the Pose Controls.

image

Figure 5.21   Narrowing the motion

5.7   Poses

“Pose” is a very useful animation tool in MotionBuilder. It allows you to copy a pose in one frame of a motion and paste it in different frames of the motion. You can then slow in and slow out of the pasted poses. Pose can be used to pull a pose out of mocap data and create consistent ending poses. An example is the idle stance for a video game. This is the generic pose the video game character is in when it is not in motion. Another example is the end pose shared by running motions, walking motions, and jumping motions. If the motions did not have the same ending pose, you would either have to have a large number of transitions, or let motions jump from one to another. You can create end poses in the following way.

5.7.1   Deciding what to use

So what do you use for a pose? That’s a good question. Since we have the beginning and ending frames for the loop, let’s choose frame 150, the beginning frame. You may decide that frame 180 is better or that you want your walk loop to begin and end with different frames.

5.7.2   Creating a pose

Since we are going to use the pose in frame 150, the timeline indicator should be on frame 150 and frame 150 should be the current frame. Go to the Character Controls and click in the black around the character but not on any specific control. This selects all of the controls except the Reference node between the feet. Change the Asset Browser to the Pose Controls by selecting the Pose Controls tab (Figure 5.22). (Pose Controls can be found under the Window of the top main menu as well.)

image

Figure 5.22   Pose Controls

In the Pose Controls, click on the “Create” button. A plus sign appears next to the word “Poses.” Click on the plus sign. It changes to a minus sign and a Character Pose appears below “Poses.” Right click on the Character Pose and change the name to “walk” (Figure 5.23).

image

Figure 5.23   Poses

We are ready to use the pose at the end of the motion but first make sure that the “Match Translate” option is on (Figure 5.24). If the option is turned off, there will be a translation in the beginning and ending frames that you do not want for a loop. Go to frame 180. Make certain that the pose named “walk” and the controls (except for the Reference node) are selected, and click on the “Paste” button in the Pose Controls. You should be able to see a noticeable change in the skeleton’s pose as the pose from frame 150 is inserted into frame 180.

image

Figure 5.24   Match Translate

5.7.3   Key-framing a pose

The pose now needs to be key-framed. Since all of the effectors (except for the Reference nodes) are selected, just add a key by clicking on the Key in the Key Controls (Figure 5.25). After this, play the motion. The loop should look reasonable at this point.

Next we will create a “Zero” key (Figure 5.25). A Zero key forces all the effectors to move back to their original positions. When you key-frame an inserted pose at the end of the motion, it affects the entire motion, from the first frame to the last frame. The “Zero” key can localize the effect. Go to frame 170 or 175 (i.e., 5 or 10 frames before the keyed ending frame), and press the “Zero” key. Now the pasted pose affects only the last few frames.

image

Figure 5.25   Key Controls

Now all the key-frames are made and the motion is working. Go to the “Animation” tab at the top of MotionBuilder and click “Plot All (All Properties).” This “bakes” all the changes onto the skeleton. Then apply “Plot Character” in the Character Settings so that you can export the skeleton back to your 3D package of choice.

Hopefully you have a good idea about skeletons, retargeting, blending, IK, floor contact, rigid body, looping, and poses. In various data editing software packages these procedures are implemented in different ways. Know what each procedure does and what needs to be done, and try tools to find a way to get the desired results.

In the next few chapters we are going to look at the pipelines for props, characters, hands, and faces.

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

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