Bringing Warbots to Life: Animation and SFXs

🤖 Bringing Warbots to Life: Animation and SFXs
By Mitchell Root, 3D Artist & Animator @ Two Robots
The warbots are an essential part of the card game — consequently, they need to be exciting and satisfying to build and use!
To start the process of 3D animation I created what is called a rig, or armature: a series of bones that sort of function like bones in real life. Joints are placed at natural bending locations and the bones are oriented towards the direction the bone should bend in. This is the first step in animating a 3D character — or robot, in our case.
We decided that for efficiency and optimization all of the warbots (including cleaning bot!) should all use the same rig. So additional bones were added in for the other warbots that needed them: the nuclear bot's shoulder missiles, the colorless bot's arm cannons, and the cleaning bot's vacuum. These additional bones are just ignored by the warbots that don't use them.
After the bone placement and orientations are finished, you could technically stop here — this is the most basic, but functional, rig that you could build for a character, and just animate the bones directly. But we like to add in rig controls, as that gives us much more flexibility and precise control over the bones. So we created armature controls, and we use those to animate the warbot.
Now we can get to animating! To animate we use a timeline like in a video editing program, adding in what is called a keyframe at points in time where we want a bone to be in a specific location. We can add keyframes in a variety of ways: by directly manipulating the model in the viewport, manually adding in the transform values we want into the inspector panel, or directly on the timeline or curve editor themselves. (I will get to the curve editor in just a moment.)
The movement between these keyframes creates what is called a curve: a graph line drawn from point to point. We can use what is called the curve editor to manipulate the curve line with handles on each of these points, to fine tune the line to produce the movement that we want. Some animations can become very complex, with lots of keyframes and curves on the controls all over the warbot.
Once we are done with our animation, we then convert our model into what is called a game ready rig, which bakes all the animation down from the controls and simplifies the rig down. This way the warbot model is more lightweight and more optimized to be loaded quickly in the game when it is built. Next we export our model out of the animation software (Blender) and import it into our game engine (Godot). This is also the time where we import our texture files and apply them to the mesh. We also do a lot of other things to our warbots in the engine, such as adding collisions and visual effects to their attacks (like explosions, lightning, etc.) — but for now we are only going to focus on sound effects.
To add sound effects we attach audio players to the parts of the warbot's rig that we want to emit sounds — like the feet for footsteps, the arms for attacks, and so on.
Once these audio players are in place, we then use the engine's internal animation player to add sound effect samples and tune them how we want with keyframes. We can keyframe lots of things for audio, such as the pitch of an audio file, its volume, its attenuation, and how far away it can be heard from. Just like with animation, this can also become fairly complex depending on how many sound effects we need to play for an animation.
It's taken a lot of work to get to this point, but now we have an animation for the warbot and sound effects that are synced up to play alongside it. This bot is now ready for the arena!
