Our Alien Physics World and other Environments come with an in-built footstep sound effect system, that you can easily set up with your own player.
How the System Works #
The system works by utilizing an AnimNotify blueprint.
This blueprint is called from the Animation tab.
Each time it is called, it does a line trace downwards from a socket on the player’s head called “headSocket“
This line trace detects the Physical Material applied to the surface below it.
Depending on the physical material, it will play a specific sound effect.
Animating Footsteps #
To get your player to utilize our sound effects blueprint, you will need to open your player’s animations and call our AnimNotify blueprint each time a foot touches the ground.
Begin by opening up one of your player’s animations (for example, a running animation).
In the tracklist, find a position where your players foot starts to touch the ground, and right click the Notify Track.
click Add Notify > BP_Footstep_AnimNotify
Do this as many times as the feet touch the ground. See below for an example
Open all the other animations that your character has and repeat the steps above until all of them reference our AnimNotify when the feet touch the ground.
Setting up your Character’s Socket #
By default, your character may not have the appropriate socket for the line trace to work with.
Open your Character’s skeletal mesh, and open the Skeleton Tree tab.
Scroll down until you find the head bone, and ensure it has a socket called headSocket.
If it doesn’t have one, simply right click it and click Add Socket.
Name it headSocket
Your custom character should now play footestep sound effects with levels from Etherion Designs.
If you have your own custom levels, the sound effects will only play if you have the correct Physical Materials applied to the surface below the character.
Adjusting Trace Height #
The current version of the Alien Physics World does not automatically detect character’s height.
So if you have a character that is a different height to the default mannequin, you would normally need to adjust the BP_Footstep_AnimNotify file.
However, future versions wil support this – and we have prepared the updated file for you to patch immediately if you need it.
This updated BP_Footstep_AnimNotify file will automatically detect your characters height, which is useful when using numerous characters.
Please download the file below:
To install it, you’ll first need to close your project.
Then, use windows explorer to navigate to
YourProject/Content/FoliagePhysics/Sounds/Footsteps/
and paste it in there. Overwrite the existing file. Then restart your project.
The updated file should now be available, which you can locate here:
Water Sound Effects #
If you are creating your own custom level, water will not play our designated sound effects by default.
This is because Water doesn’t have its own collision set up by default.
To save you some time, we created two blueprints that can help you do this very quickly.
If you are not using the Advanced Locomotion System, and/or do not require the visibility channel in adjusting the bones of your character to your landscape, follow these instructions:
Drag in BP_WaterSoundCollider into your level, and position it in the same location as your water.
Once it is positioned and scaled across your water, uncheck “Preview Visibility” to hide it in your editor.
(Note that it will automatically hide in-game regardless of whether you uncheck this or not)
This water sound collider is an invisible plane with the Visibility trace channel, and has the Water Physical Material applied to it.
This is how the Sound Effect blueprint detects water.
If you arent using the Advanced Locomotion System, you should have water footstep sound effects playing when your player runs through the water.
If you do have use the Advanced Locomotion System, or any other system that requires the Visibility collision channel to control character bones, this will naturally cause issues – like walking on water.
This is beacuse the pawn uses the Visibility collision channel to determine what the player can walk on.
Unless you are creating a Bible game, this won’t do!
We created an easy solution for this.
Simply drag in BP_WaterTraceChannelChanger into your level.
In the details panel of this actor, you can choose which collision channel you would like this plane to have.
So if you require the Visibility trace channel for your characters ground detection, you can instead choose “Camera”.
This blueprint will automatically apply this specified collision channel to any BP_WaterSoundCollider actors in the level.
Physical Materials (Important) #
If you want footstep sound effects to apply to your own custom meshes and materials,
you’ll need to assign Physical Materials to your materials, material instances, and/ or landscape.
Without doing this, you will not hear any footstep sounds!
Applying to Materials #
To apply them to your material, first open your material.
While your material is still open, select one of our Physical Materials from the content browser (outlined in the screenshot above).
Then in your material’s details panel, click the “assign” button to apply the Physical Material to your Material.
Applying to Material Instances #
To apply them to your material instance, first open your material instance.
While your material instance is still open, select one of our Physical Materials from the content browser (outlined in the screenshot above).
Then in your material instance’s details panel, click the “assign” button to apply the Physical Material to your Material.
Applying to Landscape Materials #
Lanscape Physical Materials can be applied using two methods.
The easiest is to apply them using the LayerInfo files.
See the video below, by Matt Aspland, on how to do this:
The second method is to do it via the material editor.
This method can be useful if you want to use the same LayerInfo for multiple landscapes, but want different sound effects depending on your Landscape Material.
Open your Landscape Material and create a node called Landscape Physical Material Output
Select this node, and in the details panel, add as many items to the array as you need.
Then assign these to our physical materials.
You can use layer blend nodes to assign physical materials to different layers.
Set a value of 0 to not assign a physical material, and a value of 1 to assign a physical material.
Creating New Footstep Sounds #
If you want to create some uniqueness to your game and wish to use your own footstep sound effects, you can do this quite easily.
Open BP_Footstep_AnimNotify.
Here you will find nodes that play sound cues based on whether the line trace detects a certain physical material.
You may insert your own sound cue into any of the existing Physical Material types.
Or, if you want to create new physical material types,
simply copy one of the examples and replace it with your own physical material and sound cue.
Ensure that you link up the nodes in the same structure as all the other nodes.
If you wish to learn more about Physical Materials, you can visit the official Unreal Engine Documentation on Physical Materials