Audio: Occlusion – Arma Reforger
Jump to navigation
Jump to search
Buildings
Building occlusion describes sound attenuation based on whether or not a sound emitter and the listener are in the same room (or a room at all). The system goes hand-in-hand with Light Portals and the room areas created by the system.
Signals and Variables
There are four main signals and variables that handle building occlusion:
- GInterior: float between 0 and 1 (1 if the current camera position is inside a building, 0 if outside, may gradually interpolate from 0 to 1 when entering a portal).
- Interior: per-entity signal that returns 1 if the entity is inside a building.
- GRoomSize: returns the size of the room the listener is located in, or 0 if it's not in any room.
- RoomSize: per-entity signal that returns the size of the room the entity is located in, or 0 if it's not in any room.
The listener and emitter are considered to be "in the same room" if
- GInterior OR the emitter's Interior signal are 1 and
- GRoomSize and the emitter's RoomSize signal are identical
Examples
Vehicles
Occlusion inside vehicle cabins uses the Coverage System and is defined by the GCurrVehicleCoverage audio variable as an arbitrary float value.
- Each compartment of a vehicle can be given a "base coverage" value, defined on the CompartmentManagerComponent.
- Inside the SlotManagerComponent, using the "Slot Mappers" class, each Slot can be assigned a coverage value that will be added to the overall coverage as long as the slot is not destroyed (e.g windows can break, resulting in a lowering of the coverage value).
- Therefore, the overall coverage for each vehicle department is the sum of the Base Coverage defined in the CompartmentManagerComponent and all additional slot coverage values defined in the SlotManagerComponent.