I do love it when a plan comes together.
To test out my newly optimized enemy model with Inverse Kinematics, I wanted to do a little animation test with a video or gif of some sort. You may remember this as the way Epic Games got in so much trouble with Fortnite.
Anyway, I thought it would be funny to make him look around like John Travolta, so I saved a video of the scene from YouTube and found a handy little guide on importing a video into Blender for reference purposes. This was incredibly helpful. Here’s the guide:
With this set up, it was time to start dropping in location/rotation (or LocRot) keyframes to block out the major poses of the animation. I found it helpful to start with full body rotations and changes in physical place, then I basically went back to the beginning and started adding movements that were most noticeably missing, big to small.
A ton can be achieved this way, with simple keyframes dropped in changing values for rotation, location, and scale. This will work for many kinds of moving props in a scene and occasionally even a simple enemy. Animating anything resembling the human body is a very different situation. First of all, people don’t make consistent movements. We speed up and we slow down. The other big problem is we’re so familiar with human body movements, we have an extremely critical eye for inhuman movements. This is why robots are usually either hilarious or make us uncomfortable. Allow me to demonstrate by showing off a clip of my animation only using basic keyframes with no manipulation of the motion between those frames.
It’s a nice start for such easy steps, but it’s far from lifelike. The solution? Switching to the Graph Editor and adjusting the default curves between the keyframes. This is textbook bezier curve manipulation and the values for each animation channel simply follow the line as it plays. Once again I started at the beginning and simply picked the most glaring differences between the video and found simple changes I could make to improve them. After no more than five subtle adjustments, I was able to do the following, in no more than an hour.
One process improvement I’ll shoot for as I start working on the game animations is to keep that Graph Editor much cleaner by really doing my best to isolate ONLY the bones and channels that need keyframes. As you can see here I used a ton of full-armature keyframes and it made the curve graph a mess. To work on a specific motion, it’s easy enough to choose a channel, hit Shift + H, and hide everything but the selected channel(s). That said, complex animations will be hard enough to change later without unnecessary clutter.
That’s it! Time to brainstorm the first few animations to use and I’ll see if I can get some enemies to test with into the firing range room. More soon!
Todd Mitchell is a US Midwest-based comedy writer and game developer with bylines at Weekly Humorist, Fanbyte, Slackjaw, End of the Bench Sports, and more. He’s the author of Inside Video Game Creation, the founder of CodeWritePlay, and host of the GameDev Breakdown podcast. Follow him on Twitter @Mechatodzilla.