0
0

Hi,

I have a sound in a 3D game that I want to simply fade in as you approach the source, but not pan at all.

I thought that setting pan level on the event to 0 would do this – but it seems to get rid of the volume falloff as well. So the sound just instantly plays at full volume as soon as you enter the max distance.

Is this how the 3D pan is meant to work? And if so how do I get the ‘2D’ positional sound (with a 3D volume falloff) that I’m after?

Cheers :)

  • You must to post comments
0
0

bump

  • You must to post comments
0
0

From docs:
[quote:2xx7o40b]Channel::set3DPanLevel
1 = Sound pans and attenuates according to 3d position. 0 = Attenuation is ignored and pan/speaker levels are defined by Channel::setPan, Channel::setSpeakerMix, Channel::setSpeakerLevels. Default = 1 (all by 3D position). [/quote:2xx7o40b]

You are correct changing the pan level to 0 is equivalent to making it a 2d sound. So in addition to losing the panning you also lose the distance based attenuation/occlusion effects.

I can think of two work arounds:
1. Manually calculating the attenuation and using setVolume.

  1. If you wanted to use FMOD’s 3D engine to do those calculations and to take into account geometry as well you could instead define an event/sound object with a silent sound def and use the getAudibility/setVolume and get3DOcclusion/set3DOcclusion functions to replicate the behaviour in your own sounds.

Hope this helps.

-Pete

  • You must to post comments
0
0

I think the easiest way would be to set your event 3d rolloff to ‘custom’ then just add a ‘distance’ parameter to the event, then add a volume curve that attenuates the volume based on distance.

Then you get no panning, just a volume rolloff.

  • You must to post comments
0
0

So are you saying that setting 3d rolloff to ‘custom’ basically ignores 2d/3d and simply looks for values set in the event editor?

That is really good if so – however I would’ve never guessed this unless you had said ! 😉

  • You must to post comments
0
0

that’s correct.

  • You must to post comments
Showing 5 results
Your Answer

Please first to submit.