Skip to content

Line-of-Sight audio Occlusion and Obstruction - #9

Open
phevosccp wants to merge 26 commits into
mainfrom
occlusion-obstruction
Open

Line-of-Sight audio Occlusion and Obstruction#9
phevosccp wants to merge 26 commits into
mainfrom
occlusion-obstruction

Conversation

@phevosccp

Copy link
Copy Markdown
Contributor

Description

This PR implements basic occlusion/obstruction using LPF and implementing SetObjectObstructionAndOcclusion() from the Wwise API.

In addition to that it manages emitterIDs that are occluded/passthrough and handle fade in/out internals.
This implementation differs from the Acoustics API in the sense that it completely relies on Carbon's (destiny) line-of-sight ray tracing checks to know what is occluded and what not.

The whole path end to end in short is the following: Destiny → Python → trinity → CarbonAudio → Wwise.

Technical details:

  • New class AudObstructionOcclusion : Owns all per emitter obstruction/occlusion and talks to the wwise API. We store the emitter IDs and states in a unordered map and handle their states, in addition we also handle fade/in out intervals
  • The class has no concept of the actual emitter states so it reads that from AudManager
  • It's also important to note that currently we disable basic occlusion/obstruction when acoustics are ON to avoid attenuation stacking (e.g -12dB occlusion + -12 dB tranmission = -24dB reduction which is unexpected ). This will potentially change with the introduction of trigger volumes and we will keep both systems alive.

Lifecycle

  • Update loop : AudManager::Process(), once per tick, before RenderAudio()): advances all fades using a clock delta and sends only changed values to Wwise.
  • Emitter validation : values are only accepted/tracked for emitters that actually exist, see WithCallbackGameObject
  • Culling : emitters that are currently culled are skipped but keep fading
  • Cleanup : entries that fade fully back to unblocked are dropped to keep the map small , see UnregisterGameObject()

Testing

Tested and implemented for EVE Frontier.

@ccpgames-carbon

ccpgames-carbon commented Jul 21, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@phevosccp
phevosccp marked this pull request as ready for review July 23, 2026 10:43
Comment thread src/AudObstructionOcclusion.h Outdated
Comment thread InstallToMonolith.vcxproj Outdated
Comment thread vcpkg.json Outdated
Comment thread src/AudManager.h Outdated
Comment thread src/AudManager.cpp
Comment thread src/AudObstructionOcclusion.cpp Outdated
Comment thread src/AudObstructionOcclusion.h Outdated
Comment thread src/AudObstructionOcclusion.h
Comment thread tests/python/audiotests/test/test_audgameobj_enabled_exposure.py
Comment thread InstallToMonolith.vcxproj
Ikreb1
Ikreb1 previously approved these changes Jul 27, 2026

@ccp-zoetrope ccp-zoetrope left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pull request looks almost ready!

The only blocker is that there are no tests covering this new feature. The logic that needs to have some testing around it is the interpolation of occlusion values to create a fade as it seems the most brittle to future contributors.

I also made a few small comments about method name changes which, if you agree, you can go ahead with but it is not a blocker.

Comment thread src/AudObstructionOcclusion.h Outdated
Comment thread src/AudObstructionOcclusion.h Outdated
Comment thread src/AudObstructionOcclusion.h Outdated
Comment thread src/AudObstructionOcclusion.h Outdated
- Added test coverage
- Rest of the requested PR changes.
ccp-zoetrope
ccp-zoetrope previously approved these changes Jul 27, 2026

@ccp-zoetrope ccp-zoetrope left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image

- first-time blocked emitters now start fully blocked immediately instead of fading in.
- keep cleared emitters tracked so later re-blocking fades in, instead of snapping instantly as if they were
    new.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants