Get a behind-the-scenes look on how DICE brings the guns from World War 2 to life.
My name is Oskar Wetterbrandt and I am a core gameplay animator at EA DICE in Stockholm. At DICE, animators don’t only focus on authoring animations but to implement them at a technical level. Logic and complex blending solutions are made as well. The idea is that when an animator owns a feature they should be able to either record motion capture or hand-key an asset, and take this data all the way into the game.
Being a core gameplay animator includes setting up systems for both 1P (first person) and 3P (third person). We do everything from how the characters move and behave; when you’re customizing them, when they’re enter or exiting vehicles, running around, throwing grenades, reviving, meleeing and shooting guns. Basically any animation that’s not cinematic or narrative is handled by the core team.
As a member of this group I’ve been heavily involved in our weapon animations for Battlefield V specifically, and I continue to work within that area for our live service of the game. In this blogpost I will explain how our weapon pipeline works from an animators point of view, mainly focusing on the 1P experience.
Battlefield V is a shooter where the guns in game are based on actual real world weaponry used in the second world war. This means that we must understand how these guns function mechanically in order to be faithful to the source material.
The best way to get this reference is to get our hands on the actual gun we’re supposed to animate. The goal is to get a feel for the weight and balance and becoming familiar with the intricacies and resistance throughout the action: pulling all of the levers and pushing all of the buttons.
Early in 2018 some of us working in the core gameplay team went to a shooting range to try out some WW2 guns and record lots of reference footage for the upcoming modelling, design, animation, VFX and audio processes. At this point I had never shot a gun before in my life, below you can see a GIF of me not using the buttstock correctly when firing the MP40.
Oskar Wetterbrandt firing an MP40 to get a feel for how the gun behaves.
Don’t worry, we had very experienced people there overseeing everything.
Some of the guns we want in our games are more difficult to get our hands on though, and that’s where Google is our friend. Most of the time, especially in the midst of production, we turn our attention to YouTube videos and documents on gun schematics in order to understand how a gun functions. I would like to extend a big thank you to the YouTube channel Forgotten Weapons for doing such in depth videos, they are very helpful.
RIGGING & SKINNING
After our amazing 3D artists have done their magic, we get a 3D model that is ready to be set up for animation. It usually looks something like this:
The MP40 model provided by the 3D artists at DICE.
Rigging and skinning anything for animation is basically the process of placing joints inside the 3D model, and then hooking up the different parts of the 3D model (trigger, magazine, bolts, scopes etc.) to the desirable joints. Later, when animating, we then interact with the joints and the parts they are hooked up to will follow along.
Already at this stage we see the importance of researching the gun thoroughly beforehand, as we need to know which parts that should move. For instance, we don’t need all of the internal mechanics that you as the player will never see, but it’s nice to be able to click the mag release button, rotate the trigger and maybe add the ability to move the bullets inside of the magazine around to visually trick the player that the magazine is empty, when the bullets really are just clumped together at the bottom of the magazine mesh.
An early version of the MP40 rig, showing the joints placement.
When all the joints are placed in their desired positions, we add control curves (boxes) which are used to manipulate the joints by hand key. This makes it easier to work with the weapon rig since you don’t need to select the joints that are placed inside of the gun model when animating.
The final MP40 rig used in Battlefield V, here the model and animation control curves are visible but the joints are hidden.
A big shoutout to the Technical Animation team over at DICE for creating the rigging tools, you guys are amazing!
When the weapon is rigged we’re ready to start animating!
We match the weapon up with our soldier rig and start creating all the animations necessary to get the weapon into the game.
We match the weapon up with our soldier rig and start creating all the animations necessary to get the weapon into the game.The 1P and 3P view of our 1P soldier rig used to create the weapons animation set.
I mainly use the 3P view to select the controls and edit, then I watch/review the animations in the 1P view since that’s the view players see the animations from. The first step is always to find a good IdlePose for the gun. The IdlePose is how the gun and the soldiers hands are positioned on screen when you’re just standing still and aiming forward in-game.
This can actually take a very long time as we both want the weapon mesh to not cover the screen center because it will block the players view but we still want to show as much of the gun model as possible because it’s freaking cool stuff. If we move the gun closer to the camera it will appear to be very large and take up a lot of space on the screen, which in this case is something we probably want to avoid since it’s a quite light SMG type weapon. We also consider screen space in terms of left to right, where smaller weapons sit closer to center, and move further towards screen right the larger they are.
The hands need to be posed so they look like they are grabbing the weapon tightly, and we want the wrists to have a natural angle to them, nothing should look broken. We also need to take into consideration that the gun might have a bunch of planned customization that can get in the way of where we position our hands, and that is where clear communication between the 3D artists and us animators is of paramount importance!
We also don’t want the soldiers to grip onto barrels that might get hot when firing the gun. While taking all of these rules into consideration we are always looking for something that makes the gun look intense and fierce in the IdlePose alone, and it should be positioned roughly where the other guns of the same weapon class are.
When we have a nice IdlePose we can move on to making a ZoomPose and a SprintPose. The ZoomPose is used as the base for all of our animations when you are looking through the sights of the weapon, and the SprintPose is used as the base for when you’re sprinting in the game, where we add another animation layer of the gun moving around on screen.
These three poses (IdlePose, ZoomPose, SprintPose) sort of act as the core of the weapons animation set, and then all of the firing, reloads etc. are added on top of them.
With all of the core poses out of the way we can move into creating the fun things where the gun really gets to stand out from the rest of the arsenal.
The Deploy animation is not seen for long, but it is a prime example of an animation that can give the weapon a bit more of personality. For the MP40 Deploy animation I wanted to utilize the guns safety mechanic that is primarily used for transporting the gun when you’re not in combat. I also thought it would be cool to do something unique that is not simply “get the gun from off screen into screen” which is often the first go-to animation idea.
The raw file for the MP40s Deploy animation.
The reload animations are the most fun yet also the most daunting task as an core weapon animator. This is where the gun really gets to shine, and you can add a lot of personality to it. Once again you need to go back to your collected research, be it an actual physical weapon or a video on YouTube; you need to know how the gun is supposed to be operated. Over here at DICE we are very lucky as we have some people who know a lot about guns and they often helps us fact check how the mechanics work.
One of the fun things about weapons from WW2 is that they all behave in different ways. There was everything from regular MagOut/MagIn weapons as well as funky configurations with magazines on top, levers you had to pull and ammo belts going through the gun from one side to the other. This was of course even more of an aspect when DICE made Battlefield 1, but it’s still true for WW2 to some extent.
The MP40 requires two reload animations, one for when you still have bullets in the magazine, and one that is used when you empty the magazine. This is due to the bolt (the part of the action that closes during the firing of the round) not getting pushed back after you fire the final shot when emptying the mag. I decided to start with the longer variation as it was more complex and would probably take a longer time to finish.
At this point in the project I realised that all of our other guns where you change magazine we just pulled the mag out and it immediately left the screen. I wanted to do something different. That’s when a colleague came up with the idea to pull the mag out and then pull the bolt back as the magazine is still held with the left hand. I thought it was a cool idea so I went for it.
We also found out during our research that soldiers from WW2 stored their loaded magazines upside down in their ammo pouches, which is why the mag is rotated the way it is in my animation when the soldier pulls it up. Realism is important at DICE, so I wanted to simulate the real world version of pulling the magazine out of an ammo pouch on the waist.
The MP40 ReloadEmpty sequence.
When it comes to our 1P animations we try to stick to a few set guidelines that remain true throughout all of our animations. It is quite a long list, but here are some of the most critical ones:
Avoid screen center as it might mess with the players aiming. You’re allowed to cross it but only when necessary.
Follow the end of the barrel with your eyes, try to keep this as fluid as possible. There shouldn’t be any jerky movements.
Use the camera to emphasize the movements, make them quick bumps that re-center quickly. Avoid floating camera as it messes with the players aim. This is especially true closer to the end of the reload as the player might want to align the crosshairs towards the next target.
Try to keep the elbows quite low in ‘screen space’ as it often looks awkward if the elbows are in a higher position than the camera.
The overall feel of the animations should be:
Stressed - Soldiers in Battlefield is under fire almost all the time.
Tactical - Keep everything to the point and in control.
Weight - Consistent throughout the animation and unique per weapon type.
Timing - Break up the flow of the animation by hitting/holding strong actions and moving efficiently between those. This makes the animation more interesting
When all of your animations are done and exported it’s time to begin implementation into the game engine.
IMPLEMENTATION (technical talk ahead)
When we have imported the rig and animations into the game engine, we then need to set up how the animation should play. To keep this blogpost a bit short I’ll focus only on the ReloadEmpty sequence as an example.
For instance, we are sending variables to our Audio systems so our Audio Designers have a reference point to hook their audio up to. We have another variable called ComplexAnimation.Active which basically turns off all of the other fluff that could be played at the same time, such as the idle breathing animation, the sprint camera movements and hit reactions etc. When you’re reloading the gun you want that to be the main focus of what’s happening at that time.
We also have different enter points in the animation; basically timestamps where we allow you to continue an animation if it was previously cancelled and you re-enter. If you decide to maybe throw a grenade or if you’re switching to your sidearm when you’ve already pulled the magazine out, we don’t want the soldier to start over from the beginning when he goes back into the reload, but rather continue the animation from when the magazine is pulled out. Another way of putting it, is to say that where you are in the animation is saved, and the enter points dictates the different save points.
You also have two periods at the end of the sequence that we call end branches, 1P.Early.Branch and 1P.End.Branch. If the animation reaches this point we listen to different variables sent from the current gameplay situation that might allow the animation to end prematurely.
1P.Early.Branch is used if you for instance are sprinting as you’re reloading, so the gun will go down into the sprinting position before the full reload animation is finished. 1P.End.Branch is instead used for when you are standing still and you want that extra settle from the animation going into the IdlePose again.
A simplified illustration showing the different variables used for a regular rifle reload.
The MP40 is quite a basic gun implementation wise. Animating and implementing bolt action weapons is a whole other beast as it needs to be able to transition from different parts of the animation, from StripperClip insertions into SingleBullet loops, hiding and showing bullets at the correct times depending on your ammo count. You could basically go as complex as you want to here!
Once all of the animations are set up we go into the modifiers for the data. This is basically a hub for all of the weapons logic, where you can determine fire rate, how the recoil behaves, how fast the weapon transitions into the ZoomPose, how much ammo a magazine has, how many magazines you spawn with, how fast the bullet flies, the amount of bullet drop etc. This is basically the gameplay designers favourite place to be, but us animators also need to poke around in these settings.
For instance, we can use offsets for where the gun is positioned on screen when you have certain modifiers equipped such as scopes or extended magazines.
We have also set up systems where we can control how the gun moves around on screen when firing, how much kick the gun has per each individual shot and how it’s shaking and getting pushed back as you’re holding down the trigger.
Some of the values used for setting up the firing of an automatic fire rifle.
We can tweak something called LAG Data and change its pivot point, which determines how the gun moves around on screen as you’re giving input to the cursor/mouse. Overall we want the pivot of the LAG Data to be positioned so you feel like the gun is pushed towards the right shoulder of the soldier when you’re in hip mode, but when you go into zoom we move the pivot to the front sight of the weapon so we don’t mess with the players aim.
Showcasing the difference of good and bad LAG data.
There are a lot more things you can do in here, but this blog post is already quite extensive so I won’t go into more detail at this time.
That is basically it! Now it’s just a matter of going back and forth with all of the different parts, tweaking values etc. Maybe we notice in a playtest that the reloads are a bit too long, then it’s not just a matter of scaling the reload to play faster cause it will probably just look sped up which is not that nice, so in that case you’ll have to tweak the animation.
Maybe you notice the branch points in the animations being off, you might want to add new logic regarding if we want to show or hide certain bullet models or not, how low ammo states might affect the animations, what happens if you add a different scope to the gun etc. The iteration process never really ends, and we can always go back and tweak things even as the game is released.
Lastly, I would like to extend a big thank you to everyone involved in our weapon pipeline both over at the DICE Stockholm and DICE LA studios. These games wouldn’t be possible if it weren’t for you guys (you know who you are).
Almost the entire DICE Stockholm and DICE LA animation and technical animation team, unfortunately a few people were out sick when this picture was taken.