Status of Geometry::addPolygon for HTML5?

Has there been any more development in getting geometry-based occlusion working for the web platform? I’m curious what the blocker is for it, as there aren’t any existing solutions for handling audio occlusion on the web and I’d be very keen to find something I can just connect to existing scene geometry from something like three.js.

Looking at the API though, I notice that System::loadGeometry is exposed on the JS side. Could I theoretically serialize geometry data outside of the JS app and then load it in at runtime?

Hi,

Unfortunately, 3D Geometry occlusion has been removed: FMOD Engine | Platform Details - HTML5.

Oh I see, I guess I had maybe misread. If that’s the case, the Geometry object should really not be a part of the bindings, most of these function signatures are still accessible
image

I’ll try and figure out another way to simulate occlusion effects.

1 Like

Hi,

Thank you for bringing this to our attention. I will make a note to remove that functionality so there isn’t confusion in the future.

If there is anything else we can assist with please do not hesitate to ask.

Hi,

Apologies, I was mistaken. Geometry is removed in the Reduced Feature Build. If you are using the base version of the Core API you will be able to access the geometry functionality.

Could you please confirm if you are using the base version of the FMOD engine in your project? Could you also elaborate on what you are trying to achieve by using the geometry system?

No worries. That was indeed my initial understanding of the current state of Geometry in the web build though.

I am currently using fmodstudioL.js. I was under the impression that this one would contain fmodL.js, given that fmodstudio.js includes fmod_reduced.js. I believe this is the case, as I have Geometry functionality on the Module object, it’s just missing the addPolygon function, which is listed in the docs as “Not supported in JS” and what I was initially curious about.

I’m currently working on a demo that integrates FMOD into a web-based 3D experience with VR support and spatialized audio. My hope was to be able to tap into the geometry system to feed in mesh data from the 3D scene to better simulate obstruction/occlusion effects in the audio, which no web-based audio libraries I’ve encountered have any built-out solutions for.

Hi,

That is interesting, Geometry shouldn’t be accessible through the Studio API. What version of FMOD are you using? Could you confirm which download you used to get the API?

Thank you for the explanation, an option would be implementing a simple ray cast system to check what objects are in between the audio source and the listener to check if any occlusion should be applied. An example of this can be found here using Unity: Audio Occlusion FMOD w/ Unity not working. Let me know if that would work for your situation.

FMOD 2.0.2, downloaded from the official downloads page under FMOD Engine, HTML5.

And yes, that was pretty much what I was thinking in terms of what to do next, so I’ll give that a shot.

Hi,

Thank you for the information. I think see the issue, 2.0 is no longer supported and hasn’t been updated for some time. If you download the latest version of the FMOD Engine it should align more with our documentation and you should not be able to access the Geometry functionality from the Studio API.

Apologies, I misread the version from the download page: I’m actually using 2.02.16

1 Like

Hi,

All good, would it be possible to get a code snippet of how you are initializing the FMOD system and access the parts of the Geometry system that you can?

Here is a live sample on glitch.com: Glitch :・゚✧

With the preview pane open, if you check the browser’s console logs you will see the Geometry class and most of its methods are still accessible.

Hi,

Thank you for the example.

Correct, the geometry class is accessible. However, if a geometry class function is called it will fail as it is explained in the docs that they have been removed. As this is noted in the docs there won’t be a change made at this time.

Thank you for bringing this to our attention.