Crowd System

Crowd systems are common in open-world games where many NPCs can assemble, and always present interesting challenges when it comes to their audio implementation. In this post, we describe how to design such a system directly in Atom Craft.

Assets creation

First, we create loops for three levels of crowd density: low, medium, and high:

  • Low density will be for groups of 2 to 4 persons.
  • Medium density is for 4 to 8 persons.
  • And finally, high density is for groups of 10 and more.

Once your loops are ready, import them as Materials into your Atom Craft project. For each sound, set the Override loop information Flag property to True, to ensure that it will loop once added to a Cue.

01 Materials

Implementation

We will start by configuring each density level:

  • Create three Polyphonic Cues for Low, Medium, and High density.
  • Drag and drop the corresponding loop in each Cue.
  • Change the Pan Type to 3D Positioning.
  • Set the Voice Behavior property as Virtual Voice Retrigger and the Cue Limits to 3.
  • Finally, set the Pitch Random Range to a small value around 50 cents.

To simulate the crowd surrounding the player, use the Circle Random Sound Source Shape with a Random radius set at 5. This ensures that each new instance of the Cue will start from a random location around the listener. This is useful to quickly test our implementation, but in a game, you will probably have to dynamically create the 3D emitters based on the position of the NPCs.

Since there will be several instances of our Cues – and to avoid repetitiveness as much as possible –  we also randomize the playback start position in the loops:

  • In the three Cues, create several Sequence Start Markers and place them at various positions on the Waveform region.
  • Now the starting playback position will change randomly every time the Cue is triggered.

02 Sequence start markers

Changing the Crowd density

Changing the density of the crowd in real-time can be achieved by following these steps:

  • Create a new Polyphonic Cue, named Crowd Main.
  • In that Cue, create three new tracks and add an External Link Cue referencing the Low, Medium, and High Cues.

03 Main cue

At this point, the main Cue will play the three sounds at the same time. In order to progressively change the density of the crowd, we will need to use an AISAC:

  • Create an AISAC named Crowd Density.
  • Control the Volume of each track from the Crowd Main Cue by using the Crowd Density AISAC.
  • Make the Volume curves crossfade from the Low density track to the High density track like pictured below.
  • Using the AISAC, it is also possible to modulate the Bandpass – Cutoff Low to create smoother transitions between the different density levels.

04 AISAC

Finally, to test the implementation, open the Session window, drag and drop the Crowd Main Cue and start 3 instances of it. (Since the Cue limit is set to 3, triggering new Cues will not go over our Voice count.)

Adjust the Crowd Density AISAC to change the number of people you can hear. It is also a good idea to route the Cues to a Reverb Bus as it will create a more diffuse sound and glue everything together.

You can download the demo project below to try the crowd system yourself.

Leave a Reply

Your email address will not be published. Required fields are marked *