ReportNoiseEvent MaxRange is Multiplying by Loudness Problem

I’m working on my stealth game and currently implementing a detection meter. Detection meter will work be based on Stimulus.Strength( if anybody has a better approach for detection meters I’m all ears. Because I am new at the game development, It’s my first game)

And my question is: How to Set Independent Range and Loudness Correctly on ReportNoiseEvent?

Because if you look into the Epic’s documentation, It says MaxRange is multiplied by Loudness. That means I can’t freely set the detection range and stimulus strength independently.

For Example:

My Desired Noise Range: 1000

and My Desired Stimulus Strength: 0.2

But It does’nt work how I want, It calculates the noise range 200.

To fix this, I made a function. It basically does dividing range to the strength and It didnt work either.

How can I solve this?

Hi Welcome,

I encountered this before however didn’t pay too much attention since I am not making a stealth game but I understood the problem.

As you say, listener and sound origin are different concepts.

When you make a noise event Max Range defines how long distance this sound can travel apart from the the listener configs. EX: If you have an noise event range of 500 and Listener Range : 1000. It can be only heard/sensed inside 500 for Listener. Once event outiside of 500 its zero.

However you can


Make range 0 and simply it can be heard by any listener but it depends on the listeners config, how ears are sensitive.

Once an event with some strength is made in listeners range it can be sensed. You can have a big range config on listener (SenseConfig). Then you can simply make a calculation of travelling how this source of noise should be perceived by listener. This is generally called in technically Sound Propagation and depends on many physical aspects however lets call if Sound Fall Off for easy to understand.

So on Listener side, we know,

  • Location of event and our location : Simply Distance to Origin
  • Strength (Intensity of Sound decibel)

I also made sense range super big something like 10000

This simply enables us to detect an event with correct strength variable in a big range.


image

So this simply decouples us from the engine’s calculation of range since now our audible range is very high. Now we can calculate a fall of ourselves depending on the gameplay feel and balance we want.


Simply I can calculate a linear falloff for this intensity.


The closer we get intensity gets higher. So it behaves like the closer you get the strength reaches its actual value. If you don’t use fall off it will be always 0.2 in the hearing radius of listener.

As an example we can do something like

and with a treshold we can define what happens like alerted

AI still hears the faint noise however we can trigger things as Alerted, Agroed etc on the moment of reaching a certain treshold.

A faint footstep, slow walk-> detected in a closer range
A big footstep, run->detected from far away.

Let me know if it helps, there is more aspects to actual sound propagation however the underlaying principles is the same. / similar. It is a really important aspect of the game for stealth and competetive games.

If you want to simulate these kind of propagations there are some plugins that do it like Wwise also I can show the simple ways of doing it for your game like, hearing difference for AI behind a wall vs open area.

1 Like

Thank you for the very thorough explanation. It really helped and taught me lot. Actually i didnt event know about we can set the hearing difference for AI behind a wall vs open area. I will resarch about the realistic spund propagation in the future! Right now I’m kinda in development hell with my game and just want the finish quickly. Thanks again for taking the time to explain, and have a great day!

1 Like

Sure thing, glad it is something helpfull.

A simple approach (Without the all the physical aspects) to simulating sound propagation can be achieved by

  • Making A Noise event and receiving the event AI as usual you do or shown in the previous post.
  • Creating a single line trace to the source location or target and detecting if there is a direct line of sight between listener and noise source.
  • If (True) : Normal fall off, If (False) use navmesh path to location and get path lenght rather than distance between origins.

Happy developing.

1 Like