The Next-Gen Dynamic Sound System of Killzone Shadow Fall

311
The Next-Gen Dynamic Sound System of Killzone Shadow Fall

description

We'll describe our new audio run-time and toolset that was built specifically for Killzone Shadow Fall on PlayStation 4. However, the ideas used are widely applicable and the focus is on integration with the game engine and fast iteration, with special attention to shortcuts to get your creative spark translated into in-game sounds as quickly as possible. We will demonstrate our implementation of these demands, which is a next-gen sound system that was designed to combine artistic freedom with high run-time performance. It should be interesting to both creative as well as technical minds who are looking for inspiration on what to expect from a modern sound design environment. To emphasize the performance advantage, we will show the point of view of both the sound designer and the programmer simultaneously. We will use examples starting with simple sounds and build up to increasingly more complex dynamic ones to illustrate the benefits of this unique approach.

Transcript of The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Page 1: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Page 2: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Take Away

Page 3: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Take Away

• Promote experimentation

Page 4: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Take Away

• Promote experimentation

• Own your tools to allow it to happen

Page 5: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Take Away

• Promote experimentation

• Own your tools to allow it to happen

• Reduce “Idea to Game” time as much as possible

Page 6: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Take Away

Page 7: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Take Away

• If a programmer is in the creative loop, creativity suffers

Page 8: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Take Away

• If a programmer is in the creative loop, creativity suffers

• Don't be afraid to give designers a visual programming tool

Page 9: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Take Away

• If a programmer is in the creative loop, creativity suffers

• Don't be afraid to give designers a visual programming tool

• Generating code from assets is easy and powerful

Page 10: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Andreas Varga Anton WoldhekSenior Tech Programmer Senior Sound Designer

Who are Andreas & Anton? Why would you listen to them? Well, we worked on sound for these games…

Page 11: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Andreas VargaKillzone Shadow Fall

Killzone 3 Killzone 2 Manhunt 2

Max Payne 2: The Fall of Max Payne

Anton Woldhek

Killzone Shadow Fall Killzone 3 Killzone 2

!Creator of the Game Audio Podcast

Senior Tech Programmer Senior Sound Designer

Who are Andreas & Anton? Why would you listen to them? Well, we worked on sound for these games…

Page 12: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

We work at Guerrilla, which is one of Sony’s 1st party studios. Here’s a view of our sound studios

Page 13: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Killzone 2 Killzone 3

Page 14: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

After Killzone 3, we started working on Killzone Shadow Fall, which was a launch title for the PS4. This was planned as a next-gen title from the beginning.

Page 15: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Here's a short video showing how the game looks and sounds.

Page 16: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Here's a short video showing how the game looks and sounds.

Page 17: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Andreas: But what exactly does next-gen mean? We thought next gen sound (initially) wouldn’t be about fancy new DSP but about faster iteration and less optimization. To allow the creation of more flexible sounds that truly can become a part of the game design. We also wanted to make sure that the sound team works with the same basic work flow as the rest of the company. So our motivation was to build a cutting edge sound system and tool set, but don't build a new synth.

Page 18: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

What is Next-Gen Audio?

Anton

Page 19: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

What is Next-Gen Audio?

• Emancipating sound, the team and the asset

Anton

Page 20: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

What is Next-Gen Audio?

• Emancipating sound, the team and the asset

• Instantly hearing work in game, never reload

Anton

Page 21: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

What is Next-Gen Audio?

• Emancipating sound, the team and the asset

• Instantly hearing work in game, never reload

• Extendable system, reusable components

Anton

Page 22: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

What is Next-Gen Audio?

• Emancipating sound, the team and the asset

• Instantly hearing work in game, never reload

• Extendable system, reusable components

• High run-time performance

Anton

Page 23: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

What is Next-Gen Audio?

• Emancipating sound, the team and the asset

• Instantly hearing work in game, never reload

• Extendable system, reusable components

• High run-time performance

• Don’t worry about the synth

Anton

Page 24: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Why Emancipate?

Anton

Page 25: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Why Emancipate?

• Audio is separate from rest

Anton

Page 26: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Why Emancipate?

• Audio is separate from rest

• Physical: sound proof rooms

Anton

Page 27: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Why Emancipate?

• Audio is separate from rest

• Physical: sound proof rooms

• Mental: closed off sound engine and tools

Anton

Page 28: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Why Emancipate?

• Audio is separate from rest

• Physical: sound proof rooms

• Mental: closed off sound engine and tools

• Should actively pursue integration

Anton

Page 29: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Why Integrate?

Anton

Page 30: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Why Integrate?

• Gain a community of end users that:

Anton

Page 31: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Why Integrate?

• Gain a community of end users that:

• Can help with complex setup

Anton

Page 32: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Why Integrate?

• Gain a community of end users that:

• Can help with complex setup

• Teach you new tricks

Anton

Page 33: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Why Integrate?

• Gain a community of end users that:

• Can help with complex setup

• Teach you new tricks

• Find bugs

Anton

Page 34: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Why Integrate?

• Gain a community of end users that:

• Can help with complex setup

• Teach you new tricks

• Find bugs

• Benefit mutually from improvements

Anton

Page 35: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Motivation for Change

Page 36: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Motivation for ChangePrevious generation very risk averse, failing was not possible

Page 37: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Ideas we had Ideas we implemented Ideas we shipped withKZ2/KZ3 KZ SF KZ2/KZ3 KZ SF KZ2/KZ3 KZ SF

Motivation for ChangePrevious generation very risk averse, failing was not possible

Page 38: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Ideas we had Ideas we implemented Ideas we shipped withKZ2/KZ3 KZ SF KZ2/KZ3 KZ SF KZ2/KZ3 KZ SF

Motivation for ChangePrevious generation very risk averse, failing was not possible

Page 39: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Ideas we had Ideas we implemented Ideas we shipped withKZ2/KZ3 KZ SF KZ2/KZ3 KZ SF KZ2/KZ3 KZ SF

Motivation for ChangePrevious generation very risk averse, failing was not possible

Page 40: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Ideas we had Ideas we implemented Ideas we shipped withKZ2/KZ3 KZ SF KZ2/KZ3 KZ SF KZ2/KZ3 KZ SF

Motivation for ChangePrevious generation very risk averse, failing was not possible

We could experiment

