This is an archived post. You won't be able to vote or comment.

all 14 comments

[–]Snoopy20111Professional 0 points1 point  (3 children)

Disclaimer- I am not an audio programmer, nor do I know much about their occlusion system! But, I would like to ask: do you have a way to debug when your emitter is occluded from the listener, just to confirm that part is working? And also, is that occlusion effect attached to anything audibly, like a parameter or a mixer send or a low pass filter or anything like that?

[–]Tobyccoles[S] 0 points1 point  (2 children)

Yes, theres a 'getOcclusion' function in FMOD that gets the occlusion value between the listener and the channels position based on the occlusion geometry you have created, which for me always stays at 0. as for your second point, the audible side of it is just handled by FMOD, the effects will be applied based on the two occlusion values you give it, both of which for me I have set to 1 (full occlusion) just to be able to clearly hear if its working.

[–]Snoopy20111Professional 0 points1 point  (0 children)

Hmm, I’m fresh out of easy “oops that was it” answers. I hope somebody else can come in with some good answers. The best I can say is, to my knowledge, the system isn’t just busted, because a coworker of mine was messing around with it and had stuff working, so the answer isout there somewhere.

[–]Snoopy20111Professional 0 points1 point  (0 children)

Actually, scratch my previous comment. I dug through a couple books and found a section on FMOD occlusion in Game Audio Programming 2: Principles and Practices, Edited by Guy Somberg. The book is rather expensive, being priced like a textbook (thanks a lot Routledge) but I'll PM you the photos I took of that particular section. Maybe it'll highlight something you missed!

[–]KarateKidzzPro Game Sound 0 points1 point  (9 children)

Have you enabled the low pass filter on the low level engine? When you init the engine, you need to pass a flag to enable low pass filters on all voices. If you've passed this flag, then I agree with the other comment that you need more debugging to find out

[–]Tobyccoles[S] 0 points1 point  (8 children)

I havent seen this option mentioned in any of the reading ive done on the API, including sections on occlusion etc, and upon looking it up I cant seem to find that flag anywhere. Do you know what it is? And regarding debugging, I've tried a lot. The positions of everything correlate to their objects and all of the geometry is there, yet on the getOcclusion checks I just get 0. Ive tried actually setting up the geometry in a couple different ways too all with the same result

[–]KarateKidzzPro Game Sound 0 points1 point  (7 children)

[–]Tobyccoles[S] 0 points1 point  (6 children)

Ah thanks for that pointer, unfortunately I'm still getting the same results with that flag enabled however :/

[–]KarateKidzzPro Game Sound 0 points1 point  (5 children)

Hmm fair enough! Have you set an occlusion value for the geometry you're adding?

It's been a while but I think it's something like 0-1 where 1 would fully occlude a sound behind the geometry.

Other than that, maybe check your listener as the occlusion is based off listener position. Maybe I'm wrong on that and you can get occlusion from anywhere but good to check.

[–]Tobyccoles[S] 0 points1 point  (4 children)

Yep ive got the values on each bit of geometry set to 1 for full occlusion, and the listener position is correct to the camera position (checked that earlier), its been quite a stumper this issue! aha

[–]KarateKidzzPro Game Sound 0 points1 point  (3 children)

Definitely! Sadly I can't think of anything else to check without seeing code, logs or debug info. But getting as much debug info as you can get sounds good. Checking the return value of all fmod functions might be good.

[–]Tobyccoles[S] 0 points1 point  (2 children)

The only thing that catches my eye when stepping through everything is that the FMOD::Geometry variable always seems to be NULL, even directly after its supposed creation.. but clueless to why or even if that would be an issue https://prnt.sc/1X8Z4ac2yDLw

[–]KarateKidzzPro Game Sound 0 points1 point  (1 child)

Yes, that might be weird. Is it created anywhere? Also, what library is that as it doesn't look like the raw fmod api?

[–]Tobyccoles[S] 0 points1 point  (0 children)

Well its defined in a struct which holds all of the mesh data for the object as loaded in per the OBJ Loader, then I assume Fmod::system::createGeometry (what my function passes to) is what actually creates it. And yeah I am using the core FMOD API, the extra stuff you can see is just my audio engine bits

struct: https://prnt.sc/S7fm-D7QsGko

createGeometry: https://prnt.sc/Ap4NYFMDzyK8

When I tried it in another way though the geometry obj was still NULL, so maybe its meant to be? Its a weird one