
The Surface Link system is a custom GROUND BRANCH system which provides a convenient way to map physical materials to specific classes of things. It is a database of sorts.
One example of the Surface Link system is mapping footsteps to particular footstep sounds. It provides a way to organise the playing of different footstep events (wwise sounds) depending on the physical material that is walked on. Physical materials are set for each material, to provide information about what kind of thing that arbitrarily named materials relate to. See GROUND BRANCH physical materials for more information on those.
Another example of the Surface Link system is playing the correct impact sound when a spent shell hits a floor or other surface.
The beginning of the story here is the Shell Impact Type
property of a GBEjectComponent weapon blueprint component (representing the ejection port of a wepaon). See GBEjectComponent blueprint component for more details.
In the following example of a GBEjectComponent configuration, a type of BrassCase_556
is used. This tells GROUND BRANCH that it needs to look for surface link definitions having a Type
property matching this name.
Typically, a set of surface links for a particular purpose and for a particular class of items are stored in a single folder. In the screenshot below, it can be seen that the BrassCase/Impacts/BrassCase_556 folder contains a complete set of surface links for type BrassCase_556, as referenced by the ejection port component shown above.
Also in the folder are the end-points of the surface link look-up, namely all defined different impact sounds for the 556 brass cases. Due to practical limitations, only a small number of possible sounds are provided as 'best case' matches for particular physical materials, but Concrete, Wood and Dirt provide a reasonable range of appropriate sounds for all collisions.
If we take a look at a single one of those Surface Link files, we can see that each Surface Link file has properties allowing it to make a connection between Physical Material and a Linked Class:
The properties in the Surface Link include:
Type
A keyword for filtering particular groups of Surface Links for look-ups.
Physical Material
The physical material 'key' for the look-up.
Linked Class
The 'value' for the look-up, being any arbitrary class appropriate for the particular kind of look-up.
Cosmetic Only
This tells GROUND BRANCH that the Surface Links only apply to items on clients (like sound and graphics) and the Surface Links will not be loaded on dedicated servers.
To make a new Surface Link look-up, you can use the content browser right-click menu to select a new Surface Link object in the normal way:
Whatever is carrying out the look-up will have a particular class in mind for the look-up target. In this case, the impact sound code will be looking for a class derived from BP_CasingImpact_Master
. These are the properties of one such class, BP_BrassImpact_556_Concrete
:
The details of this blueprint are not important to this example, but it can be seen that the blueprint encodes a particular sound to play (a Wwise event), Ww_ShellCasings_Event
.
The Caliber
and Material
properties are redundant on the Unreal Engine 4 side, but it can be seen that they are passed to Wwise to allow Wwise to make a more informed decision about what sound event or optionally what additional filters to apply, if any, and suchlike:
It is not advised to add any additional Physical Materials to GROUND BRANCH, but if you do, you will need to add a set of Surface Links for all sorts of things (footstep sounds, casing sounds, etc) if you want anything other than the default settings for your new physical material.
More commonly you might add a new type of a particular Type
of Surface Link system, for example for a new custom caliber (though again this is not highly recommended due to the amount that needs to be set up). You may then need to provide another set of Surface Links in an appropriate directory.
Surface Links do not need to be placed anywhere in particular (though modded content should always go into your mod plugin folder). They are Unreal Engine assets and therefore they will be found wherever they are. All you need to do is set the correct Type and then a reasonable set of physical materials and a reasonable set of classes that are looked up.