Friday, November 4, 2016

Animating for Videogames

This week it's been a very busy one at the studio, I will be honest by saying Videogames are one of the HARDEST things to do. It's very difficult to get the whole thing right. It's like a Tango dance between art and programming at the rhythm encompassed by the design elements of the game. One could not exist without the other.

What makes it really difficult on the animation side is the use of constraints. Of course you will always have certain constrains in a production environment. While in movies these are the limited amount of frames you will use for a shot, or certain camera angles, in games are way more complex. That might also explain why animation doesn't look THAT good as in movies.

In feature film animation you have a much more controlled environment since the director knows already what's about to happen, where the characters will go next, where they will stand for a while and where they will turn to at an specific time. Not so like in games, where the action is dictated by the decisions YOU, the player, will take.

In games you need to have an animation ready for almost every basic action the player might take. Like walking forward, backward and to the sides. Usually there's some algorithm for blending between 2 animations, but even with it, you need to consider which would be the best part of the animation for a change in direction to happen. Usually where the character's pose is more compressed so it doesn´t "jump" that much while blending. Otherwise it will get choppy, affecting the immersion of the player (also called suspension of disbelief). And because the computer doesn't understand what a walk action is, your character will never be alone when you animate it. You might also need to animate some additional "controllers" to help the computer understand that there's a displacement to be considered while your character walks or to tell it in which direction the character is walking to or looking at. Others might include the position where a prop (a gun, a sword) is being held (the hand?, the hip?).


But the player won't see them while playing. He will just push forward and VoilĂ ! the magic will happen.

There's also the issue about "responsiveness", which is utterly important for the game play. When you press a button on the controller that supposedly makes your character jump, you don't want to watch it taking its time to do so. Chances are you might want it to just jump right away, otherwise you will be losing that moving platform where your character is supposed to get. So you might be limited to just a few frames to animate this action. And with few frames I mean something between 3 and 6!!!, just miliseconds (and hard to get it right).


Another constrain is the amount of memory you have available, resulting in actions that will rely heavily on repetition. This is where the idles will come in handy. An idle is a cycling loop where your character "repeats" an action over and over, so it never stops and look like a statue in the game. Loops are usually around 10 seconds, and they get divided in segments both starting and ending in the same pose so you can shuffle them and make 2 characters look different.


To keep the reads short and interesting, I will talk about other aspects of animation in games on further posts; like behavior systems, navigation, scripted scenes, cineserts and cinematics.

Peace.

Thursday, September 15, 2016

This is what I'm talking about

I just posted a brief explanation on how to approach first person view walk cycles in games and today I found this nice surprise on "gametrailers.com".

It´s none other but our fellas from Zero Point Software and their title "Interstellar Marines".

On the following video you can see how they take the immersion element on their game and come up with one of the best animations I've seen on this category (fps).

Everything, from the walk and run cycles to the reloads and shooting idles, is PERFECT!!!

It's even more of a surprise that they are an Indie Developer and this is their first title whatsoever.

They even compare their stuff with the one from Infinity Ward (the "Call Of Duty" guys) at the end of the video; proving my point about how first person animations in those games suck.

Check it out !!!

Monday, August 1, 2016

How to animate a First Person Run, Walk and Sneaky Walk Cycles

Well I was at this job interview the other day, when the interviewer asked me about the experience I had animating sequences from a first person perspective. You know, the view you have of things through your own eyes, like in games in the shooter genre.

While I was trying to explain myself in this complicated language about "splines" and how many animations I've done on this matter, I finished my answer with a "You know?, I´d better show you some samples".

It wasn't like I couldn't explain myself at all, but being myself more of a "visual" type of guy, at some point I felt like trying to explain how the red color looks like to a blind guy who has never seen.
So after the interview and when I came back home, I decided to do a brief sample of these three cycles from fpv; Run, Walk and Walk Sneaky.

Trying to represent the feeling of how you watch your surroundings from this view is a VERY DIFFICULT thing to achieve. I´d say like a level 11 thing on a 1 to 10 scale.
Actually, even when there are A LOT of first person shooters out there, I've only seen this accurately represented in DICE's "Mirror's Edge". All other fps games seem to me like the character is either "floating" or just trying to keep balance over a bicycle while walking.

I sent these animations the very same day I was interviewed, so to keep the whole topic fresh. But while doing it, I decided to give them a more scientific approach on how to do them rather than just trying to achieve the feeling by putting key frames here and there.

So in the end, here is how the position splines (rotation ones following) should look like on your 3D's application graph editor:

The segment goes from f0 thru f30 (1 sec) with each key frame set on f0, f7, f15, f22 and f30.
Note how the curve tangents on the green curve (Y) fix the default setting (spline) of the application. That´s in order to sustain balance of the body while lifting the passing leg. Blue curve (Z) represents the bouncing of the body at each step (or contact pose with the ground). Finally, the red curve (X) represents your forward progression, from point A to B. This should go linear during the whole walk segment, meaning if your walk goes from point A to B in 6 seconds, you should only key frame a straight line between f0 and f180.

Now onto the rotation ones:
The Green curve represents rotation from right to left and so on. The Blue one a little rotation clock and counter clock wise. The red one is the up and down bouncing of the head. The end result simulates a nice and subtle rotation of the head in the form of 8 shaped arcs. Again the key frames are fixed on f0, f7, f15, f12 and f30.

You can also add a bit camera shaking with a modifier if you want, but keep the values of the shaking as low as possible.

Although this is not necessary, it will be like putting the cherry over the pie.

