Monday, 17 September 2012

Week 1: Diablo 3 Animation Components & Concepts

As of late, I have been playing quite a bit of Diablo III. So I decided that since I am yet to even finish the game that I'd play through it and record some footage and note down what I see. Multitasking at its finest.

Here's a few things I managed to capture.
Apparently once you get to a certain point in the game you can't return to the more open areas,
so I was unable to record the environmental destruction or any more organic animations.

Locomotion System
To move the character you simply have to click to where you want the character to move to, or you can hold down the left mouse button and he will constantly move towards the mouse. Key frame animations are used for most of the character animations in game. The animations appear to adjust smoothly when walking from a flat surface onto an elevated surface such as stairs and hills. Each character also has its own speed, and this can be adjusted at any time and the animation will play accordingly without the "moon-walk effect" that you see in some games. 

Animation Blending
For the most part all animations blend well into each other and have a seemingly natural transition between each one. I am certain that blending trees are being used based on the fact that the majority of the transitions I've seen have been virtually perfect (and that this is a big budget triple A game and it is more efficient to use blending trees in large scale games). From walk animations transitioning back to rest animations and vice versa everything is quite smooth. Attack animations blending into other attack animations. AI characters reacting more naturally when being hit rather than cutting out of one animation and into another. 

I am also certain that skeletal animation is being used due to the fact that characters share many similar animations and in turn inverse and forward kinematics as well as skinning.

Paths and Splines
In terms of the locomotion system in the game, the player character moves towards where the player clicked on screen. When the player clicks, their character quickly orients itself towards that point and interpolates (linear interpolation) to this point with minimal adjustment for obstacles (almost none). Every character in game follows a similar linear interpolation, except with different targets. For example, enemies will interpolate towards the player and orient themselves accordingly towards the player. 

In terms of splines, I could only find one example demonstrated in the video above. There is an attack, activated on a key press, such that when it is pressed, the player character orients towards this point, jumps in the air whilst moving towards the mouse pointers position when the key was pressed. I noticed that whether the mouse was very close to the character, or as far as possible, the character went just as high and stayed in the air for just as long. There was also no noticeable breaks in the animation, and it is always a smooth asymptotic path. Therefore by observation I concluded that this must be a spline interpolation. There are several other examples of spline interpolation in the game, such as projectiles being thrown and such.

Physics Based/Environmental Animations
Diablo III also features a fully destructible environment and ragdoll physics. Most of the destructible objects are furniture, although you do get the occasional body splitting into five pieces and heads rolling around (dynamically I might add). A lot of the dead characters and destroyed objects disappear over time, but the bigger objects and characters tend to linger for a while and so you can just keep hitting them and watch them roll around. Ragdoll physics is always fun to watch.

There are also many small environmental animations I never noticed before. Such as cloth, hair, and grass/leaf animations. The grass and leaf animations are extremely spring-like to the point where its funny to look at. The hair and cloth animations are done well but are easier to see when larger characters appear since their attire flows around a lot more. There are particle systems in place and are used widely throughout the game.

Conclusion
Before this assignment, I never really noticed the simple things such as interpolation, or animation blending, because I was so immersed in the game, I only noticed if something went wrong. This assignment has proven to me just how important these features are in games. They heighten the level of immersion and improve my overall experience even if I'm not in awe every time the character goes up the stairs and his feet actually touch the ground.

No comments:

Post a Comment