Monday, 18 February 2013

06/02/13 - Creating Animations for the Small Character

In this post i will be documenting my progress on the creation of the animations i need to create using the small character rig. Below is a quick list of those animations, read on to see how i got on!
Idle + Variations
Idle-to-Running
Running
Jump
Duck
Jump Fail
Duck Fail
Eat Item
Drink Item

Idle + Variations

Starting nice and easy, i created the idle animations. The small character is known to be slightly mad so i wanted him to appear twitchy and excitable. So for all the idle animations he bounces up and down on his feet abnormally quickly and in the variations his foot twitches or his head jerks down to his shoulder spontaneously.

As i said these were the easiest animations to create so i didn't have any problems making them, especially as they involve no significant movement of the limbs.





Running

For the running animation i originally wanted the characters sleeves to be flailing behind him but after finding out there would be a 'speed-boost drink' in the final game i decided he needed a standard running animation and that i would create my original idea if it was necessary.

The first problem i ran into here was fitting the animation into the 60 frames (2 seconds) we had allotted to each animation, it took a little time and some experimentation to create a run animation that fit the two second slot as well as the character i was trying to portray, that of a zippy madman in an unbound straitjacket.

I also ran into more IK problems during the creation of this animation, i found that although the joints wouldn't warp or rotate in undesired directions when i was moving it about manually, the joints tended to do just that when moving between keyframed positions. I found no obvious solution to this so i ended up having to add extra keyframes to stop the joints misbehaving in this manner.


At this point i assumed the animation was finished, but while acting out a jump as a reference for my jump animation i realised that i had my characters body lowering and rising at the wrong times. Moving the key frames forward solved the issue and gave a profound improvement to the final result.


Before:



After:


Idle to Running

This animation is simply (and obviously) the transition from the idle state to running, in my case with a 'warm-up' animation prior to assuming the running pose at the end. It is intended to be played right at the start of a race.

Given that i wanted to show the character raising his arms and shouting some unintelligible war cry before moving off, this was the first animation i created that made use of the extra faces that Lewis made. Thankfully i was saved the time spent searching for a method to achieve this as my fellow animator had already encountered and overcome this problem, and all it involved was changing the file names for each of the Head images. Adding .00x to each of them (with x being the image number) whilst making sure the main image name is the same (so Head.001.png, Head.002.png, etc.) helps the image sequence option detect the different states for the image. Through right clicking the box into which you set the image number, you can set a key and from this to create animation sequences that play along with the rest of the animation. This was everything i needed to gain the animated screaming face that i desired for this animation.

After creating this initial part of the animation i ran into the difficult situation of transferring the starting pose of my running animation into the idle-to-running animation which had been created from one of the idle animations, i needed this so the animation would transfer smoothly into the running animation. This was the part i was dreading the most and the very long time that i spent searching for a solution without success seemed to confirm my suspicions. In the end i simply tried my own idea of opening the two files in two separate instances of Maya and copying the coordinates for each separate limb that was affected by the pose, the results were such that i had transferred the pose exactly into my idle-to-running, though i had to do everything more than once as i forgot to keyframe all the joints when moving between frames!


And here you can see the final result:


Jump

A jump animation is required, as well as a duck animation, as there will be obstacles that require player input to leap over or duck under during the race. Below you can see the jump animation i created, i feel it may be a tiny bit floaty but this game is a bit of a zany cartoony affair so it fits with the style. I believe this was one of the most straight-forward aniamtions i created, that's not to say it didnt take plenty of time and a lot of tweaking to get it to a satisfying standard, i just encountered no significant problems. The jump animation takes place across a 30 fram segment i 'cut' out of the running animation.


Jump Fail

As well as having animations for jumping and ducking animations we also needed to have animations for when the player fails to provide the input needed to successfully traverse the obstacles. Hence the creation of 'Fail' animations.

I decided that given these animations are failures they would need to incur a penalty, i took this penalty idea and used it as an excuse to make the fail animations twice as long as all the other animations. So 4 seconds each. Even so, i stuck to the '2 second rule' and split the fail animations in two, this meant i would have another chance to employ the copied coordinates technique i used for the idle-to-running animation.

Creating the first part of the animation was another straightforward affair, i simply manipulated the finished jump animation so that he didnt make it. With tweaks and quality checks on my part before continuing. Simple!

My original plan for the second animation, given that it starts with the running pose and ends with the character floored, was to swap these poses over. This didn't go to plan due to an error on my part which meant i lost the 'floored' pose (I basically managed to overwrite the keyframes for it by accident), so i ended up using the copied co-ordinates technique.

Thankfully the rest of the animations creation went smoothly, giving the result you see here.



Duck

To create the ducking animation i used the same method i used for the creation of the Jump animation. There were no issues with this one, though i found that to fit my planned animation in i had to allow a devote a larger segment of the run animation to it. I was happy with how it turned out:


Duck Fail


Again no issues creating this animation which, like the jump fail, was split into two parts. I was however, very happy with the results. This is certainly my favourite animation.




Eating/Drinking

These are the animations i made for the eating and drinking actions made by the characters when using different items during a race. Similar to the jump and duck animations, and given that using items only takes place during the race, i created these animations by manipulating the running animation.

After altering the hand images so that i could switch between the regular hand and the food or drink hands (to do this i had to create a duplicate hand image and material in maya for the Left and Right hands), i encountered a problem. Simply put i hadn't factored the food/drink hands in while i was creating the square images for Maya so the planes I modelled for the hands weren't big enough. As such when i switched to the image they appeared slightly squashed on the model.

Thankfully the solution, though slightly inelegant, meant that i didn't have to de-skin and remodel the hands. All i had to do was create a scale keyframe before the switch to the item-in-hand image that would stretch the plane in such a way that it became indistinguishable in size from the reggular hand, then rescale it once the character had eaten/drank the item. By doing this in the space of one keyframe the change in scale is instantaneous and completely unnoticeable.

As a final note i will add that i think particle effect such as crumbs for the eating animation would greatly improve the overall look of these animations. Though such a thing is currently beyond my ability.



And with that one done, my animations for our small character are DONE! All i have to do now is hand them over to Dean Stone our Coder who will put them into the prototype. The next step is to see what else i can add to the game to help finish it off, but in the mean time i have found something that despite being incredibly frustrating at times, was very enjoyable to do. This is a very big step for me as it has given me an area of game development i can truly say i enjoy working in, and a potential focus for the future.

I decided as a final addition i would do a very brief write-up of the technique i emplyed when creating the majority of my animations (aka once i had gotten the hang of it):

  1. To start with i would take the main 'back/spine' bone that acts as the central point of the rig and moves all the bones therein, and keyframe some basic rotations and transformations to get the basic movement down.
  2. I would then move on to keyframing in the movement of the limbs, often starting with the legs first and, once happy with them, moving on to the keyframes for the arms.
  3. Next i would adjust the heads position and rotation as its movement is in direct correlation with the spine's, this would involve keeping the character looking ahead or bending in to emphasise the anticipation for the jump, etc. After this i went through a similar routine with the feet as having the IKs for the legs based at the ankle joints meant that the feet would bend in undesired ways at times.
  4. Finally i would create the facial animation keyframes (if they were required of course) before going back and making any more tweaks or adjustments i felt were necessary.
  5. At this point i would simply sit back and let the finished animation play over and over whilst feeling very proud of myself.

No comments:

Post a Comment