Pages

Showing posts with label animation. Show all posts
Showing posts with label animation. Show all posts

Monday, 4 October 2010

Animation blending

I've done some more work on the animation system recently so I thought I'd change gears slightly and write about that today. 

You will have noticed in the previous video I posted that the robot's animation transitions are very sudden and don't look very natural (even for a ridiculously proportioned robot).  The remedy to this is animation blending, whereby two or more animations are smoothly blended during a transition phase. This has been on my to-do list ever since implementing skeletal animation so I've finally gotten around to it.

The first place I turned to for implementation details was the book Game Engine Architecture by Jason Gregory (which I highly recommend). Chapter 11 contains a wealth of practical information on implementing animation systems. 

The first change required was to store keyframe data in scale/rotation/position format (also known as "SQT") instead of matrix format.  The reasons for this are; a) it's smaller, b) it's impractical to blend between transform matrices. The second was to implement a global time line scheme when dealing with the animation clips (also detailed in the same chapter). I won't go into my implementation as it's still quite rough at this stage and bound to change but definitely check out the book if your interested. 

With that in place, a short transition between animations made a big improvement but you can go one better. Linearly blending between animations doesn't take into account any of the twelve principles of animation and makes for frowny animators (in this case, me). By blending in additional transition clips you can create much more interesting animation behaviour. In this case I've added a transition clip to the start and finish of the walk cycle.


Left: idle to walk. Center: walk loop. Right: walk to idle.
 
  • idle to walk transition: This one's very quick as the character needs to start walking straight away. It basically consists of  a slight anticipatory body dip and also starts the limbs moving.
  • walk to idle transition: A longer animation used to help settle the character back into it's idle pose. There's a slight body sway as the torso comes to rest and the arms swing forward to follow through after the motion of the walk. This helps to convey a sense of weight to the character.
The in game results can be seen in the video below.

Wednesday, 29 September 2010

Light volumes - animated character

Similar to my previous post but with an animated character this time round.

Animated Character
I went about texturing this model a little differently to usual so I thought I'd mention it. I'd normally lay out the UV's, pick a few nice base textures and start painting away in photoshop. I thought I'd try something different this time round, it's a technique I've seen used in lots of places and I was keen to try it. Instead of manually painting in all the rusted / chipped areas (which is actually a lot of fun) you use a bunch of masks and procedural noise to blend between different surface types. The image below shows a rust mask built from ambient occlusion, cavity, 3d noise and a scratchy bitmap. The ao and cavity maps provide rusted areas in the grooves and worn edges while the noise and scratch maps provide general wear and tear.


Below is the resulting texture map, rendered straight from the material editor. It could definitely use a pass in photoshop to add some more specific detail but it's fine for the time being. Rendering out spec and bump maps was also very easy.


With the textures done I animated a walk and idle cycle and exported the character into the engine. I've spent a lot of time on the mesh and animation exporter so thankfully the process isn't painful.

Video
Okay, onto the actual video which came together pretty quickly. I already had a very basic animation system in place but it doesn't support blending so the animations do pop a bit. I also had to manually control the camera so the camera work isn't as smooth as the other videos. Environment wise I'm still using the same volume textures but I have boosted their contribution to the light buffer.

That's all folks, don't forget to switch it over to HD, hope you enjoy and thanks for reading :)

Thursday, 10 June 2010

An old animation

Quite a few weeks back I posted these two stills (I also use the character to test my GPU lightmap tool)...


... they were taken from an old animation I did which I've recently uploaded to my website. You can check it out here.

The animation was a test sequence for a short film that didn't quite make it past the start line. The character was thrown together and animated over the course of a few evenings. About a year later (!) I built a nicer background, rendered the whole thing to separate layers and then comped it all together.