… Mr. President!!! … (Gen 3 Helicopter Implementation in Frostbite/Battlefield 4)
Guest contribution by Ben Minto and Bence Pajor of DICE
… Mr. President!!! …
There we were in The Thirsty Bear, reflecting on the first lot of GDC Audio Sessions, and up walks Mr. Menhorn. He knew what he wanted from us; so after introductions, a few more IPAs and some passionate discussion it was in the bag.
So here we are. A “behind the scenes”, warts and all, article and video about the helicopter models in Battlefield 4, written for the Designing Sound ‘vehicle’ month, of July.
The original model (design, implementation, samples etc.) and video capture were done by Bence Pajor, the Battlefield Audio Director and I’m (Ben Minto) handling the write up, even though I’m heading up the audio for DICE’s Star Wars Battlefront project. This is because we were both Audio Directors on Battlefield 4, due to Bence’s absence during the middle of the project, which was in turn due to the birth of his son (mini) Olof and Sweden’s generous paternity leave.
The article will have time stamps throughout that correlate to the video time, so you can relate visual and text. The video was split into two parts
00:00 Part 1
Looks like a test level. And it seems like we are going to be using the AH-1Z Viper for this demo. So we start with ‘enter’ and go through the start(up) and away, all from the interior (first person) perspective. As Bence manoeuvres, playing on top of the base interior cockpit whine loop ,we can hear how the model reacts to pitch, roll, tilt, and velocity changes, hovering and traversing.
01:17 Part 1
Now we jump to the exterior camera (third person), and the first thing to notice is the mix difference and how some of the filtering has been lifted from the engine and rotor components.
01:22 Part 1
The camera is now locked so we can experience how this model sounds to other players. The distance model and direction cones can clearly be heard, and are very strong indicators of the helicopter’s current position and travel vector. We will take a look at these in more detail later on.
01:35 Part 1
In this example we can hear how the HDR system suppresses the ambience, but that this is then audible again once the helicopter moves far enough away from the listener. The flanging on distance (internally called ‘Olof’s (Stromqvist) phaser’, which is technically incorrect naming, as it is based on time delays and not a series of all pass filters, but names have a habit of sticking) is clearly heard as are the pre-rendered passbys.
02:05 Part 1
The passbys are triggered by measuring the relative velocity between the listener and the emitter and then calculating when to start the sample so the midpoint of the playback lines up with when the helicopter passes by the listener. There are also some “safety nets” to catch false positives and also to handle a passby that has started playing, but that then no longer makes sense.
02:55 Part 1
At this point a passby would be playing, but would be quickly attenuated as the helicopter’s own velocity reduces. The helicopter approaches but then stops and hovers before passing the listener.
03:16 Part 1
And now Bence is showing off – it’s always fun to end a demo with a comedy crash, but not today. I was sure he was going to total it flying backwards into that bridge. This is a Gen 3 model and on some maps we could have up to 10 different vehicle models (jets, tanks, jeeps, helicopters etc.) and many more instances.
03:40 Part 1
Now we swap to a different attack helicopter the Russian MI-28 that Andreas (Almstrom) designed. This will share the same parent patch (behaviours and logic) as the Viper, but will have a different underlying set of samples and some value tweaks to give the best audio experience for this model. Sonically this model has more bite on blade thwop and a heavier distance sound, which although slightly exaggerated, makes distinguishing between the ‘good’ and the ‘bad’ helicopters easier when in the middle of a fire fight. Who has got my back or who is going to stab me in it?
03:45 Part 1
Again Bence takes us through a range of manoeuvres to show off the range and performance of the patch.
04:35 Part 1
With the settings in the demo here, the sound of the helicopter “disappears” over distance at a point that makes sense on a normal TV (apx 50”) where the helicopter appears to be the size of a Swedish black forest ant, however if you view this at a cinema, then that distance would feel way too short, as even at 300m away from the listener the helicopter is still almost as big as a person and you would still expect to hear it clearly. Don’t get me started on mixing for so many different setups …..
04:41 Part 1
Interesting filter blip – note to self, need to fix that. All of our source sounds come from either libraries we license across EA (Sound Ideas, Hollywood Edge, SoundDogs, PSE), independent libraries that we obtain a DICE license for (BOOM, The Recordist, Rabbit Ears Audio, Hiss and a Roar, Tonsturm), bespoke libraries, bespoke recordings (POLE, David Eisler) and our own recordings, or as usual a combination of all of the above.
05:38 Part 1
No helicopter crash then. So into the editor we go. Here is the source (or master) patch and this is the template for all attack and transport helicopters. Any changes here will propagate through to any children patches (i.e. the AH-1Z, MI-28 etc.). This is a handy data and work-flow optimisation. We only need to store the master patch and then any differences in each child model, and also if we need to add a new feature or fix any bugs, we only need to change one patch.
This is considered a medium sized patch for Battlefield. The layout obeys our standard language for patches in the DICE Audio Department and one that we are all familiar with.
We start from the far left hand side with the game parameters (velocity, distance, player position, damage etc) which in turn go into the maths section – typically a series of conditional nodes, math operations, scale clamps, parameter filters etc. that we use to tame the game parameters and derive control data that is more suitable for audio modulation.
The next block, usually a vertical block in the middle of the patch, is made up of the samplers which control the playback of each group of wavs (amplitude, pitch, offset, variant etc.). These then go into the DSP and mixing section and then to the outputs.
A neat patch like this is (relatively!) easy to follow and nodes are grouped and coloured into descriptive functional blocks.
05:57 Part 1
So here are the individual samplers of the AH-1Z Viper model. Here we will preview the default sound and setting for each of the samplers.
We start with the two engine components, Engine Distant which crossfades with Engine Close over distance. And then Rotor Distant which crossfades with Rotor Close over distance.
There are no perfect ‘flat’ loops here, we strive to use material that has life, performance and random fluctuations as part of the recording. Doing so adds more believability to our synthesised model.
06:47 Part 1
Hi Freq Turbine which is filtered and attenuated with distance and then ‘Helicopter Presence’ (downwash proximity sound) termed the “Mr. President!!!” sound by Stefan Strandberg (heard in any film where people quickly exit a helicopter, ducking and running under the blades and as they do so, shouting over the helicopter engine to express the urgency of the situation)
07:02 Part 1
Then we move on to some of the interior First Person Interior specific sounds.
Suspension bounce (heavy, hopefully non-fatal landings), air frame strain loop, base cockpit/interior loop and the start/stop or enter/exit one shots. To the right of this final sampler we can see two debug nodes (connected via dashed lines) for reviewing the value of some of the driving parameters and also trigger events.
07:47 Part 1
We have a quick look at the crash section, although this is driven by what we crash with (external to this patch), so beyond the light glass/cockpit interior bright sweetener, there is a sampler with a null slot for a wav file and in this setup it is looking for an External Wave that won’t be present in the preview.
08:12 Part 1
Next we will look at the six different outputs and will focus on the first three, namely; Turbine, Fwd Rotor and Bwd Engine. The three that we won’t look at are indoor flat – a special layer for listeners who are inside a building and as the helicopter gets closer to that building this is a resonance layer – i.e. how the power of the helicopter sound transfers into the building, resonates and also can make parts of the building rattle; a specific fly by output as the flybys are stereo and we play with the width on distance and finally the 1P Int which is for the chassis strain, cockpit loop etc. as discussed above.
08:19 Part 1
As we go back to the game, we now see via the debug sources screen the position and cone setup for the turbine (central based under the blades with no cone), the forward rotor (above the cockpit facing forward) and the backward facing engine (positioned by the exhaust ports facing backwards). We also see the master debug text of all 6 outputs for this patch.
The difference between forward and backwards facing components are especially important in providing the player with audio feedback about the helicopters direction of travel (away from or towards) and also it’s speed of rotation (determined by rate of change of perceived loudness between the two cones).
08:35 Part 1
Now we have solo’d the helicopter and whilst it idles we can demonstrate each component by soloing outputs and also nulling other components (setting the master amplitude on certain samplers to zero).
09:55 Part 1
Now it is very easy to hear the crossfade between each of the components. For this demonstration we are faking the helicopter flying, as it is a lot easier to keep the helicopter still and move the listener, than the other way around. Note how the “safety nets” in the passby logic prevent the triggering of a passby.
01:09 Part 2
Here we go in and edit the Fwd Rotor output, we can see in the properties panel to the right hand side of the screen, as we select an output, how the inner and outer angles of the cone are setup, including the direction it faces and also the dB drop off from being inside to the outside of the cone.
01:46 Part 2
Moving across the patch we come across the logic controlling the crossfade between two layers (for example of the engine), including the conditional logic to say if the loop should be playing at all – this a simple optimisation that can save on the total number of samplers playing simultaneously. A model like this is optimised further by having non overlapping distance crossfade regions, between adjacent pairs of sampler types (in this case, rotor and engine).
02:01 Part 2
Back to the game to see how our changes to the patch have altered the resulting sound. When using Frostbite we typically have 3 screens, with each of the pages (those that we are jumping between in this video) on a separate screen. This allows for very quick editing, tweaking, balancing and debugging of a patch.
02:22 Part 2
We keep skipping past the “phaser’ section in the patch editor, which (when combined with Doppler shift) gives the correct sense and timbre to the sound to tell us if the helicopter is approaching or going away from us. Listening to this section, this is a great demonstration of how it modifies the fairly static loops based on varying distance. Early on in the development of this feature one of the signs was the wrong way around in one of the maths operators – it sounded great but very odd! Later on we will see how this section is re-used to give a further sense of pitch and roll feedback, for the pilot in first person view.
02:57 Part 2
As we go back and forth across the patch, I must comment that Bence’s labelling and description is very clear in this patch so it makes understanding and debugging the logic a lot easier. At times we resist too much optimisation that, although they would give us small savings at runtime, they would make it harder to read the patch; it can be a bit of a balancing act.
03:08 Part 2
Another cone demo, showing a harsher outside gain factor. I might have to talk around the subject here as the video is a bit long – maybe it was a too much coffee day.
04:27 Part 2
We now listen to the rear engine output, which represents both the sound of the exhaust and also the rear rotor. A decision was made to keep these together based mainly on the source material available (where exhaust and rear rotor are in the same recording, and generally not available as separate recordings), run-time efficiency and also due to not modelling their separate behaviours.
05:25 Part 2
Almost all in.
06:33 Part 2
Mr. President …. Russians …. Your Daughter!! …. Nuclear …. adding back the helicopter presence layer.
06:50 Part 2
Finally, back into the air. As we swap between 3rd and 1st person views it isn’t a sharp cut; we lerp (linear interpolate) between the states and have small fades either via ADSRs or use attack and release portions in the core loops.
07:42 Part 2
Now we go into the value debugger, to give you some idea of how we vary the samplers with input. We use the G-Force parameter to calculate the “airframe” strain driving parameter and also as a load factor for the blades, which we use to ease off on the hi shelf filter and bump amplitude for the blades as G Force increases. We will see a visual graph representation of these values whilst we play the game in a bit. Some funky naming and renaming going on here.
09:38 Part 2
Yeah I don’t think we will be able to follow all that logic without pages of explanation! At a high level Bence is showing a path through the patch and how we follow and debug. Starting from the game parameters, which we convert to audio parameters to drive the samplers and then the audio signal path between the samplers and outputs, where we submix and apply DSP to various parts.
10:23 Part 2
I think we are waiting for the level to load, so what’s better than another quick fly over the patch?
11:02 Part 2
OK looks like the game value debug is up and displaying the values we connected earlier – so this is the raw physics or the info that we know about the helicopter and its behaviour, and from this ‘raw’ data we derive the playback logic and parameters for our loops.
This is a model that was built by starting with a distance crossfade model and then adding behaviours and subsystems, e.g. interior chassis strain, flybys, Mr. President proximity layer etc. and then doing an optimisation pass at each stage.
We control each sample’s amplitude and pitch, put also add additional randomness to that already contained in the sample through offset of samplers, slow period lfos and randomisation in filtering with distance.
An optimisation was to re-use part of the distance phaser to give additional life and feedback to changes in pitch and tilt for the 1st Person perspective.
Each model that we build has to stand on its own and sound good solo’d, but also be part of the full Battlefield experience, which could also include comms, friendlies, enemies, ordnance and destruction. There may be upwards of 200 models “running” at a time (there is a lot less than this in reality due to the excellent culling behaviour of the HDR system) trying to control around 1000 samplers, so optimisation, modular construction and shared “parent” patches save on overhead.
Well the video ended with no crash and no weapon firing – my two favourite parts. Oh well. We hope you found this peak interesting and thanks for listening / Bence&Ben