Tuesday, November 22, 2016

After-Thought Mini: Facial Animation

Anyone who plays video games knows that, while Graphics are not really that important to the enjoyment of a product, the quality of animation can make a game better or worse based on what you see. And these are also things that you can't tell from screenshots. Sure, with screenshots, you can tell how good the game looks based on polygons and textures or whatever but, if you want to know how good the animations are, you have to see them in motion.

And one particular aspect of animation that seems to be harder than everything else is facial animation. So far, I've seen two different ways to make facial expressions and facial animations, based on the software and engines I've used. The first is an incredibly complex skeleton or rig, particularly within the face, so that animating the face can be done with bones. The other is to use Shape Keys or Morph Targets, depending on the software in question, to move certain polygons to certain positions to achieve the same effect.

Now, in my experience, using Morph Targets is actually a lot easier than using a complex rig because, while a complex rig can give you a wide range of motion, you are ultimately limited by the directions the individual bones can move in. While a single Morph Target can only make polygons move in two directions, a positive and negative direction respectively, having 30 different Morph Targets to encompass the face takes less power than a complex rig because Morph Targets are moving individual points, while a complex rig is calculating bone positions and the points they're influencing at the same time, which can tax your processor. This is especially troubling to me because most game engines, like Unreal for example, don't have an animation system built to key-frame different bone positions without external software but Morph Targets can be manipulated within these same engines internally.

I suspect that the reason complex rigs are used in most games is so that they can motion capture the animations before importing them into the software, even though Morph Targets are faster, easier to set up, and only require memorization of which morph targets need which values.

Even so, some games make it clear that good facial animation is not always necessary but, if you're going to have it, you need it to look right. One game that I always had issues with in terms of facial animations was Devil May Cry 3, specifically with Dante. The animations for the body and the attacks were just fine, phenomenal even. However, when I played the game as a kid I always thought the facial animations looked really weird. And I wasn't able to put my finger on it until I played the game again as an adult and I figured it out: most of Dante's mouth movements obscure his teeth.

The movements of his mouth fit the dialogue most of the time without trouble but his teeth were hidden behind his lips in a lot of scenes, particularly when they should've been visible. For me, this created an Uncanny Valley effect where Dante was animated right but that detail was missing, and because of that, it felt unnatural. Of course, in this case, the fix is simple. Just change the placement of the teeth within his model so they're visible when they're supposed to be.

This is something that Ninja Gaiden didn't really have a lot of problems with. Speaking in terms of the respective protagonists, Dante had trouble with facial animation because of the placement of his teeth. Ryu Hayabusa didn't have this problem because his face was never visible. While you could see his eyes pretty much everywhere, his mouth was hidden behind a mask, which meant that as long as the cloth moved to indicate mouth movement, very little had to be done to convey the illusion.

That said, while it is easy to talk about Ryu not needing that much effort, it's worth noting that other characters in Ninja Gaiden, Black, and Sigma did have onscreen facial animations and they never felt as unnatural as some of the animations in DMC3. Part of me thinks that's because Team Ninja used D-Rockets to animate everything in the cutscenes, and D-Rockets is a professional animation company, while Hideaki Itsuno's Team was probably more geared toward Game Design than Professional Animation.

So pro-tip to anyone who's going to be making games, particularly games with cutscenes and facial expressions. Make sure the teeth are visible when the character is talking. If the teeth are visible when they're supposed to be, it will make the animations feel a lot more natural even if the lip-syncing isn't up to par. Food for thought.

No comments:

Post a Comment