Menu
Lumberyard
User Guide (Version 1.13)

Sounds and Physics

The game environment is very interactive, with objects moving, colliding, and breaking. When two materials touch each other, the collision can generate a sound.

Physical events in the game can send parameter information to the sound event. Lumberyard sends the speed and mass of the collision, which then gets passed to the sound event.

For example, an object's speed will cause the collision to change pitch, while an object's mass determines the volume and sound definition used. A smaller mass reduces a sound's roll-off radius. Small collisions won't be heard from as far away as larger collisions.

The interaction between two materials is specified in the MaterialEffects.xml file located in the \Game\Libs\MaterialEffects directory.

Using this file, Lumberyard looks up actions to be taken on interaction. Each entry in the file table contains text pointing to a description of the sound effect. These effects are described in the \FXLibs subfolder.

You can use the following console variables to debug physics sound events:

  • mfx_Debug – Enables MaterialEffects debug messages (1=Collisions, 2=Breakage, 3=Both).

  • mfx_Enable – Enables MaterialEffects.

  • mfx_EnableFGEffects – Reloads MaterialEffects flow graphs.

  • mfx_ReloadFGEffects – displays profiling information for the shaders.

  • mfx_ReloadFGEffects – Reloads the MaterialEffects file.