much more! {

Page 41: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Ideas we had Ideas we implemented Ideas we shipped withKZ2/KZ3 KZ SF KZ2/KZ3 KZ SF KZ2/KZ3 KZ SF

Motivation for ChangePrevious generation very risk averse, failing was not possible

More of the ideas

shipped in the game! {

We could experiment

much more! {

Page 42: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Ideas we had Ideas we implemented Ideas we shipped withKZ2/KZ3 KZ SF KZ2/KZ3 KZ SF KZ2/KZ3 KZ SF

Motivation for ChangePrevious generation very risk averse, failing was not possible

More of the ideas

shipped in the game! {

We could experiment

much more! { } No

badideas!

Page 43: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Old Workflow

Nuendo

Page 44: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Old Workflow

Nuendo

Page 45: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Old Workflow

Nuendo export WAVAssets

Page 46: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Old Workflow

Nuendo export 3rd Party Sound Tool

WAVAssets import

Page 47: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Old Workflow

Nuendo export 3rd Party Sound Tool

WAVAssets import reload Play Game

Page 48: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Old Workflow

Nuendo export 3rd Party Sound Tool

WAVAssets import reload Play Game

Wasted Time Wasted Time Wasted Time

~10s 5s…30s ~2mins

Page 49: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

New Workflow

Nuendo

Sound Tool

Running Game

Page 50: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

New Workflow

Nuendo export

Sound Tool

WAVAssets

hot-load

Running Game

hot-load

Page 51: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

New Workflow

Nuendo export

Sound Tool

WAVAssets

hot-load

Running Game

hot-load

Wasted Time

~10s

Page 52: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Video of iterating on a single sound by re-exporting its wav files from Nuendo and syncing the changes with the running game.

Page 53: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Video of iterating on a single sound by re-exporting its wav files from Nuendo and syncing the changes with the running game.

Page 54: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

No More Auditioning Tool

Page 55: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

No More Auditioning Tool

• Game is the inspiration

Page 56: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

No More Auditioning Tool

• Game is the inspiration

• Get sound into the game quickly

Page 57: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

No More Auditioning Tool

• Game is the inspiration

• Get sound into the game quickly

• No interruptions

Page 58: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

No More Auditioning Tool

• Game is the inspiration

• Get sound into the game quickly

• No interruptions

• Why audition anywhere else?

Page 59: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

How to Emancipate?

Andreas

Page 60: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

How to Emancipate?

• Make sound engine and tools in-house

Andreas

Page 61: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

How to Emancipate?

• Make sound engine and tools in-house

• Allows deep integration

Andreas

Page 62: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

How to Emancipate?

• Make sound engine and tools in-house

• Allows deep integration

• Immediate changes, based on designer feedback

Andreas

Page 63: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

How to Emancipate?

• Make sound engine and tools in-house

• Allows deep integration

• Immediate changes, based on designer feedback

• No arbitrary technical limitations

Andreas

Page 64: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Extendable, Reusableand

High Performance?

Page 65: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

April 11, 2011

Page 66: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

April 11, 2011

Page 67: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

April 11, 2011

Page 68: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

!

Anton: Sound designers are already used to data flow environments such as Max/MSP and puredata. !Andreas: But while that’s one good way of thinking about our system, it’s also a bit different from them. Our system doesn’t work at on the sample level or audio rate, i.e. we’re not using our graphs for synthesis, but just for playback of already existing waveform data.

Page 69: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

!

Max/MSP

Anton: Sound designers are already used to data flow environments such as Max/MSP and puredata. !Andreas: But while that’s one good way of thinking about our system, it’s also a bit different from them. Our system doesn’t work at on the sample level or audio rate, i.e. we’re not using our graphs for synthesis, but just for playback of already existing waveform data.

Page 70: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

!

Max/MSP Pure Data

Anton: Sound designers are already used to data flow environments such as Max/MSP and puredata. !Andreas: But while that’s one good way of thinking about our system, it’s also a bit different from them. Our system doesn’t work at on the sample level or audio rate, i.e. we’re not using our graphs for synthesis, but just for playback of already existing waveform data.

Page 71: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

⚠️ Technical Details Ahead! ⚠️

Page 72: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

⚠️ Technical Details Ahead! ⚠️

• We will show code

Page 73: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

⚠️ Technical Details Ahead! ⚠️

• We will show code

• But you don’t have to be afraid

Page 74: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

⚠️ Technical Details Ahead! ⚠️

• We will show code

• But you don’t have to be afraid

• Sound designers will never have to look at it

Page 75: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Graph Sound System

Page 76: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Graph Sound System

• Generate native code from data flow

Page 77: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Graph Sound System

• Generate native code from data flow

• Execute resulting program every 5.333ms (187Hz)

Page 78: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Graph Sound System

• Generate native code from data flow

• Execute resulting program every 5.333ms (187Hz)

• Used to play samples and modulate parameters

Page 79: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Graph Sound System

• Generate native code from data flow

• Execute resulting program every 5.333ms (187Hz)

• Used to play samples and modulate parameters

• NOT running actual synthesis

Page 80: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Graph Sound System

• Generate native code from data flow

• Execute resulting program every 5.333ms (187Hz)

• Used to play samples and modulate parameters

• NOT running actual synthesis

• Dynamic behavior

Page 81: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Sound

Input X

Input Y

Output Z

The graphs we build have certain inputs and outputs and are made up of individual nodes and connections. Note that each graph can also be used as a node, which is very important. The functionality of each node is defined in a C++ file, which typically just contains one function. When we need to translate this graph into C++ code, we take those node definition files and paste them into a C++ file for the whole graph. We then generate the code according to how the nodes are connected, by calling the individual node functions in the right order.

Page 82: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Sound

Node A

Node C

Node B

Input X

Input Y

Output Z

The graphs we build have certain inputs and outputs and are made up of individual nodes and connections. Note that each graph can also be used as a node, which is very important. The functionality of each node is defined in a C++ file, which typically just contains one function. When we need to translate this graph into C++ code, we take those node definition files and paste them into a C++ file for the whole graph. We then generate the code according to how the nodes are connected, by calling the individual node functions in the right order.

Page 83: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Sound

Node A

Node C

Node B

Input X

Input Y

Output Z

The graphs we build have certain inputs and outputs and are made up of individual nodes and connections. Note that each graph can also be used as a node, which is very important. The functionality of each node is defined in a C++ file, which typically just contains one function. When we need to translate this graph into C++ code, we take those node definition files and paste them into a C++ file for the whole graph. We then generate the code according to how the nodes are connected, by calling the individual node functions in the right order.

Page 84: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Sound

Node A

Node C

Node B

A.cpp

B.cpp

C.cpp

Input X

Input Y

Output Z

The graphs we build have certain inputs and outputs and are made up of individual nodes and connections. Note that each graph can also be used as a node, which is very important. The functionality of each node is defined in a C++ file, which typically just contains one function. When we need to translate this graph into C++ code, we take those node definition files and paste them into a C++ file for the whole graph. We then generate the code according to how the nodes are connected, by calling the individual node functions in the right order.

Page 85: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

A.cpp

B.cpp

C.cpp

The graphs we build have certain inputs and outputs and are made up of individual nodes and connections. Note that each graph can also be used as a node, which is very important. The functionality of each node is defined in a C++ file, which typically just contains one function. When we need to translate this graph into C++ code, we take those node definition files and paste them into a C++ file for the whole graph. We then generate the code according to how the nodes are connected, by calling the individual node functions in the right order.

Page 86: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

A.cpp

B.cpp

C.cpp

Sound.cpp

The graphs we build have certain inputs and outputs and are made up of individual nodes and connections. Note that each graph can also be used as a node, which is very important. The functionality of each node is defined in a C++ file, which typically just contains one function. When we need to translate this graph into C++ code, we take those node definition files and paste them into a C++ file for the whole graph. We then generate the code according to how the nodes are connected, by calling the individual node functions in the right order.

Page 87: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Sound.cpp

A(inA, outA) { … } B(inB, outB) { … } C(inX, inY, outZ) { … }

The graphs we build have certain inputs and outputs and are made up of individual nodes and connections. Note that each graph can also be used as a node, which is very important. The functionality of each node is defined in a C++ file, which typically just contains one function. When we need to translate this graph into C++ code, we take those node definition files and paste them into a C++ file for the whole graph. We then generate the code according to how the nodes are connected, by calling the individual node functions in the right order.

Page 88: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Sound(X, Y, Z){ A(X,outA); B(Y,outB); C(outA,outB,Z);}

Sound.cpp

A(inA, outA) { … } B(inB, outB) { … } C(inX, inY, outZ) { … }

The graphs we build have certain inputs and outputs and are made up of individual nodes and connections. Note that each graph can also be used as a node, which is very important. The functionality of each node is defined in a C++ file, which typically just contains one function. When we need to translate this graph into C++ code, we take those node definition files and paste them into a C++ file for the whole graph. We then generate the code according to how the nodes are connected, by calling the individual node functions in the right order.

Page 89: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Sound.cpp

So as part of our content pipeline the C++ code that was generated for the graph is then compiled into an object file, and together with other object files gets linked into a dynamic library, which are loaded as PRX files on the PS4 at runtime. This allows us to execute the code in the game. Our initial attempt was slightly different tough: We’ve first experimented with LLVM using byte code and the LLVM JIT compiler at runtime, which was nice for the initial testing and development. But soon after that we switched to a more traditional offline compilation step, using clang and dynamic libraries.

Page 90: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Sound.cpp compile

So as part of our content pipeline the C++ code that was generated for the graph is then compiled into an object file, and together with other object files gets linked into a dynamic library, which are loaded as PRX files on the PS4 at runtime. This allows us to execute the code in the game. Our initial attempt was slightly different tough: We’ve first experimented with LLVM using byte code and the LLVM JIT compiler at runtime, which was nice for the initial testing and development. But soon after that we switched to a more traditional offline compilation step, using clang and dynamic libraries.

Page 91: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Sound.cpp compile Sound.o

So as part of our content pipeline the C++ code that was generated for the graph is then compiled into an object file, and together with other object files gets linked into a dynamic library, which are loaded as PRX files on the PS4 at runtime. This allows us to execute the code in the game. Our initial attempt was slightly different tough: We’ve first experimented with LLVM using byte code and the LLVM JIT compiler at runtime, which was nice for the initial testing and development. But soon after that we switched to a more traditional offline compilation step, using clang and dynamic libraries.

Page 92: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Sound.cpp compile Sound.o compile Sound2.ocompile Sound3.ocompile Sound4.oSound2.cpp

Sound3.cppSound4.cpp

So as part of our content pipeline the C++ code that was generated for the graph is then compiled into an object file, and together with other object files gets linked into a dynamic library, which are loaded as PRX files on the PS4 at runtime. This allows us to execute the code in the game. Our initial attempt was slightly different tough: We’ve first experimented with LLVM using byte code and the LLVM JIT compiler at runtime, which was nice for the initial testing and development. But soon after that we switched to a more traditional offline compilation step, using clang and dynamic libraries.

Page 93: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Sound.cpp compile Sound.o compile Sound2.ocompile Sound3.ocompile Sound4.o

link

Sound2.cppSound3.cpp

Sound4.cpp

So as part of our content pipeline the C++ code that was generated for the graph is then compiled into an object file, and together with other object files gets linked into a dynamic library, which are loaded as PRX files on the PS4 at runtime. This allows us to execute the code in the game. Our initial attempt was slightly different tough: We’ve first experimented with LLVM using byte code and the LLVM JIT compiler at runtime, which was nice for the initial testing and development. But soon after that we switched to a more traditional offline compilation step, using clang and dynamic libraries.

Page 94: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Sound.cpp compile Sound.o compile Sound2.ocompile Sound3.ocompile Sound4.o

Dynamic Library (PRX)

link

Sound2.cppSound3.cpp

Sound4.cpp

So as part of our content pipeline the C++ code that was generated for the graph is then compiled into an object file, and together with other object files gets linked into a dynamic library, which are loaded as PRX files on the PS4 at runtime. This allows us to execute the code in the game. Our initial attempt was slightly different tough: We’ve first experimented with LLVM using byte code and the LLVM JIT compiler at runtime, which was nice for the initial testing and development. But soon after that we switched to a more traditional offline compilation step, using clang and dynamic libraries.

Page 95: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Sound.cpp compile Sound.o compile Sound2.ocompile Sound3.ocompile Sound4.o

Dynamic Library (PRX)

link

hot-load

Sound2.cppSound3.cpp

Sound4.cpp

So as part of our content pipeline the C++ code that was generated for the graph is then compiled into an object file, and together with other object files gets linked into a dynamic library, which are loaded as PRX files on the PS4 at runtime. This allows us to execute the code in the game. Our initial attempt was slightly different tough: We’ve first experimented with LLVM using byte code and the LLVM JIT compiler at runtime, which was nice for the initial testing and development. But soon after that we switched to a more traditional offline compilation step, using clang and dynamic libraries.

Page 96: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Sound.cpp compile Sound.o compile Sound2.ocompile Sound3.ocompile Sound4.o

Dynamic Library (PRX)

link

Execute Sound() in Game hot-load

Sound2.cppSound3.cpp

Sound4.cpp

So as part of our content pipeline the C++ code that was generated for the graph is then compiled into an object file, and together with other object files gets linked into a dynamic library, which are loaded as PRX files on the PS4 at runtime. This allows us to execute the code in the game. Our initial attempt was slightly different tough: We’ve first experimented with LLVM using byte code and the LLVM JIT compiler at runtime, which was nice for the initial testing and development. But soon after that we switched to a more traditional offline compilation step, using clang and dynamic libraries.

Page 97: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

The most simple graph sound example we can come up with

Lets get to know the system by building a very basic sound

Page 98: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Wave

inStart

inWave (sample data)

Inputs

on_starton_stop

Other VoiceParameters:Dry Gain,Wet Gain,LFE Gain, etc.

inStop

}Game

Parameters{

Page 99: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

• Wave node is used to play sample data

Wave

inStart

inWave (sample data)

Inputs

on_starton_stop

Other VoiceParameters:Dry Gain,Wet Gain,LFE Gain, etc.

inStop

}Game

Parameters{

Page 100: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

• Wave node is used to play sample data• The on_start input is activated when the sound starts

Wave

inStart

inWave (sample data)

Inputs

on_starton_stop

Other VoiceParameters:Dry Gain,Wet Gain,LFE Gain, etc.

inStop

}Game

Parameters{

Page 101: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

• Wave node is used to play sample data• The on_start input is activated when the sound starts• When inStart is active, a voice is created and played

Wave

inStart

inWave (sample data)

Inputs

on_starton_stop

Other VoiceParameters:Dry Gain,Wet Gain,LFE Gain, etc.

inStop

}Game

Parameters{

Page 102: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

• Wave node is used to play sample data • The on_start input is activated when the sound starts • When inStart is active, a voice is created and played • So this graph plays one sample when the sound starts

Wave

inStart

inWave (sample data)

Inputs

on_starton_stop

Other VoiceParameters:Dry Gain,Wet Gain,LFE Gain, etc.

inStop

}Game

Parameters{

Page 103: The Next-Gen Dynamic Sound System of Killzone Shadow Fall
Page 104: The Next-Gen Dynamic Sound System of Killzone Shadow Fall
Page 105: The Next-Gen Dynamic Sound System of Killzone Shadow Fall
Page 106: The Next-Gen Dynamic Sound System of Killzone Shadow Fall
Page 107: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

But what about the code?

Andreas: This is the result of the code generator, it's fairly readable. You can see the Wave node function call and how the on_start input of the graph is passed as a parameter. The sample is a constant resource attached to the graph and can be retrieved with this function, which is implemented in the engine code. Clang’s optimizer creates really tight assembly code from this. It's super fast, so we can run it at a high rate, currently once per synth frame, i.e. every 5.3 ms. As you can see, every input of the graph, becomes a parameter of the graph function, and each node input is also a parameter of the node function.

Page 108: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

But what about the code?!! void Sound(bool _on_start_, bool _on_stop_) { bool outAllVoicesDone = false; float outDuration = 0; ! Wave(_on_start_, false, false, WaveDataPointer, VoiceParameters, ..., &outAllVoicesDone, &outDuration); }

Andreas: This is the result of the code generator, it's fairly readable. You can see the Wave node function call and how the on_start input of the graph is passed as a parameter. The sample is a constant resource attached to the graph and can be retrieved with this function, which is implemented in the engine code. Clang’s optimizer creates really tight assembly code from this. It's super fast, so we can run it at a high rate, currently once per synth frame, i.e. every 5.3 ms. As you can see, every input of the graph, becomes a parameter of the graph function, and each node input is also a parameter of the node function.

Page 109: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

But what about the code?!! void Sound(bool _on_start_, bool _on_stop_) { bool outAllVoicesDone = false; float outDuration = 0; ! Wave(_on_start_, false, false, WaveDataPointer, VoiceParameters, ..., &outAllVoicesDone, &outDuration); }

Andreas: This is the result of the code generator, it's fairly readable. You can see the Wave node function call and how the on_start input of the graph is passed as a parameter. The sample is a constant resource attached to the graph and can be retrieved with this function, which is implemented in the engine code. Clang’s optimizer creates really tight assembly code from this. It's super fast, so we can run it at a high rate, currently once per synth frame, i.e. every 5.3 ms. As you can see, every input of the graph, becomes a parameter of the graph function, and each node input is also a parameter of the node function.

Page 110: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

But what about the code?!! void Sound(bool _on_start_, bool _on_stop_) { bool outAllVoicesDone = false; float outDuration = 0; ! Wave(_on_start_, false, false, WaveDataPointer, VoiceParameters, ..., &outAllVoicesDone, &outDuration); }

Andreas: This is the result of the code generator, it's fairly readable. You can see the Wave node function call and how the on_start input of the graph is passed as a parameter. The sample is a constant resource attached to the graph and can be retrieved with this function, which is implemented in the engine code. Clang’s optimizer creates really tight assembly code from this. It's super fast, so we can run it at a high rate, currently once per synth frame, i.e. every 5.3 ms. As you can see, every input of the graph, becomes a parameter of the graph function, and each node input is also a parameter of the node function.

Page 111: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

But what about the code?!! void Sound(bool _on_start_, bool _on_stop_) { bool outAllVoicesDone = false; float outDuration = 0; ! Wave(_on_start_, false, false, WaveDataPointer, VoiceParameters, ..., &outAllVoicesDone, &outDuration); }

#include <Wave.cpp>

Andreas: This is the result of the code generator, it's fairly readable. You can see the Wave node function call and how the on_start input of the graph is passed as a parameter. The sample is a constant resource attached to the graph and can be retrieved with this function, which is implemented in the engine code. Clang’s optimizer creates really tight assembly code from this. It's super fast, so we can run it at a high rate, currently once per synth frame, i.e. every 5.3 ms. As you can see, every input of the graph, becomes a parameter of the graph function, and each node input is also a parameter of the node function.

Page 112: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

But the nice thing is, that the code is not immediately visible. It’s there, and as a programmer you can use it to debug what’s going on, but a sound designer would only see the graph representation.

Page 113: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Anton: Now let's inject the sound into the game and play it, for testing purposes. Video showing how a sound is created from scratch and injected into the running game.

Page 114: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Anton: Now let's inject the sound into the game and play it, for testing purposes. Video showing how a sound is created from scratch and injected into the running game.

Page 115: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Andreas: Now lets add some more dynamic behaviour to the sound. As you can see in the blue inputs node, I’ve added an input called “inDistanceToListener” which is filled in by the engine with the distance in meters between this sound and the listener. I use this distance as the X value of a curve lookup node, and use the Y value as the cutoff frequency of a low pass filter of the wave node. The rest is the same as in the previous example. !Btw: As you can see, the gain inputs are all linear values, from 0 to 1. This is not very sound designer friendly, but it makes it easier to do certain calculations. In case you prefer dB full-scale, then we have a very simple node you can

put in front to convert from dB to linear values.

Page 116: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Andreas: Now lets add some more dynamic behaviour to the sound. As you can see in the blue inputs node, I’ve added an input called “inDistanceToListener” which is filled in by the engine with the distance in meters between this sound and the listener. I use this distance as the X value of a curve lookup node, and use the Y value as the cutoff frequency of a low pass filter of the wave node. The rest is the same as in the previous example. !Btw: As you can see, the gain inputs are all linear values, from 0 to 1. This is not very sound designer friendly, but it makes it easier to do certain calculations. In case you prefer dB full-scale, then we have a very simple node you can

put in front to convert from dB to linear values.

Page 117: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Andreas: Now lets add some more dynamic behaviour to the sound. As you can see in the blue inputs node, I’ve added an input called “inDistanceToListener” which is filled in by the engine with the distance in meters between this sound and the listener. I use this distance as the X value of a curve lookup node, and use the Y value as the cutoff frequency of a low pass filter of the wave node. The rest is the same as in the previous example. !Btw: As you can see, the gain inputs are all linear values, from 0 to 1. This is not very sound designer friendly, but it makes it easier to do certain calculations. In case you prefer dB full-scale, then we have a very simple node you can

put in front to convert from dB to linear values.

Page 118: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Andreas: Now lets add some more dynamic behaviour to the sound. As you can see in the blue inputs node, I’ve added an input called “inDistanceToListener” which is filled in by the engine with the distance in meters between this sound and the listener. I use this distance as the X value of a curve lookup node, and use the Y value as the cutoff frequency of a low pass filter of the wave node. The rest is the same as in the previous example. !Btw: As you can see, the gain inputs are all linear values, from 0 to 1. This is not very sound designer friendly, but it makes it easier to do certain calculations. In case you prefer dB full-scale, then we have a very simple node you can

put in front to convert from dB to linear values.

Page 119: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Andreas: Now lets add some more dynamic behaviour to the sound. As you can see in the blue inputs node, I’ve added an input called “inDistanceToListener” which is filled in by the engine with the distance in meters between this sound and the listener. I use this distance as the X value of a curve lookup node, and use the Y value as the cutoff frequency of a low pass filter of the wave node. The rest is the same as in the previous example. !Btw: As you can see, the gain inputs are all linear values, from 0 to 1. This is not very sound designer friendly, but it makes it easier to do certain calculations. In case you prefer dB full-scale, then we have a very simple node you can

put in front to convert from dB to linear values.

Page 120: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

void Sound(bool _on_start_, bool _on_stop_, float inDistanceToListener) { float outYValue = 0; EvaluateCurve(CurveDataPointer, inDistanceToListener, &outYValue); ! bool outAllVoicesDone = false; float outDuration = 0; Wave(_on_start_, false, false, WaveDataPointer, VoiceParameters, outYValue, &outAllVoicesDone, &outDuration); }

It’s getting a bit more complicated now, but it’s still easy enough to see what’s going on. The inDistanceToListener input of the graph becomes a new graph function parameter. The Evaluate node is now called, and since the Wave node depends on the output of the Evaluate node, the Wave node has to be called after the Evaluate node. The code generator uses the dependencies to define the order in which it needs to call each node’s function.

Page 121: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

void Sound(bool _on_start_, bool _on_stop_, float inDistanceToListener) { float outYValue = 0; EvaluateCurve(CurveDataPointer, inDistanceToListener, &outYValue); ! bool outAllVoicesDone = false; float outDuration = 0; Wave(_on_start_, false, false, WaveDataPointer, VoiceParameters, outYValue, &outAllVoicesDone, &outDuration); }

It’s getting a bit more complicated now, but it’s still easy enough to see what’s going on. The inDistanceToListener input of the graph becomes a new graph function parameter. The Evaluate node is now called, and since the Wave node depends on the output of the Evaluate node, the Wave node has to be called after the Evaluate node. The code generator uses the dependencies to define the order in which it needs to call each node’s function.

Page 122: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

void Sound(bool _on_start_, bool _on_stop_, float inDistanceToListener) { float outYValue = 0; EvaluateCurve(CurveDataPointer, inDistanceToListener, &outYValue); ! bool outAllVoicesDone = false; float outDuration = 0; Wave(_on_start_, false, false, WaveDataPointer, VoiceParameters, outYValue, &outAllVoicesDone, &outDuration); }

It’s getting a bit more complicated now, but it’s still easy enough to see what’s going on. The inDistanceToListener input of the graph becomes a new graph function parameter. The Evaluate node is now called, and since the Wave node depends on the output of the Evaluate node, the Wave node has to be called after the Evaluate node. The code generator uses the dependencies to define the order in which it needs to call each node’s function.

Page 123: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

void Sound(bool _on_start_, bool _on_stop_, float inDistanceToListener) { float outYValue = 0; EvaluateCurve(CurveDataPointer, inDistanceToListener, &outYValue); ! bool outAllVoicesDone = false; float outDuration = 0; Wave(_on_start_, false, false, WaveDataPointer, VoiceParameters, outYValue, &outAllVoicesDone, &outDuration); }

It’s getting a bit more complicated now, but it’s still easy enough to see what’s going on. The inDistanceToListener input of the graph becomes a new graph function parameter. The Evaluate node is now called, and since the Wave node depends on the output of the Evaluate node, the Wave node has to be called after the Evaluate node. The code generator uses the dependencies to define the order in which it needs to call each node’s function.

Page 124: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

void Sound(bool _on_start_, bool _on_stop_, float inDistanceToListener) { float outYValue = 0; EvaluateCurve(CurveDataPointer, inDistanceToListener, &outYValue); ! bool outAllVoicesDone = false; float outDuration = 0; Wave(_on_start_, false, false, WaveDataPointer, VoiceParameters, outYValue, &outAllVoicesDone, &outDuration); }

It’s getting a bit more complicated now, but it’s still easy enough to see what’s going on. The inDistanceToListener input of the graph becomes a new graph function parameter. The Evaluate node is now called, and since the Wave node depends on the output of the Evaluate node, the Wave node has to be called after the Evaluate node. The code generator uses the dependencies to define the order in which it needs to call each node’s function.

Page 125: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

void Sound(bool _on_start_, bool _on_stop_, float inDistanceToListener) { float outYValue = 0; EvaluateCurve(CurveDataPointer, inDistanceToListener, &outYValue); ! bool outAllVoicesDone = false; float outDuration = 0; Wave(_on_start_, false, false, WaveDataPointer, VoiceParameters, outYValue, &outAllVoicesDone, &outDuration); }

#include <EvaluateCurve.cpp> #include <Wave.cpp>

It’s getting a bit more complicated now, but it’s still easy enough to see what’s going on. The inDistanceToListener input of the graph becomes a new graph function parameter. The Evaluate node is now called, and since the Wave node depends on the output of the Evaluate node, the Wave node has to be called after the Evaluate node. The code generator uses the dependencies to define the order in which it needs to call each node’s function.

Page 126: The Next-Gen Dynamic Sound System of Killzone Shadow Fall
Page 127: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Video showing effect of distance-based low pass filtering example

Page 128: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Video showing effect of distance-based low pass filtering example

Page 129: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Adding Nodes

I guess by now you can see how this system allowed us to build powerful dynamic sounds, just limited by the set of nodes we have available. But why is it truly extendable? That’s because it’s really easy to create a new node in this system. Basically all you need to do is create an asset describing the inputs and outputs of the node (can be done in our editor) and a C++ file containing the implementation. Our code generator will collect the little snippets of C++ code for each node and create a combined function for each graph. No external libraries are used, even for math we call functions in the game engine. The generated graph programs are not linked with anything, so very small and light weight. This also means that the game or the editor don’t need to be recompiled to add a simple node. Nodes and graphs are game assets, which get turned into code automatically by the content pipeline.

Page 130: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Adding Nodes

• Create C++ file with one function

I guess by now you can see how this system allowed us to build powerful dynamic sounds, just limited by the set of nodes we have available. But why is it truly extendable? That’s because it’s really easy to create a new node in this system. Basically all you need to do is create an asset describing the inputs and outputs of the node (can be done in our editor) and a C++ file containing the implementation. Our code generator will collect the little snippets of C++ code for each node and create a combined function for each graph. No external libraries are used, even for math we call functions in the game engine. The generated graph programs are not linked with anything, so very small and light weight. This also means that the game or the editor don’t need to be recompiled to add a simple node. Nodes and graphs are game assets, which get turned into code automatically by the content pipeline.

Page 131: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Adding Nodes

• Create C++ file with one function

• Create small description file for node

I guess by now you can see how this system allowed us to build powerful dynamic sounds, just limited by the set of nodes we have available. But why is it truly extendable? That’s because it’s really easy to create a new node in this system. Basically all you need to do is create an asset describing the inputs and outputs of the node (can be done in our editor) and a C++ file containing the implementation. Our code generator will collect the little snippets of C++ code for each node and create a combined function for each graph. No external libraries are used, even for math we call functions in the game engine. The generated graph programs are not linked with anything, so very small and light weight. This also means that the game or the editor don’t need to be recompiled to add a simple node. Nodes and graphs are game assets, which get turned into code automatically by the content pipeline.

Page 132: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Adding Nodes

• Create C++ file with one function

• Create small description file for node

• List inputs and outputs

I guess by now you can see how this system allowed us to build powerful dynamic sounds, just limited by the set of nodes we have available. But why is it truly extendable? That’s because it’s really easy to create a new node in this system. Basically all you need to do is create an asset describing the inputs and outputs of the node (can be done in our editor) and a C++ file containing the implementation. Our code generator will collect the little snippets of C++ code for each node and create a combined function for each graph. No external libraries are used, even for math we call functions in the game engine. The generated graph programs are not linked with anything, so very small and light weight. This also means that the game or the editor don’t need to be recompiled to add a simple node. Nodes and graphs are game assets, which get turned into code automatically by the content pipeline.

Page 133: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Adding Nodes

• Create C++ file with one function

• Create small description file for node

• List inputs and outputs

• Define the default values

I guess by now you can see how this system allowed us to build powerful dynamic sounds, just limited by the set of nodes we have available. But why is it truly extendable? That’s because it’s really easy to create a new node in this system. Basically all you need to do is create an asset describing the inputs and outputs of the node (can be done in our editor) and a C++ file containing the implementation. Our code generator will collect the little snippets of C++ code for each node and create a combined function for each graph. No external libraries are used, even for math we call functions in the game engine. The generated graph programs are not linked with anything, so very small and light weight. This also means that the game or the editor don’t need to be recompiled to add a simple node. Nodes and graphs are game assets, which get turned into code automatically by the content pipeline.

Page 134: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Adding Nodes

• Create C++ file with one function

• Create small description file for node

• List inputs and outputs

• Define the default values

• No need to recompile game, just add assets

I guess by now you can see how this system allowed us to build powerful dynamic sounds, just limited by the set of nodes we have available. But why is it truly extendable? That’s because it’s really easy to create a new node in this system. Basically all you need to do is create an asset describing the inputs and outputs of the node (can be done in our editor) and a C++ file containing the implementation. Our code generator will collect the little snippets of C++ code for each node and create a combined function for each graph. No external libraries are used, even for math we call functions in the game engine. The generated graph programs are not linked with anything, so very small and light weight. This also means that the game or the editor don’t need to be recompiled to add a simple node. Nodes and graphs are game assets, which get turned into code automatically by the content pipeline.

Page 135: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Math exampleConvert semitones to pitch ratio

SemitonesToPitchRatio

inSemiTones outPitchRatio

SemitonesToPitchRatio

inSemiTones outPitchRatio

Andreas: Let's look at an example node for a mathematical problem, the obvious ones like add or multiply are trivial, but here's a useful one, converting from musical semitones to a pitch ratio value. So for instance inputting a value of 12 semitones, would result in a pitch ratio of 2, i.e. an octave.

Page 136: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

void SemitonesToPitchRatio(const float inSemitones, float* outPitchRatio) { *outPitchRatio = Math::Pow(2.0f, inSemitones/12.0f); }

SemiTonesToPitchRatio.cpp

This shows how easy it is to create a new node. The only additional information that needs to be created is a meta data file that describes the input and output values and their default values.

Page 137: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Math exampleConvert semitones to pitch ratio

SemitonesToPitchRatio

inSemiTones outPitchRatio

Page 138: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Logic exampleCompare two values

Compare

inA outGreaterinB outSmaller

outEqual

Here's another simple example for comparison of values. Typically you have different parts that depend on the comparison result, so it's useful to have "smaller" and "greater than" available at the same time. Also saves us from using additional nodes.

Page 139: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

void Compare(const float inA, const float inB, bool* outSmaller, bool* outGreater, bool* outEqual) { *outSmaller = inA < inB; *outGreater = inA > inB; *outEqual = inA == inB; }

Compare.cpp

The implementation is just as simple. All the comparison results are stored in output parameters.

Page 140: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Logic exampleCompare two values

Compare

inA outGreaterinB outSmaller

outEqual

Page 141: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Modulation exampleSine LFO

SineLFO

inFrequency outValueinAmplitudeinOffsetinPhase

This is the sine LFO node, it will output a sine wave at a given frequency and amplitude. This is a slightly more complicated node.

Page 142: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

void SineLFO(const float inFrequency, const float inAmplitude, const float inOffset, const float inPhase, float* outValue, float* phase) { *outValue = inOffset + inAmplitude * Math::Sin((*phase + inPhase) * M_TWO_PI); float new_phase = *phase + inFrequency * GraphSound::GetTimeStep(); if (new_phase > 1.0f) new_phase -= 1.0f; *phase = new_phase; }

SineLFO.cpp

Let's look at how this is implemented. It's using two functions that are implemented in our engine, one for calculating the sine and one for getting the time step. If the game time is scaled (for example if we’re running the game in slow motion), then the sound time-step will also be adjusted. However it's also possible to have sounds that are not affected by this. Normally the graph execution is state less, that means that every time it runs, it does exactly the same, because it doesn't store any information, so it can't depend on previous runs. This node however is an example of something that requires state information, and it's possible to do that on a per node basis. So here you can see that it uses a special “phase” parameter, which is stored separately for each instance of the node, and is passed in by reference as a pointer. The state system allows us to store any arbitrary set of data, for example a full C++ object, or just a simple value like in this example. The Wave node also uses this to store the information about the voices it has created.

Page 143: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

void SineLFO(const float inFrequency, const float inAmplitude, const float inOffset, const float inPhase, float* outValue, float* phase) { *outValue = inOffset + inAmplitude * Math::Sin((*phase + inPhase) * M_TWO_PI); float new_phase = *phase + inFrequency * GraphSound::GetTimeStep(); if (new_phase > 1.0f) new_phase -= 1.0f; *phase = new_phase; }

SineLFO.cpp

Let's look at how this is implemented. It's using two functions that are implemented in our engine, one for calculating the sine and one for getting the time step. If the game time is scaled (for example if we’re running the game in slow motion), then the sound time-step will also be adjusted. However it's also possible to have sounds that are not affected by this. Normally the graph execution is state less, that means that every time it runs, it does exactly the same, because it doesn't store any information, so it can't depend on previous runs. This node however is an example of something that requires state information, and it's possible to do that on a per node basis. So here you can see that it uses a special “phase” parameter, which is stored separately for each instance of the node, and is passed in by reference as a pointer. The state system allows us to store any arbitrary set of data, for example a full C++ object, or just a simple value like in this example. The Wave node also uses this to store the information about the voices it has created.

Page 144: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

void SineLFO(const float inFrequency, const float inAmplitude, const float inOffset, const float inPhase, float* outValue, float* phase) { *outValue = inOffset + inAmplitude * Math::Sin((*phase + inPhase) * M_TWO_PI); float new_phase = *phase + inFrequency * GraphSound::GetTimeStep(); if (new_phase > 1.0f) new_phase -= 1.0f; *phase = new_phase; }

SineLFO.cpp

Let's look at how this is implemented. It's using two functions that are implemented in our engine, one for calculating the sine and one for getting the time step. If the game time is scaled (for example if we’re running the game in slow motion), then the sound time-step will also be adjusted. However it's also possible to have sounds that are not affected by this. Normally the graph execution is state less, that means that every time it runs, it does exactly the same, because it doesn't store any information, so it can't depend on previous runs. This node however is an example of something that requires state information, and it's possible to do that on a per node basis. So here you can see that it uses a special “phase” parameter, which is stored separately for each instance of the node, and is passed in by reference as a pointer. The state system allows us to store any arbitrary set of data, for example a full C++ object, or just a simple value like in this example. The Wave node also uses this to store the information about the voices it has created.

Page 145: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

void SineLFO(const float inFrequency, const float inAmplitude, const float inOffset, const float inPhase, float* outValue, float* phase) { *outValue = inOffset + inAmplitude * Math::Sin((*phase + inPhase) * M_TWO_PI); float new_phase = *phase + inFrequency * GraphSound::GetTimeStep(); if (new_phase > 1.0f) new_phase -= 1.0f; *phase = new_phase; }

SineLFO.cpp

Let's look at how this is implemented. It's using two functions that are implemented in our engine, one for calculating the sine and one for getting the time step. If the game time is scaled (for example if we’re running the game in slow motion), then the sound time-step will also be adjusted. However it's also possible to have sounds that are not affected by this. Normally the graph execution is state less, that means that every time it runs, it does exactly the same, because it doesn't store any information, so it can't depend on previous runs. This node however is an example of something that requires state information, and it's possible to do that on a per node basis. So here you can see that it uses a special “phase” parameter, which is stored separately for each instance of the node, and is passed in by reference as a pointer. The state system allows us to store any arbitrary set of data, for example a full C++ object, or just a simple value like in this example. The Wave node also uses this to store the information about the voices it has created.

Page 146: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Modulation exampleSine LFO

SineLFO

inFrequency outValueinAmplitudeinOffsetinPhase

Page 147: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Nodes built from Graphs

Generate a random pitch within a range of semitones

RandomRangedPitchRatio

inTrigger outPitchRatioinMinSemitoneinMaxSemitone

Certain math or logic processing that starts to happen often in sounds can be abstracted into their own nodes, without having to know any programming. Here’s an example of a node, built from an actual graph.

Page 148: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

As you can see here, it uses a combination of the random range node, to get a random semitone value, which it then converts to a pitch ratio. It also uses the sample&hold node to make sure the value doesn’t change, as normally the random value would be recalculated at every update of the sound, i.e. once every 5.333ms. Creating a node like this is basically as simple as selecting a group of nodes, then right-clicking and selecting “Collapse nodes”. The editor will do the rest.

Page 149: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

As you can see here, it uses a combination of the random range node, to get a random semitone value, which it then converts to a pitch ratio. It also uses the sample&hold node to make sure the value doesn’t change, as normally the random value would be recalculated at every update of the sound, i.e. once every 5.333ms. Creating a node like this is basically as simple as selecting a group of nodes, then right-clicking and selecting “Collapse nodes”. The editor will do the rest.

Page 150: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

As you can see here, it uses a combination of the random range node, to get a random semitone value, which it then converts to a pitch ratio. It also uses the sample&hold node to make sure the value doesn’t change, as normally the random value would be recalculated at every update of the sound, i.e. once every 5.333ms. Creating a node like this is basically as simple as selecting a group of nodes, then right-clicking and selecting “Collapse nodes”. The editor will do the rest.

Page 151: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

As you can see here, it uses a combination of the random range node, to get a random semitone value, which it then converts to a pitch ratio. It also uses the sample&hold node to make sure the value doesn’t change, as normally the random value would be recalculated at every update of the sound, i.e. once every 5.333ms. Creating a node like this is basically as simple as selecting a group of nodes, then right-clicking and selecting “Collapse nodes”. The editor will do the rest.

Page 152: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Nodes built from Graphs

Generate a random pitch within a range of semitones

RandomRangedPitchRatio

inTrigger outPitchRatioinMinSemitoneinMaxSemitone

Page 153: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

When you notice repeated work…

Page 154: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

When you notice repeated work…

…abstract it!

Page 155: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

When you notice repeated work…

…abstract it!

Page 156: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

When you notice repeated work…

…abstract it!

Page 157: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Inputs

StartChanceToPlay

Page 158: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Inputs

StartChanceToPlay

Delay

inEventinTime

outEvent0.05

Page 159: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Inputs

StartChanceToPlay

Random

inRange100

CompareinA outGreaterinB outSmaller

outEqual OR

Delay

inEventinTime

outEvent0.05

Page 160: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Inputs

StartChanceToPlay

Random

inRange100

CompareinA outGreaterinB outSmaller

outEqual OR

Delay

inEventinTime

outEvent0.05

Wave

inAzimuth

inStartinWave

AND

Page 161: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Inputs

StartChanceToPlay

Random

inRange100

CompareinA outGreaterinB outSmaller

outEqual OR

Delay

inEventinTime

outEvent0.05

Wave

inAzimuth

inStartinWave

AND

SelectRandom

Wave

Page 162: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Inputs

StartChanceToPlay

Random

inRange100

CompareinA outGreaterinB outSmaller

outEqual OR

Delay

inEventinTime

outEvent0.05

Wave

inAzimuth

inStartinWave

AND

Random

inRange150

Ramp

inTrigger outValueinStartValueinTargetValue

0Select

RandomWave

Page 163: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Experimenting Should Be Safe and Fun

Page 164: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Experimenting Should Be Safe and Fun

• If your idea cannot fail, you’re not going to go to uncharted territory.

Page 165: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Experimenting Should Be Safe and Fun

• If your idea cannot fail, you’re not going to go to uncharted territory.

• We tried a lot

Page 166: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Experimenting Should Be Safe and Fun

• If your idea cannot fail, you’re not going to go to uncharted territory.

• We tried a lot

• Some of it worked, some didn’t

Page 167: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Experimenting Should Be Safe and Fun

• If your idea cannot fail, you’re not going to go to uncharted territory.

• We tried a lot

• Some of it worked, some didn’t

• Little or no code support - all in audio design

Page 168: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Examples

Page 169: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Fire Rate Variation

Page 170: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Fire Rate Variation

• Experiment: How to make battle sound more interesting

Page 171: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Fire Rate Variation

• Experiment: How to make battle sound more interesting

Page 172: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Fire Rate Variation

• Experiment: How to make battle sound more interesting

Page 173: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Fire Rate Variation

• Experiment: How to make battle sound more interesting

• Idea: Slight variation in fire rate

Page 174: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Fire Rate Variation

• Experiment: How to make battle sound more interesting

• Idea: Slight variation in fire rate

Page 175: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

What the Mind Hears, …

Page 176: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

What the Mind Hears, …

Page 177: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

What the Mind Hears, …

• Experiment: Birds should react when you fire gun

Page 178: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

What the Mind Hears, …

• Experiment: Birds should react when you fire gun

• Birds exist as sound only

Page 179: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

What the Mind Hears, …

• Experiment: Birds should react when you fire gun

• Birds exist as sound only

• Use sound-to-sound messaging system

Page 180: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

What the Mind Hears, …

• Experiment: Birds should react when you fire gun

• Birds exist as sound only

• Use sound-to-sound messaging system

• Gun sounds notify bird sounds of shot

Page 181: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Bird Sound Logic

Not Shooting Play “Bird Loop”FALSE

GunFireStateGun Sound Bird Sound

Page 182: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Bird Sound Logic

Shooting Play “Bird Loop”FALSE

GunFireStateGun Sound Bird Sound

Page 183: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Bird Sound Logic

Shooting Play “Bird Loop”TRUE

GunFireStateGun Sound Bird Sound

set

Page 184: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Bird Sound Logic

Shooting Play “Bird Loop”TRUE

GunFireStateGun Sound Bird Sound

set get

Page 185: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Play“Birds Flying Off”

!Wait 30 seconds

Bird Sound Logic

Shooting TRUE

GunFireStateGun Sound Bird Sound

set get

Page 186: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Play“Birds Flying Off”

!Wait 30 seconds

Bird Sound Logic

Not Shooting TRUE

GunFireStateGun Sound Bird Sound

set get

Page 187: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Play“Birds Flying Off”

!Wait 30 seconds

Bird Sound Logic

Not Shooting

GunFireStateGun Sound Bird Sound

set getFALSE

Page 188: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Play “Bird Loop”

Bird Sound Logic

Not Shooting

GunFireStateGun Sound Bird Sound

set getFALSE

Page 189: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Play “Bird Loop”

Bird Sound Logic

Not Shooting

GunFireStateGun Sound Bird Sound

set getFALSE

Any sound can send a message which can be received by any other sound

Page 190: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Material Dependent Environmental Reactions (MADDER)

Page 191: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Material Dependent Environmental Reactions (MADDER)

• Inspiration: Guns have this explosive force in the worldwhen they’re fired

Page 192: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Material Dependent Environmental Reactions (MADDER)

• Inspiration: Guns have this explosive force in the worldwhen they’re fired

• Things that are near start to rattle

Page 193: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

See http://www.youtube.com/watch?v=nMkiDguYtGw

Page 194: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

See http://www.youtube.com/watch?v=nMkiDguYtGw

Page 195: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

See http://www.youtube.com/watch?v=nMkiDguYtGw

Page 196: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

MADDER

Page 197: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

MADDER

• Inputs required:

Page 198: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

MADDER

• Inputs required:

• Distance to closest surface

Page 199: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

MADDER

• Inputs required:

• Distance to closest surface

• Direction of closest surface

Page 200: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

MADDER

• Inputs required:

• Distance to closest surface

• Direction of closest surface

• Material of closest surface

Page 201: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

MADDER raycast

Listener

Page 202: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

MADDER raycast

• Sweeping raycast around listener

Listener

Page 203: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

MADDER raycast

• Sweeping raycast around listener

Listener

Page 204: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

MADDER raycast

• Sweeping raycast around listener

• After one revolution, closest hit point is used Listener

Page 205: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

MADDER raycast

• Sweeping raycast around listener

• After one revolution, closest hit point is used

• Distance, angle and material is passed to sound

Distance

}Angle

Material

Listener

Page 206: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Inputs

on_startinIsFirstPersoninWallDistance

inWallAngleinWallMaterial

Page 207: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Inputs

on_startinIsFirstPersoninWallDistance

inWallAngleinWallMaterial

FirstPerson

inStartAND

Page 208: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Inputs

on_startinIsFirstPersoninWallDistance

inWallAngleinWallMaterial

FirstPerson

inStartAND

ThirdPerson

inStartNOT

Page 209: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Inputs

on_startinIsFirstPersoninWallDistance

inWallAngleinWallMaterial

FirstPerson

inStartAND

ThirdPerson

inStartNOT

MADDER

inWallDistancePitchModifier

inWallAngleinWallMaterial

StartSpeedOfSound

MaterialSamplesIsSilencedGunIsBigGun

3301.0

FalseFalse

Page 210: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Inputs

on_startinIsFirstPersoninWallDistance

inWallAngleinWallMaterial

FirstPerson

inStartAND

ThirdPerson

inStartNOT

MADDER

inWallDistancePitchModifier

inWallAngleinWallMaterial

StartSpeedOfSound

MaterialSamplesIsSilencedGunIsBigGun

3301.0

FalseFalse

Page 211: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Inputs

on_startinIsFirstPersoninWallDistance

inWallAngleinWallMaterial

FirstPerson

inStartAND

ThirdPerson

inStartNOT

MADDERContentPackage

MADDER

inWallDistancePitchModifier

inWallAngleinWallMaterial

StartSpeedOfSound

MaterialSamplesIsSilencedGunIsBigGun

3301.0

FalseFalse

Page 212: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Inputs

StartSpeedOfSound

PitchModifierFiringRate

inWallDistanceinWallAngle

inWallMaterialMaterialSamples

IsSilencedGunIsBigGun

Page 213: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Inputs

StartSpeedOfSound

PitchModifierFiringRate

inWallDistanceinWallAngle

inWallMaterialMaterialSamples

IsSilencedGunIsBigGun

DelayUnit

Page 214: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Inputs

StartSpeedOfSound

PitchModifierFiringRate

inWallDistanceinWallAngle

inWallMaterialMaterialSamples

IsSilencedGunIsBigGun

VoiceSelector

DelayUnit

Page 215: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

4x

Inputs

StartSpeedOfSound

PitchModifierFiringRate

inWallDistanceinWallAngle

inWallMaterialMaterialSamples

IsSilencedGunIsBigGun

VoiceSelector

DelayUnit

Page 216: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

4x

Wave

inAzimuthinPitchRatio

inDryGaininWetGain

inStartinWave

Inputs

StartSpeedOfSound

PitchModifierFiringRate

inWallDistanceinWallAngle

inWallMaterialMaterialSamples

IsSilencedGunIsBigGun

VoiceSelector

DelayUnit

Page 217: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

4x

Wave

inAzimuthinPitchRatio

inDryGaininWetGain

inStartinWave

Inputs

StartSpeedOfSound

PitchModifierFiringRate

inWallDistanceinWallAngle

inWallMaterialMaterialSamples

IsSilencedGunIsBigGun

VoiceSelector

DelayUnit

Page 218: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

4x

Wave

inAzimuthinPitchRatio

inDryGaininWetGain

inStartinWave

Inputs

StartSpeedOfSound

PitchModifierFiringRate

inWallDistanceinWallAngle

inWallMaterialMaterialSamples

IsSilencedGunIsBigGun

VoiceSelector

DelayUnit

Page 219: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

4x

Wave

inAzimuthinPitchRatio

inDryGaininWetGain

inStartinWave

SelectSample

inMaterial outWaveinMaterialSamples

Inputs

StartSpeedOfSound

PitchModifierFiringRate

inWallDistanceinWallAngle

inWallMaterialMaterialSamples

IsSilencedGunIsBigGun

VoiceSelector

DelayUnit

Page 220: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

4x

Wave

inAzimuthinPitchRatio

inDryGaininWetGain

inStartinWave

SelectSample

inMaterial outWaveinMaterialSamples

Inputs

StartSpeedOfSound

PitchModifierFiringRate

inWallDistanceinWallAngle

inWallMaterialMaterialSamples

IsSilencedGunIsBigGun

FalloffUnit

VoiceSelector

DelayUnit

Page 221: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Video showing MADDER effect for 4 different materials

Page 222: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Video showing MADDER effect for 4 different materials

Page 223: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

MADDER Prototype

Video showing initial MADDER prototype with 4 different materials in scene.

Page 224: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

MADDER Prototype

Video showing initial MADDER prototype with 4 different materials in scene.

Page 225: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

MADDER Four-angle raycast

Page 226: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

-45° +45°

-135° +135°

MADDER Four-angle raycast

• Divide in four quadrantsaround listener

Page 227: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

-45° +45°

-135° +135°

MADDER Four-angle raycast

• Divide in four quadrantsaround listener

• One sweeping raycastin each quadrant

Page 228: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

-45° +45°

-135° +135°

MADDER Four-angle raycast

• Divide in four quadrantsaround listener

• One sweeping raycastin each quadrant

• Closest hit point ineach quadrant is taken

Page 229: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Inputs

inWallDistanceFrontinWallAngleFront

inWallMaterialFrontinWallDistanceRight

inWallAngleRightinWallMaterialRight

inWallDistanceBackinWallAngleBack

inWallMaterialBackinWallDistanceLeft

inWallAngleLeftinWallMaterialLeft

Page 230: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Inputs

inWallDistanceFrontinWallAngleFront

inWallMaterialFrontinWallDistanceRight

inWallAngleRightinWallMaterialRight

inWallDistanceBackinWallAngleBack

inWallMaterialBackinWallDistanceLeft

inWallAngleLeftinWallMaterialLeft

MADDERinWallDistanceinWallAngleinWallMaterial

Page 231: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Inputs

inWallDistanceFrontinWallAngleFront

inWallMaterialFrontinWallDistanceRight

inWallAngleRightinWallMaterialRight

inWallDistanceBackinWallAngleBack

inWallMaterialBackinWallDistanceLeft

inWallAngleLeftinWallMaterialLeft

MADDERinWallDistanceinWallAngleinWallMaterial

MADDERinWallDistanceinWallAngleinWallMaterial

Page 232: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Inputs

inWallDistanceFrontinWallAngleFront

inWallMaterialFrontinWallDistanceRight

inWallAngleRightinWallMaterialRight

inWallDistanceBackinWallAngleBack

inWallMaterialBackinWallDistanceLeft

inWallAngleLeftinWallMaterialLeft

MADDERinWallDistanceinWallAngleinWallMaterial

MADDERinWallDistanceinWallAngleinWallMaterial

MADDERinWallDistanceinWallAngleinWallMaterial

Page 233: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Inputs

inWallDistanceFrontinWallAngleFront

inWallMaterialFrontinWallDistanceRight

inWallAngleRightinWallMaterialRight

inWallDistanceBackinWallAngleBack

inWallMaterialBackinWallDistanceLeft

inWallAngleLeftinWallMaterialLeft

MADDERinWallDistanceinWallAngleinWallMaterial

MADDERinWallDistanceinWallAngleinWallMaterial

MADDERinWallDistanceinWallAngleinWallMaterial

MADDERinWallDistanceinWallAngleinWallMaterial

Page 234: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Four-angle MADDER

Video showing final 4-angle MADDER with 4 materials placed in the scene

Page 235: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Four-angle MADDER

Video showing final 4-angle MADDER with 4 materials placed in the scene

Page 236: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

MADDER video (30 seconds)

MADDER off

Capture from final game with MADDER disabled

Page 237: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

MADDER video (30 seconds)

MADDER off

Capture from final game with MADDER disabled

Page 238: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

MADDER on

Capture from final game with MADDER enabled

Page 239: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

MADDER on

Capture from final game with MADDER enabled

Page 240: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Creative Workflow

Page 241: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Creative Workflow

IDEA Coder GAMESound Designer DONE

Page 242: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Creative Workflow

IDEA

Coder

GAMESound Designer DONE

Page 243: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Gun Tails

Page 244: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Gun Tails

• Experiment with existing data

Page 245: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Gun Tails

• Experiment with existing data

• Wall raycast

Page 246: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Gun Tails

• Experiment with existing data

• Wall raycast

• Inside/Outside

Page 247: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Gun Tails

• Experiment with existing data

• Wall raycast

• Inside/Outside

• Rounds Fired

Page 248: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Gun Tails

• Experiment with existing data

• Wall raycast

• Inside/Outside

• Rounds Fired

Page 249: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Gun Tails

• Experiment with existing data

• Wall raycast

• Inside/Outside

• Rounds Fired

Page 250: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Gun Tails

• Experiment with existing data

• Wall raycast

• Inside/Outside

• Rounds Fired

Page 251: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

How to Debug?

What kind of debugging support did we have? Obviously a sound designer is creating much more complex logic now, and that means bugs will creep in. We need to be able to find problems such as incorrect behaviour quickly.

Page 252: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Manually Placed Debug Probes

SineLFO

inFrequency outValueinAmplitudeinOffsetinPhase

0.50.5

10.0

Anton: These are placed by designers into their sounds, to query individual outputs of nodes. The values are shown as a curve on screen, useful for debugging a single value and how it changes over time. Not very useful for quickly changing things, such as boolean events. Since the sound graphs execute multiple times per game frame, but the debug visualisation is only drawn at the game frame rate, a quick change can be missed. In the final version of the game, these nodes are completely ignored. !Screenshot!

Page 253: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Manually Placed Debug Probes

SineLFO

inFrequency outValueinAmplitudeinOffsetinPhase

DebugProbe

inDebugNameinDebugValue

sine0.50.5

10.0

Anton: These are placed by designers into their sounds, to query individual outputs of nodes. The values are shown as a curve on screen, useful for debugging a single value and how it changes over time. Not very useful for quickly changing things, such as boolean events. Since the sound graphs execute multiple times per game frame, but the debug visualisation is only drawn at the game frame rate, a quick change can be missed. In the final version of the game, these nodes are completely ignored. !Screenshot!

Page 254: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Manually Placed Debug Probes

• Just connect any output to visualize it

SineLFO

inFrequency outValueinAmplitudeinOffsetinPhase

DebugProbe

inDebugNameinDebugValue

sine0.50.5

10.0

Anton: These are placed by designers into their sounds, to query individual outputs of nodes. The values are shown as a curve on screen, useful for debugging a single value and how it changes over time. Not very useful for quickly changing things, such as boolean events. Since the sound graphs execute multiple times per game frame, but the debug visualisation is only drawn at the game frame rate, a quick change can be missed. In the final version of the game, these nodes are completely ignored. !Screenshot!

Page 255: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Manually Placed Debug Probes

• Just connect any output to visualize it• Shows debug value on game screen

SineLFO

inFrequency outValueinAmplitudeinOffsetinPhase

DebugProbe

inDebugNameinDebugValue

sine0.50.5

10.0

Anton: These are placed by designers into their sounds, to query individual outputs of nodes. The values are shown as a curve on screen, useful for debugging a single value and how it changes over time. Not very useful for quickly changing things, such as boolean events. Since the sound graphs execute multiple times per game frame, but the debug visualisation is only drawn at the game frame rate, a quick change can be missed. In the final version of the game, these nodes are completely ignored. !Screenshot!

Page 256: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Manually Placed Debug Probes

Page 257: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Can miss quick changes because game frame rate is lower than sound update rate!

Manually Placed Debug Probes

Page 258: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Automatically Embedded Debug Probes

EvaluateCurve(CurveDataPointer, inDistanceToListener, &outYValue); DEBUG_PROBE(0, (void*)&outYValue)

Andreas: Each graph is generated in two versions, one without debugging code (for final game) and one with automatically generated debug probe code for every node. We emit these DEBUG_PROBE macros into the graph functions, so we can easily disable the debug support at compile time. When executing a graph with debugging enabled, the code in the macro collects the values of the inputs and outputs of every node (and of the graph itself) and passes them to the engine, which stores the information. !

Page 259: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Automatically Embedded Debug Probes

EvaluateCurve(CurveDataPointer, inDistanceToListener, &outYValue); DEBUG_PROBE(0, (void*)&outYValue)

Andreas: Each graph is generated in two versions, one without debugging code (for final game) and one with automatically generated debug probe code for every node. We emit these DEBUG_PROBE macros into the graph functions, so we can easily disable the debug support at compile time. When executing a graph with debugging enabled, the code in the macro collects the values of the inputs and outputs of every node (and of the graph itself) and passes them to the engine, which stores the information. !

Page 260: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Automatically Embedded Debug Probes

EvaluateCurve(CurveDataPointer, inDistanceToListener, &outYValue); DEBUG_PROBE(0, (void*)&outYValue)

• All values are recorded, nothing is lost

Andreas: Each graph is generated in two versions, one without debugging code (for final game) and one with automatically generated debug probe code for every node. We emit these DEBUG_PROBE macros into the graph functions, so we can easily disable the debug support at compile time. When executing a graph with debugging enabled, the code in the macro collects the values of the inputs and outputs of every node (and of the graph itself) and passes them to the engine, which stores the information. !

Page 261: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Automatically Embedded Debug Probes

EvaluateCurve(CurveDataPointer, inDistanceToListener, &outYValue); DEBUG_PROBE(0, (void*)&outYValue)

• All values are recorded, nothing is lost• Simple in-game debugger to show data

Andreas: Each graph is generated in two versions, one without debugging code (for final game) and one with automatically generated debug probe code for every node. We emit these DEBUG_PROBE macros into the graph functions, so we can easily disable the debug support at compile time. When executing a graph with debugging enabled, the code in the macro collects the values of the inputs and outputs of every node (and of the graph itself) and passes them to the engine, which stores the information. !

Page 262: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Automatically Embedded Debug Probes

EvaluateCurve(CurveDataPointer, inDistanceToListener, &outYValue); DEBUG_PROBE(0, (void*)&outYValue)

• All values are recorded, nothing is lost• Simple in-game debugger to show data• Scrub through recording

Andreas: Each graph is generated in two versions, one without debugging code (for final game) and one with automatically generated debug probe code for every node. We emit these DEBUG_PROBE macros into the graph functions, so we can easily disable the debug support at compile time. When executing a graph with debugging enabled, the code in the macro collects the values of the inputs and outputs of every node (and of the graph itself) and passes them to the engine, which stores the information. !

Page 263: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Post Mortem

So what when wrong and what went right?

Page 264: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Timeline

Andreas: We started working on PS4 technology very early, many parts of the PS4 hardware were still undefined when we started. At one point we even expected the hardware to do more than decoding, i.e. we assumed that there might be a way of executing our own DSP code on it. We thought we might have to write custom DSP code for that chip. At that time there were no middleware vendors disclosed yet, so we just couldn’t really talk to them about any of this. We therefore had to play it safe, so we designed the new sound system around an abstract synth. We’ve created an initial prototype implementation, for use in our PC build. Later on we’ve switched to PS4 hardware. Anton: become used to being alpha tester for hardware as a designer. became good audio tester. Other designers hardly noticed the transition from PC to PS4 hardware, as the synth was the same on both.

Page 265: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Timeline

February 2011 Pre-production begins, hardly any PS4 hardware details yet

Andreas: We started working on PS4 technology very early, many parts of the PS4 hardware were still undefined when we started. At one point we even expected the hardware to do more than decoding, i.e. we assumed that there might be a way of executing our own DSP code on it. We thought we might have to write custom DSP code for that chip. At that time there were no middleware vendors disclosed yet, so we just couldn’t really talk to them about any of this. We therefore had to play it safe, so we designed the new sound system around an abstract synth. We’ve created an initial prototype implementation, for use in our PC build. Later on we’ve switched to PS4 hardware. Anton: become used to being alpha tester for hardware as a designer. became good audio tester. Other designers hardly noticed the transition from PC to PS4 hardware, as the synth was the same on both.

Page 266: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Timeline

February 2011 Pre-production begins, hardly any PS4 hardware details yetNovember 2011 PC prototype of sound engine

Andreas: We started working on PS4 technology very early, many parts of the PS4 hardware were still undefined when we started. At one point we even expected the hardware to do more than decoding, i.e. we assumed that there might be a way of executing our own DSP code on it. We thought we might have to write custom DSP code for that chip. At that time there were no middleware vendors disclosed yet, so we just couldn’t really talk to them about any of this. We therefore had to play it safe, so we designed the new sound system around an abstract synth. We’ve created an initial prototype implementation, for use in our PC build. Later on we’ve switched to PS4 hardware. Anton: become used to being alpha tester for hardware as a designer. became good audio tester. Other designers hardly noticed the transition from PC to PS4 hardware, as the synth was the same on both.

Page 267: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Timeline

February 2011 Pre-production begins, hardly any PS4 hardware details yetNovember 2011 PC prototype of sound engine

August 2012 Moved over to PS4 hardware

Andreas: We started working on PS4 technology very early, many parts of the PS4 hardware were still undefined when we started. At one point we even expected the hardware to do more than decoding, i.e. we assumed that there might be a way of executing our own DSP code on it. We thought we might have to write custom DSP code for that chip. At that time there were no middleware vendors disclosed yet, so we just couldn’t really talk to them about any of this. We therefore had to play it safe, so we designed the new sound system around an abstract synth. We’ve created an initial prototype implementation, for use in our PC build. Later on we’ve switched to PS4 hardware. Anton: become used to being alpha tester for hardware as a designer. became good audio tester. Other designers hardly noticed the transition from PC to PS4 hardware, as the synth was the same on both.

Page 268: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Timeline

February 2011 Pre-production begins, hardly any PS4 hardware details yetNovember 2011 PC prototype of sound engine

August 2012 Moved over to PS4 hardwareFebruary 2013 PS4 announcement demo (still using software codecs)

Andreas: We started working on PS4 technology very early, many parts of the PS4 hardware were still undefined when we started. At one point we even expected the hardware to do more than decoding, i.e. we assumed that there might be a way of executing our own DSP code on it. We thought we might have to write custom DSP code for that chip. At that time there were no middleware vendors disclosed yet, so we just couldn’t really talk to them about any of this. We therefore had to play it safe, so we designed the new sound system around an abstract synth. We’ve created an initial prototype implementation, for use in our PC build. Later on we’ve switched to PS4 hardware. Anton: become used to being alpha tester for hardware as a designer. became good audio tester. Other designers hardly noticed the transition from PC to PS4 hardware, as the synth was the same on both.

Page 269: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Timeline

February 2011 Pre-production begins, hardly any PS4 hardware details yetNovember 2011 PC prototype of sound engine

August 2012 Moved over to PS4 hardwareFebruary 2013 PS4 announcement demo (still using software codecs)

June 2013 E3 demo (now using ACP hardware decoding)

Andreas: We started working on PS4 technology very early, many parts of the PS4 hardware were still undefined when we started. At one point we even expected the hardware to do more than decoding, i.e. we assumed that there might be a way of executing our own DSP code on it. We thought we might have to write custom DSP code for that chip. At that time there were no middleware vendors disclosed yet, so we just couldn’t really talk to them about any of this. We therefore had to play it safe, so we designed the new sound system around an abstract synth. We’ve created an initial prototype implementation, for use in our PC build. Later on we’ve switched to PS4 hardware. Anton: become used to being alpha tester for hardware as a designer. became good audio tester. Other designers hardly noticed the transition from PC to PS4 hardware, as the synth was the same on both.

Page 270: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Timeline

February 2011 Pre-production begins, hardly any PS4 hardware details yetNovember 2011 PC prototype of sound engine

August 2012 Moved over to PS4 hardwareFebruary 2013 PS4 announcement demo (still using software codecs)

June 2013 E3 demo (now using ACP hardware decoding)November 2013 Shipped as launch title

Andreas: We started working on PS4 technology very early, many parts of the PS4 hardware were still undefined when we started. At one point we even expected the hardware to do more than decoding, i.e. we assumed that there might be a way of executing our own DSP code on it. We thought we might have to write custom DSP code for that chip. At that time there were no middleware vendors disclosed yet, so we just couldn’t really talk to them about any of this. We therefore had to play it safe, so we designed the new sound system around an abstract synth. We’ve created an initial prototype implementation, for use in our PC build. Later on we’ve switched to PS4 hardware. Anton: become used to being alpha tester for hardware as a designer. became good audio tester. Other designers hardly noticed the transition from PC to PS4 hardware, as the synth was the same on both.

Page 271: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Timeline

February 2011 Pre-production begins, hardly any PS4 hardware details yetNovember 2011 PC prototype of sound engine

August 2012 Moved over to PS4 hardwareFebruary 2013 PS4 announcement demo (still using software codecs)

June 2013 E3 demo (now using ACP hardware decoding)November 2013 Shipped as launch title

New system was up and running within 6 months!

Andreas: We started working on PS4 technology very early, many parts of the PS4 hardware were still undefined when we started. At one point we even expected the hardware to do more than decoding, i.e. we assumed that there might be a way of executing our own DSP code on it. We thought we might have to write custom DSP code for that chip. At that time there were no middleware vendors disclosed yet, so we just couldn’t really talk to them about any of this. We therefore had to play it safe, so we designed the new sound system around an abstract synth. We’ve created an initial prototype implementation, for use in our PC build. Later on we’ve switched to PS4 hardware. Anton: become used to being alpha tester for hardware as a designer. became good audio tester. Other designers hardly noticed the transition from PC to PS4 hardware, as the synth was the same on both.

Page 272: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

“You’re making sound designers do programming work, that’ll be a disaster!

The game will crash all the time!”

This didn't really happen. We had a few buggy nodes, but in general, things worked out fine. What we did is to make sure that if new nodes are peer-reviewed like any other code, especially if it’s written by a non-programmer. Also since nodes are so simple and limited in their scope, it’s hard to make something that truly breaks the game.

Page 273: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

“This is an unproven idea, why don’t we just use some middleware solution?”

There were doubts that we can create new tech and a toolset with a user friendly workflow in time. The safer thing would’ve been to license a middleware solution, but at the time we had to make this decision, no 3rd parties were disclosed about PS4 yet, and we couldn’t be sure if they will properly support the PS4 audio hardware. Also we were keen on having a solution that’s integrated with our normal asset pipeline, which allowed us to share the tech built for audio with other disciplines. Sound designers using the same workflow as artists and game designers is a benefit that middleware can't give us. New nodes created by e.g. game programmers are immediately useful for sound designers, and vice versa. All of these reasons led us to push forward with our own tech, to make something that really fits the game and our way of working. !Anton: Also we wouldn’t have been able to do the kind of deep tool integration that we have now.

Page 274: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Used by other Disciplines

The fact that the graph system was available in the editor that the whole studio is using meant that it was directly available to all other disciplines.

Page 275: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Used by other Disciplines

• Graph system became popular

The fact that the graph system was available in the editor that the whole studio is using meant that it was directly available to all other disciplines.

Page 276: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Used by other Disciplines

• Graph system became popular

• Used for procedural rigging

The fact that the graph system was available in the editor that the whole studio is using meant that it was directly available to all other disciplines.

Page 277: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Used by other Disciplines

• Graph system became popular

• Used for procedural rigging

• Used for gameplay behavior

The fact that the graph system was available in the editor that the whole studio is using meant that it was directly available to all other disciplines.

Page 278: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Used by other Disciplines

• Graph system became popular

• Used for procedural rigging

• Used for gameplay behavior

• More nodes were added

The fact that the graph system was available in the editor that the whole studio is using meant that it was directly available to all other disciplines.

Page 279: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Used by other Disciplines

• Graph system became popular

• Used for procedural rigging

• Used for gameplay behavior

• More nodes were added

• Bugs were fixed quicker

The fact that the graph system was available in the editor that the whole studio is using meant that it was directly available to all other disciplines.

Page 280: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Compression Codecs

A little bit more information to show were we came from: On PS3 most sounds were ADPCM, a few were PCM, only streaming sounds used MP3 with various bit rates. We had about 20 MB budgeted for in-memory samples. This generation we ended up using a combination of PCM and MP3 for in-memory sounds, with a total of about 300MB of memory used at run-time, that's roughly 16x as much as on PS3, but still the same percentage of the whole memory (roughly 4%). We didn't use any ADPCM samples anymore (good riddance). The split between PCM and MP3 is roughly 50:50. We used PCM for anything that needs to loop or seek with sample accuracy, and MP3 for larger sounds that don’t require precise timing, such as the tails of guns, for example. Obviously we relied on the audio coprocessor of the PS4 to decode our MP3 data. We’ve used ATRAC9 for surround streams, but those are not in-memory.

Page 281: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Compression CodecsKZ3 (PS3) samples

PCM

ADPCM

MP3

0 2500 5000 7500 10000

~20 MB for in-memory samples

A little bit more information to show were we came from: On PS3 most sounds were ADPCM, a few were PCM, only streaming sounds used MP3 with various bit rates. We had about 20 MB budgeted for in-memory samples. This generation we ended up using a combination of PCM and MP3 for in-memory sounds, with a total of about 300MB of memory used at run-time, that's roughly 16x as much as on PS3, but still the same percentage of the whole memory (roughly 4%). We didn't use any ADPCM samples anymore (good riddance). The split between PCM and MP3 is roughly 50:50. We used PCM for anything that needs to loop or seek with sample accuracy, and MP3 for larger sounds that don’t require precise timing, such as the tails of guns, for example. Obviously we relied on the audio coprocessor of the PS4 to decode our MP3 data. We’ve used ATRAC9 for surround streams, but those are not in-memory.

Page 282: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Compression CodecsKZ3 (PS3) samples

PCM

ADPCM

MP3

0 2500 5000 7500 10000

KZSF (PS4) samples

PCM

ADPCM

MP3

0 2500 5000 7500 10000

~20 MB for in-memory samples ~300 MB for in-memory samples

A little bit more information to show were we came from: On PS3 most sounds were ADPCM, a few were PCM, only streaming sounds used MP3 with various bit rates. We had about 20 MB budgeted for in-memory samples. This generation we ended up using a combination of PCM and MP3 for in-memory sounds, with a total of about 300MB of memory used at run-time, that's roughly 16x as much as on PS3, but still the same percentage of the whole memory (roughly 4%). We didn't use any ADPCM samples anymore (good riddance). The split between PCM and MP3 is roughly 50:50. We used PCM for anything that needs to loop or seek with sample accuracy, and MP3 for larger sounds that don’t require precise timing, such as the tails of guns, for example. Obviously we relied on the audio coprocessor of the PS4 to decode our MP3 data. We’ve used ATRAC9 for surround streams, but those are not in-memory.

Page 283: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Compression CodecsKZ3 (PS3) samples

PCM

ADPCM

MP3

0 2500 5000 7500 10000

KZSF (PS4) samples

PCM

ADPCM

MP3

0 2500 5000 7500 10000

Need low latency

~20 MB for in-memory samples ~300 MB for in-memory samples

A little bit more information to show were we came from: On PS3 most sounds were ADPCM, a few were PCM, only streaming sounds used MP3 with various bit rates. We had about 20 MB budgeted for in-memory samples. This generation we ended up using a combination of PCM and MP3 for in-memory sounds, with a total of about 300MB of memory used at run-time, that's roughly 16x as much as on PS3, but still the same percentage of the whole memory (roughly 4%). We didn't use any ADPCM samples anymore (good riddance). The split between PCM and MP3 is roughly 50:50. We used PCM for anything that needs to loop or seek with sample accuracy, and MP3 for larger sounds that don’t require precise timing, such as the tails of guns, for example. Obviously we relied on the audio coprocessor of the PS4 to decode our MP3 data. We’ve used ATRAC9 for surround streams, but those are not in-memory.

Page 284: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Compression CodecsKZ3 (PS3) samples

PCM

ADPCM

MP3

0 2500 5000 7500 10000

KZSF (PS4) samples

PCM

ADPCM

MP3

0 2500 5000 7500 10000

Large, don’t need precise timing

Need low latency

~20 MB for in-memory samples ~300 MB for in-memory samples

A little bit more information to show were we came from: On PS3 most sounds were ADPCM, a few were PCM, only streaming sounds used MP3 with various bit rates. We had about 20 MB budgeted for in-memory samples. This generation we ended up using a combination of PCM and MP3 for in-memory sounds, with a total of about 300MB of memory used at run-time, that's roughly 16x as much as on PS3, but still the same percentage of the whole memory (roughly 4%). We didn't use any ADPCM samples anymore (good riddance). The split between PCM and MP3 is roughly 50:50. We used PCM for anything that needs to loop or seek with sample accuracy, and MP3 for larger sounds that don’t require precise timing, such as the tails of guns, for example. Obviously we relied on the audio coprocessor of the PS4 to decode our MP3 data. We’ve used ATRAC9 for surround streams, but those are not in-memory.

Page 285: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Compression CodecsKZ3 (PS3) samples

PCM

ADPCM

MP3

0 2500 5000 7500 10000

KZSF (PS4) samples

PCM

ADPCM

MP3

0 2500 5000 7500 10000

We’ve completely stopped using ADPCM (VAG) !

Large, don’t need precise timing

Need low latency

~20 MB for in-memory samples ~300 MB for in-memory samples

A little bit more information to show were we came from: On PS3 most sounds were ADPCM, a few were PCM, only streaming sounds used MP3 with various bit rates. We had about 20 MB budgeted for in-memory samples. This generation we ended up using a combination of PCM and MP3 for in-memory sounds, with a total of about 300MB of memory used at run-time, that's roughly 16x as much as on PS3, but still the same percentage of the whole memory (roughly 4%). We didn't use any ADPCM samples anymore (good riddance). The split between PCM and MP3 is roughly 50:50. We used PCM for anything that needs to loop or seek with sample accuracy, and MP3 for larger sounds that don’t require precise timing, such as the tails of guns, for example. Obviously we relied on the audio coprocessor of the PS4 to decode our MP3 data. We’ve used ATRAC9 for surround streams, but those are not in-memory.

Page 286: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Sample Rates on PS3

We had a wide variety of sample rates on the PS3, because it was the main parameter we used to optimize memory usage of sounds. This led to some very low quality samples in the game. On the PS4 we only used samples with 48kHz rate. The main way to optimize was to switch them to MP3 encoding and adjust the bit rate.

Page 287: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Sample Rates on PS3

0

175

350

525

700

4000 7000 11000 12500 15500 17000 19500 22050 25000 28000 31000 33075 36000 39000 48000

We had a wide variety of sample rates on the PS3, because it was the main parameter we used to optimize memory usage of sounds. This led to some very low quality samples in the game. On the PS4 we only used samples with 48kHz rate. The main way to optimize was to switch them to MP3 encoding and adjust the bit rate.

Page 288: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Sample Rates on PS3

0

175

350

525

700

4000 7000 11000 12500 15500 17000 19500 22050 25000 28000 31000 33075 36000 39000 48000

Using sample rate to optimize memory usage! 😩

We had a wide variety of sample rates on the PS3, because it was the main parameter we used to optimize memory usage of sounds. This led to some very low quality samples in the game. On the PS4 we only used samples with 48kHz rate. The main way to optimize was to switch them to MP3 encoding and adjust the bit rate.

Page 289: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Sample Rates on PS3

0

175

350

525

700

4000 7000 11000 12500 15500 17000 19500 22050 25000 28000 31000 33075 36000 39000 48000

On PS4 we use 48 kHz exclusively!

Using sample rate to optimize memory usage! 😩

We had a wide variety of sample rates on the PS3, because it was the main parameter we used to optimize memory usage of sounds. This led to some very low quality samples in the game. On the PS4 we only used samples with 48kHz rate. The main way to optimize was to switch them to MP3 encoding and adjust the bit rate.

Page 290: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

The Future…

Andreas: Were do we go from here? We’re planning to extend and improve this system in the future, and use it for more purposes. E.g. changing the code generator to allow the creation of compute shaders. Also we'll add more elaborate debugging support, and lots of new nodes of course. We’ll have more detailed profiling support, to measure the execution time of the graph for each node, to allow us to identify bottleneck nodes that need to be optimised. We’re also thinking about different ways to use this system, to create samples on the fly for variations. In this scenario we would add nodes to allow waveforms to be output into buffers, which can then be played at a later point in time.

Page 291: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

The Future…

• Extend and improve

Andreas: Were do we go from here? We’re planning to extend and improve this system in the future, and use it for more purposes. E.g. changing the code generator to allow the creation of compute shaders. Also we'll add more elaborate debugging support, and lots of new nodes of course. We’ll have more detailed profiling support, to measure the execution time of the graph for each node, to allow us to identify bottleneck nodes that need to be optimised. We’re also thinking about different ways to use this system, to create samples on the fly for variations. In this scenario we would add nodes to allow waveforms to be output into buffers, which can then be played at a later point in time.

Page 292: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

The Future…

• Extend and improve

• Create compute shaders from graphs

Andreas: Were do we go from here? We’re planning to extend and improve this system in the future, and use it for more purposes. E.g. changing the code generator to allow the creation of compute shaders. Also we'll add more elaborate debugging support, and lots of new nodes of course. We’ll have more detailed profiling support, to measure the execution time of the graph for each node, to allow us to identify bottleneck nodes that need to be optimised. We’re also thinking about different ways to use this system, to create samples on the fly for variations. In this scenario we would add nodes to allow waveforms to be output into buffers, which can then be played at a later point in time.

Page 293: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

The Future…

• Extend and improve

• Create compute shaders from graphs

• More elaborate debugging support

Andreas: Were do we go from here? We’re planning to extend and improve this system in the future, and use it for more purposes. E.g. changing the code generator to allow the creation of compute shaders. Also we'll add more elaborate debugging support, and lots of new nodes of course. We’ll have more detailed profiling support, to measure the execution time of the graph for each node, to allow us to identify bottleneck nodes that need to be optimised. We’re also thinking about different ways to use this system, to create samples on the fly for variations. In this scenario we would add nodes to allow waveforms to be output into buffers, which can then be played at a later point in time.

Page 294: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

The Future…

• Extend and improve

• Create compute shaders from graphs

• More elaborate debugging support

• Detailed profiling

Andreas: Were do we go from here? We’re planning to extend and improve this system in the future, and use it for more purposes. E.g. changing the code generator to allow the creation of compute shaders. Also we'll add more elaborate debugging support, and lots of new nodes of course. We’ll have more detailed profiling support, to measure the execution time of the graph for each node, to allow us to identify bottleneck nodes that need to be optimised. We’re also thinking about different ways to use this system, to create samples on the fly for variations. In this scenario we would add nodes to allow waveforms to be output into buffers, which can then be played at a later point in time.

Page 295: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

The Future…

• Extend and improve

• Create compute shaders from graphs

• More elaborate debugging support

• Detailed profiling

• Experiment with sample-rate synthesis

Andreas: Were do we go from here? We’re planning to extend and improve this system in the future, and use it for more purposes. E.g. changing the code generator to allow the creation of compute shaders. Also we'll add more elaborate debugging support, and lots of new nodes of course. We’ll have more detailed profiling support, to measure the execution time of the graph for each node, to allow us to identify bottleneck nodes that need to be optimised. We’re also thinking about different ways to use this system, to create samples on the fly for variations. In this scenario we would add nodes to allow waveforms to be output into buffers, which can then be played at a later point in time.

Page 296: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

The Future…

Andreas: Were do we go from here? We’re planning to extend and improve this system in the future, and use it for more purposes. E.g. changing the code generator to allow the creation of compute shaders. Also we'll add more elaborate debugging support, and lots of new nodes of course. We’ll have more detailed profiling support, to measure the execution time of the graph for each node, to allow us to identify bottleneck nodes that need to be optimised. We’re also thinking about different ways to use this system, to create samples on the fly for variations. In this scenario we would add nodes to allow waveforms to be output into buffers, which can then be played at a later point in time.

Page 297: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

The Future…

• Improve workflow even further

Andreas: Were do we go from here? We’re planning to extend and improve this system in the future, and use it for more purposes. E.g. changing the code generator to allow the creation of compute shaders. Also we'll add more elaborate debugging support, and lots of new nodes of course. We’ll have more detailed profiling support, to measure the execution time of the graph for each node, to allow us to identify bottleneck nodes that need to be optimised. We’re also thinking about different ways to use this system, to create samples on the fly for variations. In this scenario we would add nodes to allow waveforms to be output into buffers, which can then be played at a later point in time.

Page 298: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

The Future…

• Improve workflow even further

• Time to Game could be immediate

Andreas: Were do we go from here? We’re planning to extend and improve this system in the future, and use it for more purposes. E.g. changing the code generator to allow the creation of compute shaders. Also we'll add more elaborate debugging support, and lots of new nodes of course. We’ll have more detailed profiling support, to measure the execution time of the graph for each node, to allow us to identify bottleneck nodes that need to be optimised. We’re also thinking about different ways to use this system, to create samples on the fly for variations. In this scenario we would add nodes to allow waveforms to be output into buffers, which can then be played at a later point in time.

Page 299: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

The Future…

• Improve workflow even further

• Time to Game could be immediate

• Integrate asset creation side even more

Andreas: Were do we go from here? We’re planning to extend and improve this system in the future, and use it for more purposes. E.g. changing the code generator to allow the creation of compute shaders. Also we'll add more elaborate debugging support, and lots of new nodes of course. We’ll have more detailed profiling support, to measure the execution time of the graph for each node, to allow us to identify bottleneck nodes that need to be optimised. We’re also thinking about different ways to use this system, to create samples on the fly for variations. In this scenario we would add nodes to allow waveforms to be output into buffers, which can then be played at a later point in time.

Page 300: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Recap

Andreas: So to quickly recap. In order to allow us to fulfil the vision we had for a next-gen sound system and toolset, we’ve created an engine that plays sounds by executing a dataflow logic graph, which was done by generating C++ code which is compiled to native code, for performance reasons. We’ve used this system with lots of inputs from the game engine to create sounds that dynamically change to reflect the environment they’re in and to make them adapt more directly to the game situation. Thus we’ve allowed sound designers to create behaviour for their sounds themselves, with the possibility to reuse and share this logic among different sounds.

Page 301: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Recap

• Built a next-gen system and tool set from scratch

Andreas: So to quickly recap. In order to allow us to fulfil the vision we had for a next-gen sound system and toolset, we’ve created an engine that plays sounds by executing a dataflow logic graph, which was done by generating C++ code which is compiled to native code, for performance reasons. We’ve used this system with lots of inputs from the game engine to create sounds that dynamically change to reflect the environment they’re in and to make them adapt more directly to the game situation. Thus we’ve allowed sound designers to create behaviour for their sounds themselves, with the possibility to reuse and share this logic among different sounds.

Page 302: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Recap

• Built a next-gen system and tool set from scratch

• Integrated with our asset pipeline and workflow

Andreas: So to quickly recap. In order to allow us to fulfil the vision we had for a next-gen sound system and toolset, we’ve created an engine that plays sounds by executing a dataflow logic graph, which was done by generating C++ code which is compiled to native code, for performance reasons. We’ve used this system with lots of inputs from the game engine to create sounds that dynamically change to reflect the environment they’re in and to make them adapt more directly to the game situation. Thus we’ve allowed sound designers to create behaviour for their sounds themselves, with the possibility to reuse and share this logic among different sounds.

Page 303: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Recap

• Built a next-gen system and tool set from scratch

• Integrated with our asset pipeline and workflow

• Execute program for each sound at high rate

Andreas: So to quickly recap. In order to allow us to fulfil the vision we had for a next-gen sound system and toolset, we’ve created an engine that plays sounds by executing a dataflow logic graph, which was done by generating C++ code which is compiled to native code, for performance reasons. We’ve used this system with lots of inputs from the game engine to create sounds that dynamically change to reflect the environment they’re in and to make them adapt more directly to the game situation. Thus we’ve allowed sound designers to create behaviour for their sounds themselves, with the possibility to reuse and share this logic among different sounds.

Page 304: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Recap

• Built a next-gen system and tool set from scratch

• Integrated with our asset pipeline and workflow

• Execute program for each sound at high rate

• Sound programs created from data flow graph

Andreas: So to quickly recap. In order to allow us to fulfil the vision we had for a next-gen sound system and toolset, we’ve created an engine that plays sounds by executing a dataflow logic graph, which was done by generating C++ code which is compiled to native code, for performance reasons. We’ve used this system with lots of inputs from the game engine to create sounds that dynamically change to reflect the environment they’re in and to make them adapt more directly to the game situation. Thus we’ve allowed sound designers to create behaviour for their sounds themselves, with the possibility to reuse and share this logic among different sounds.

Page 305: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Recap

• Built a next-gen system and tool set from scratch

• Integrated with our asset pipeline and workflow

• Execute program for each sound at high rate

• Sound programs created from data flow graph

• Generate C++ and compile to native code

Andreas: So to quickly recap. In order to allow us to fulfil the vision we had for a next-gen sound system and toolset, we’ve created an engine that plays sounds by executing a dataflow logic graph, which was done by generating C++ code which is compiled to native code, for performance reasons. We’ve used this system with lots of inputs from the game engine to create sounds that dynamically change to reflect the environment they’re in and to make them adapt more directly to the game situation. Thus we’ve allowed sound designers to create behaviour for their sounds themselves, with the possibility to reuse and share this logic among different sounds.

Page 306: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Recap

New nodes for the graph representation can be easily added as game assets and allow the system to scale with the needs of their users. It has been embraced by other disciplines in our company for various purposes.

Page 307: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Recap

• Lots of inputs from game, dynamically change sound

New nodes for the graph representation can be easily added as game assets and allow the system to scale with the needs of their users. It has been embraced by other disciplines in our company for various purposes.

Page 308: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Recap

• Lots of inputs from game, dynamically change sound

• Creating new nodes is very easy

New nodes for the graph representation can be easily added as game assets and allow the system to scale with the needs of their users. It has been embraced by other disciplines in our company for various purposes.

Page 309: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Recap

• Lots of inputs from game, dynamically change sound

• Creating new nodes is very easy

• Allows system to improve and designers to be creative

New nodes for the graph representation can be easily added as game assets and allow the system to scale with the needs of their users. It has been embraced by other disciplines in our company for various purposes.

Page 310: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

Recap

• Lots of inputs from game, dynamically change sound

• Creating new nodes is very easy

• Allows system to improve and designers to be creative

• Has been embraced by other disciplines

New nodes for the graph representation can be easily added as game assets and allow the system to scale with the needs of their users. It has been embraced by other disciplines in our company for various purposes.

Page 311: The Next-Gen Dynamic Sound System of Killzone Shadow Fall

[email protected] [email protected]

@woldhek

Any questions?