Here are the settings I used for the video reference (3ds Max 2011).

Seed: 1
Frequency: 0.05
Fractal Noise: On
X, Y, Z Strength set to 2.0

I will be covering the Run and Sneak Walk variations in a later post.

Sunday, April 24, 2016

It's Been A While

Well it's been a while since my last post.

We've been hard at work during the last couple of months at the studio, working on the first build of our new game (which by the way wee need to send to our HQ in Paris by the end of January).

We have a more compelling story this time around and also more and better cinematics to tell it.

2010 also seems to be an exciting year for the videogame industry, with such anticipated titles like Mass Effect 2, God Of War III, Heavy Rain, Final Fantasy XIII, Halo Reach, Battlefield Bad Company 2 and a brand new Medal Of Honor just to name a few, but I've already count around 20 titles I'd like to play this year (not even mentioning the new ones to be announced).

I will be working harder this year and for sure will have more animations to share with you guys on this space.  I was asked to create a video game for a sex toy store about captain dildo.  I'm not kidding.  But I can't wrap my head around this project so I will likely pass.

In the mean time, I want to post here a couple of animations from the "Epic Mickey" game from Warren Spector that I happen to see a week ago.

For those who doesn't know about it, Warren Spector is one of the most awarded videogame creators in history, with such titles like Thief, The Ultima Series, Wing Commander, System Shock and Deus Ex in his profile.

This time he was asked by Disney to create a videogame based on the brand new image of Mickey in 2010, and knowing Warren to be mostly a mature rated games creator, this came as a real surprise.

The game is based around a story where Disney's lesser, forgotten characters rise up against Mickey. This would explain the emphasis on the military action themes seen on the concept art.

It sounds nothing like a Disney thing, but my interest on it grew exponentially the first time I saw the following animations.

Wednesday, April 6, 2016

Hello everyone.
Just decided to take a break from the cartoony style and try to get some realistic animation. This exercise will consist of the animation of the following sequence:

The important thing here is that this kind of sequences are commonly used as reference for videogames, and as this medium is different from movies (here you have to make it right from any angle and not only to that of the camera), for some of the movements you just have to 'figure it out' how the body mechanics are working on. This is because as you can see, there are some takes where you don't get to see the character legs or you just get to see a body part like the head or fist for one of them.

After a couple of days I came with the following results. This is the animation based on the same camera movements from the reference:

While doing Pre-Viz work for movies, its a common thing to find issues like continuity in the footage you are provided with (like a punch repeated several times Van-Damme style), and you have to figure out the better way to create the animated sequence so it can be seen correct and from any angle.

At some points in the reference (usually on the camera cuts) the characters are in different positions and time vs the previous take. This is a common thing in filmaking for the sake of having the choreography a bit more spectacular, and also because its clear that it is very difficult to have the stunt men exactly at the same spot while changing the camera and retaking that last kick or punch from another angle. Thats also why Pre-Viz animation is so important in film making.

Here is a second take of the same sequence with different camera positioning and using the same animation.

The idea here is not necessarily to have a super polished material. Pre-viz animation allows the director to reposition the camera in the computer allowing him to choose the better angles for the sequence before shooting it on stage; which otherwise would be a very expensive way to figure out which camera takes works best for each scene.

Tuesday, February 2, 2016

Running Scared

On the last entry we talked about the importance to have a reference in animation and also the difficulties that might arise when we try to animate a very complex and cartoonish movement.
With the help of a drawn reference it is possible though, to have an almost immediate appreciation about what the end result might be without having to go all the way down to blocking on the software.

Once we have the reference drawn with a tool like grease pencil, we can now start posing our character into the software. In this case I came up with the following results:

Feel free to acomodate things a bit over the reference in order to hide little details on the rigs or if you see the end result simply seems better. You will be continuously changing details over the process until you (or your manager) feels that the animation delivers. Just be careful not to get into changing things a lot because sometimes (if not always) you might find yourself changing it like forever and thus never ending it.

Once you have your basic poses in place, lets have a look of it without the 2D lines:

Not bad for a start, not bad at all.

However, now you can start posing a bit better the character as you might find some details that were not visible when using the reference over it.

A very good tip I got from Keith Lango is to take note of all the changes you need to do and do them first on the next pass. After that you shall take note on the new ones and go get them corrected in the next pass. This seems to be a very well organized pipeline that also helps you to stay on track with your changes, further preventing changing things that were already on its place and thus never ending with a satisfying result.

This is the final blocking stage just before getting into the linear one:

Now it seems everything is in place and we're ready to start the linear pass. In order to do so it's a good practice to have all you controls keyed in each pose, just to make sure everything will hit its frame in place (meaning all the character's parts in the place you want at the frame you want) just before we proceed with the next list of changes.

In this pass you can see that aside from the holds (or those parts where the character mantains a given pose for a few frames), everything keeps moving and changing from one frame to another in a, yes, linear fashion.

After some cups of coffee, LOTS of cookies and hitting the bed very early in the morning, I came up with the following final pass.

Here you can see I added facial movement and get the holds with a little bit of movement in them (a common practice in 3D as opposing to 2D where you can have 2 adyacent frames looking exactly the same). Now every frame is changing (even if by a fraction) and that is good.

Finally, here's the animation after adding some fancy effects like lighting, shadows and motion blur. This is sometimes called 'the beauty pass', and with it, the animation is ready to be reel material.

So, there you have it. Next I will be covering a basic level 'Making Of' as some people have already asked me to do so.

Have a nice week !!!