Skip to content

Geometry manager - #32

Merged
phevosccp merged 5 commits into
mainfrom
geometry-manager
Nov 19, 2026
Merged

phevosccp merged 5 commits into
mainfrom
geometry-manager

Conversation

@phevosccp

@phevosccp phevosccp commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

Description

This PR adds AudGeometryManager, which keeps track of the meshes trinity registers for audio occlusion and decides which of them go to Wwise. AudGeometry used to talk to Wwise directly, now it just forwards to the manager.

linked with : carbonengine/trinity#154

Changes

  • Added AudGeometryManager. It stores the geometry sets and instances trinity registers and sends them to Wwise once per tick, from the audio thread.
  • Only the instances nearest the listener are sent, limited by a max distance and a triangle budget.
  • Meshes are cleaned up before they reach Wwise: vertices at the same position are welded, broken triangles are dropped, and meshes over Wwise's 16 bit limits are rejected with a warning.
  • Geometry stays registered while audio is disabled or the geometry switch is off, and is sent again when it comes back.
  • Transmission loss and the diffraction settings now apply to meshes already in Wwise, not only to new ones.
  • New settings on the manager: geometrySolid, geometryMaxDistance and geometryMaxTriangles.
  • New read only counters: geometrySetsInWwise, geometryInstancesInWwise, geometryTrianglesInWwise and geometryInstancesRegistered.
  • AudGeometry is now a stateless forwarder to AudGeometryManager.

Trinity side:

Testing

  • Added 19 tests in test_geometry_exposure.py.
  • Tested locally in a frontier client.

@phevosccp
phevosccp marked this pull request as ready for review November 13, 2026 15:08
ccp-zoetrope
ccp-zoetrope previously approved these changes Nov 16, 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.

Seems solid and I think it's good to move the logic to its own manager.

Wwise re-cuts every mesh a portal overlaps each time it rebuilds portal
visibility, on the audio thread. With our meshes that took Wwise to about
900% of an audio frame while standing still; bypassing it brought it to
about 2%.

- New live setting geometryPortalSubtraction, off by default. Turn it on
  when a portal sits in a mesh wall and sound has to pass through it.
- Changing it sends every geometry instance in Wwise again.

@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.

New changes look good!

@phevosccp
phevosccp merged commit 0efc8cb into main Nov 19, 2026
12 checks passed
@phevosccp
phevosccp deleted the geometry-manager branch November 19, 2026 12:04
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.

2 participants