0
0

Hey,

New in FMOD, but very pleased with it so far! However, it’s time for the more advanced stuff now: 3D occluding geometry. The 3D demo is very promising, but before I start wildly implementing it into my engine, I’d like to be sure if I’m doing it right.

My game works a little bit like the big roaming worlds in GTA, but then indoor. So while walking around, the rooms and corridors around you are loaded or unloaded. So, the questions would be:
— "How hard is it to load and unload new (small) chunks into the sound geometry?"
— "If needed, can it be done in a background thread eventually, to prevent stalling the game?"
— "Are the possible leaks (tiny gaps between 2 chunks) a problem?"
— "Does it cause noticeable sound-errors if a sector suddenly appears or dissapears?"

The meshes used are typically highly simplified variants of the rooms. Triangle counts may vary somewhere around ~150 for the average sector. Could be more for complexer scenes though. Mostly there are about 20 to 30 sectors loaded at the same time. I can imagine FMOD has to (re)build some sort of tree when inserting a new chunk of geometry, so the question is if it can be done without stalling the game. Since loading happens in a background thread, it might be possible to do it there as well. Or is there no need to be concerned?

Other than that,
— "Does 3D geometry require an heavy amount of CPU resources or memory?"
— "Is triangulating advised (performance wise), or would N-polygons be better?"
I’m aiming for modern PC platforms though, so there are plenty of megabytes & Hertz! In other words, are other (modern) games doing these things as well, or would it take too much energy?

Cheers!
Rick

  • You must to post comments
0
0

Hi Rick,

[quote:9nxtk23x]– "How hard is it to load and unload new (small) chunks into the sound geometry?" [/quote:9nxtk23x]
There are two options, you can create and destroy Geometry chunks on the fly, or create them all up front and activate/deactivate them. Either one is quite easy.

[quote:9nxtk23x]– "If needed, can it be done in a background thread eventually, to prevent stalling the game?" [/quote:9nxtk23x]
It’s generally not advisable to call any FMOD API functions outside the main thread. However since the geometry occlusion system runs on it’s own thread all those functions are protected from race conditions, so it should be OK.

[quote:9nxtk23x]– "Are the possible leaks (tiny gaps between 2 chunks) a problem?"[/quote:9nxtk23x]
They’re not a major problem because all the occlusion has ramping so you’re not going to get glitches like pops. The ramping time can be adjusted using FMOD_ADVANCEDSETTINGS::geometryMaxFadeTime.

[quote:9nxtk23x]– "Does it cause noticeable sound-errors if a sector suddenly appears or dissapears?" [/quote:9nxtk23x]
Again, ramping should prevent any glitches.

[quote:9nxtk23x]The meshes used are typically highly simplified variants of the rooms. Triangle counts may vary somewhere around ~150 for the average sector.Could be more for complexer scenes though.[/quote:9nxtk23x]
That sounds perfect.

[quote:9nxtk23x]I can imagine FMOD has to (re)build some sort of tree when inserting a new chunk of geometry, so the question is if it can be done without stalling the game. Since loading happens in a background thread, it might be possible to do it there as well. Or is there no need to be concerned? [/quote:9nxtk23x]
Most of the geometry processing happens inside the geometry thread before it does it’s calculations.

[quote:9nxtk23x]– "Does 3D geometry require an heavy amount of CPU resources or memory?"[/quote:9nxtk23x]
No, it is very light weight. FMOD doesn’t store much more than the vertex data you pass in and all the processing occurs in the geometry thread.

[quote:9nxtk23x]– "Is triangulating advised (performance wise), or would N-polygons be better?" [/quote:9nxtk23x]
We support both, I’m not entirely sure which has better performance, but I would stick with what ever is most convenient.

Let me know if you have any other questions.

-Pete

  • You must to post comments
0
0

Thanks a lot, sounds lovely. I’m not seeing real problems so far, so I think I’ll just give it a go!

Loading everything at once might require too much memory in case the map really grows large, so I think I’ll try create & destroy first. If I understand it right, the processing happens in a seperate thread anyway, so I don’t have to be really affraid of hang-ups if a couple of sectors are added/removed.

Maybe one more question then. Does the amount of (active) loaded geometry affect the calculation performance? Or does it work a little bit like spatial division, avoiding most of the geometry checks? I mean, a single sector could only have a few polygons, but if there are dozens of sectors loaded and active at the same time… I have no idea how the occlusion/reverbs actually work (raytracing?).

Thanks!
Rick

  • You must to post comments
0
0

Yeah the calculations just use raycasting with an octree of axis aligned bounding boxes, it handles large numbers of polygons quite well.

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.