0
0

I’m trying to implement some nice occlusion/obstruction using FMOD’s geometry engine and have acouple of questions.

1) I’m pretty sure this doesn’t come for free and my aim is to do a very rough and approximate solution. Still, it would be, if possible, nice with some hint about how much it actually do cost. Is anyone using this at all? And how many vertices and polygons are you using?

2) If I’m feeding geometries to FMOD, can I still use the direct/reverb params per sound? Or will these be ignored once I add my first geometry? In some cases it might be nice with both so that’s why I’m wondering.

3) Which sounds will be affected by occlusion/obstruciton? All 3d sounds? Can sounds be bypassed in FMOD designer?

4) Ray-casting. How does it work? Will it only cast a single ray from the listener to the sound and check for polygons interesting the path or will it check for leakage as well? I mean if I want to simulate underwater occlusion, would it work with a single plane that is positioned along the surface?

  • You must to post comments
0
0

[quote="Frohagen":sfgnfkdb]I’m trying to implement some nice occlusion/obstruction using FMOD’s geometry engine and have acouple of questions.

1) I’m pretty sure this doesn’t come for free and my aim is to do a very rough and approximate solution. Still, it would be, if possible, nice with some hint about how much it actually do cost. Is anyone using this at all? And how many vertices and polygons are you using?

[/quote:sfgnfkdb]

As always, use System::getCPUUsage. Our tests were done on 100,000 polygon meshes and the performance was very good. We use a sphere/octree hybrid system to cull polygons.

[quote:sfgnfkdb]

2) If I’m feeding geometries to FMOD, can I still use the direct/reverb params per sound? Or will these be ignored once I add my first geometry? In some cases it might be nice with both so that’s why I’m wondering.

[/quote:sfgnfkdb]

the geometry system directly calls Channel::set3DOcclusion which in turn calls setReverbProperties. I’m fairly sure atm that it will overwrite anything you set when it comes to reverb.

[quote:sfgnfkdb]

3) Which sounds will be affected by occlusion/obstruciton? All 3d sounds? Can sounds be bypassed in FMOD designer?

[/quote:sfgnfkdb]

Just 3d sounds. In the low level engine you can use FMOD_3D_IGNOREGEOMETRY.
In FMOD Designer you cannot enable this flag, but you could use 3dpanlevel = 0 and maybe controll rolloff with a parameter instead (though orientation is lost)

[quote:sfgnfkdb]

4) Ray-casting. How does it work? Will it only cast a single ray from the listener to the sound and check for polygons interesting the path or will it check for leakage as well? I mean if I want to simulate underwater occlusion, would it work with a single plane that is positioned along the surface?[/quote:sfgnfkdb]

It casts a single ray from listener to sound, and accumulates occlusion from each polygon it intersects.
I’m not sure what you mean by leakage (ie i assume you mean a box with a gap in it somewhere by accident?) but a single very large plane polygon would work in the case you mention.

I suppose you mean the water volume is a volume that might accidentally have holes in it?

  • You must to post comments
0
0

So adding a couple of boxes shouldn’t make much difference to performance, right? The perfect scenario would be if we could pass the collision-map but I’m pretty sure that even though you say that performance is good it will add to performance enough to make the peromance coders go mad so for now I will stick to a simlified geometry.

It would be really nice if there was an option in FMOD designer to ignore geometry per event. Actually I think the most common case would be to occlude 2d sounds though which I belive would oly be possible if the sound was 3d but with a 3dpanlevel of 0. Why this then? Well, ambiences for instance are mostly done by using 2d loops and if you are under water and close to the shore you wouldn’t like to hear the above water ambiences in any case. This can ofcourse be handled in other ways but if it could be handled by occlusion it would be even better.

Finally, what I meant by leakage was the fact that putting a small plane between the listener and a sound wouldn’t in real life make the sound 100% occluded since sound would leak from the edges so what I wonder was if I have to keep that in mind or assume 100% occlusion.

  • You must to post comments
0
0

A couple of more things just to be on the safe side:

  • Geometry::setPosition. Is it connected to the center of the geometry or is it connected to the local origin?

  • Big geometries. If I have a big geometry like for instance the big plane that simulates occlusion by water surface how will it work with a smaller world size? Will it be trimmed to fit inside the radius or will the entire polygon be rejected?

  • You must to post comments
0
0

[quote="Frohagen":30wn2dgp]A couple of more things just to be on the safe side:

  • Geometry::setPosition. Is it connected to the center of the geometry or is it connected to the local origin?

  • Big geometries. If I have a big geometry like for instance the big plane that simulates occlusion by water surface how will it work with a smaller world size? Will it be trimmed to fit inside the radius or will the entire polygon be rejected?[/quote:30wn2dgp]

  1. All your polygons are related to the 0,0,0 original of the geometry object. This means yes – setposition moves the origin of the geometry object around in world space.

  2. you said ‘radius’ but i dont know what radius you are talking about. All line tests are in world space and if your sound and listener intersect your huge or small polygon then it occludes. There are no radius values.

  • You must to post comments
0
0

When I said radius I meant the max_world_size. Sorry for not being clear about that.

  • You must to post comments
0
0

[quote="brett":kdlwg4g0]
It casts a single ray from listener to sound, and accumulates occlusion from each polygon it intersects.
I’m not sure what you mean by leakage (ie i assume you mean a box with a gap in it somewhere by accident?) but a single very large plane polygon would work in the case you mention.
[/quote:kdlwg4g0]

Things sounds not so good, when we have obstructions:
(
http://www.ixbt.com/multimedia/sound-te … age023.jpg
full article source is here:
http://www.digit-life.com/articles2/sou … index.html
)

A simple test:
Regular office room 10×10 meters,
you have one source, one listener and single cube of geometry size 0.5 meters

While source->listener wavecast does not hit the geometry, we hear it at full volume.
If we gradually move listener and at some point raycast hits geometry, volume will fall too fast.

In real life we are still able to hear the sound, even if the geometry material is 100% sound absorber.

In a game, if we have a wall between listener and source with opened door, low frequencies passing through regular Australian wall, while high frequencies passing only through this door.

It could be a great improvement of existing occlusion system, but I understand that it will require several raycasts, and maybe SomeShapeCast.

Are there any plans on improving FMOD this way?

  • You must to post comments
0
0

No, and you’ve misunderstood what obstruction means. It is already supported in fmod.

Obstruction is when the direct path is totally occluded, but the -reverb- path is not. All fmod geometry polygons have a direct path material value, and a reverb material value.

That example would be trivial. Firstly you wouldnt set the occlusion to 1.0, you’d set it to maybe 0.2, or 20% occlusion. The reverb material setting would be 0.0, or 0% occlusion.

  • You must to post comments
0
0

[quote="brett":2q882uiw]No, and you’ve misunderstood what obstruction means. It is already supported in fmod.

Obstruction is when the direct path is totally occluded, but the -reverb- path is not. All fmod geometry polygons have a direct path material value, and a reverb material value.

That example would be trivial. Firstly you wouldnt set the occlusion to 1.0, you’d set it to maybe 0.2, or 20% occlusion. The reverb material setting would be 0.0, or 0% occlusion.[/quote:2q882uiw]

Yes, you are right! If this room has some reverb, I still can hear reflections even when direct path is occluded. And it sounds realistic enough!

Thanks!

  • You must to post comments
Showing 8 results
Your Answer

Please first to submit.