Not understanding how spatializer works in a top down isometric game

Struggling a bit with the spatializer and I’m not understand exactly how I should be doing this.

It’s a top down isometric game, same camera / viewpoint to a game like Hades. I’ve set the listener position to be above the player but slightly towards the top screen edge (I did this because the view angle like in most games like this - you can see further away at the top of the screen vs the bottom of the screen. If I set the camera straight above the player, enemies below the bottom screen edge won’t attenuate soon enough). So because the camera is closer to the top screen edge, enemies take longer to start attenuating if they move towards the top screen edge, feels more realistic that way. Hope that made sense.

Anyway, if I have a stereo weapon firing sound playing from the player position (at the center), I can hear the stereo element depending on which direction the weapon is aiming. If it’s along the Y axis, I can hear it in stereo, but moving towards aiming it along the X axis, it quickly goes to mono. My spatializer sound size is set at 16, with 0 min extent. If I set the sound size to 0, then 3D sounds won’t normally play with any stereo element, but as soon as I start to increase it I get this weird angle-stereo issue.

Apologies if I’m explaining this terribly. Please help me understand this better because what I’m doing is likely wrong. And not sure what best practice is for this style of game regarding 3D mono and 3D partial-stereo sounds

This happens because extent is calculated based on distance on the x and y axes of the listener’s horizontal plane. The y axis runs parallel with the listener’s forward vector, the z axis runs parallel with its up vector, and the x axis runs perpendicular to both.

I assume your listener is pointed towards a patch of ground at or near the center of the screen. This means that when an event instance starts at this point and moves away along the screen’s X axis, the event instance’s position changes on the listener’s horizontal plane’s x axis. When it moves away along the screen’s Y axis, it’s moving on the listener’s horizontal plane’s z and y axes: z because it’s moving “up” or “down” from the perspective of the listener, and y because it’s moving either closer to or further away form the listener due to the angle of the virtual ground. Because only movement on the x and y axes counts for the purposes of determining distance between the event instance and the listener when calculating extent based on sound size, this means that movement on the screen’s Y axis results in a smaller change in distance for the purposes of calculating extent than movement on the screen’s X axis.

If you want to avoid or mitigate this behavior, there are a number of ways to do it.

One of the simplest would be to set Min Extent to a value above zero. This wouldn’t actually prevent event instances’ extents from changing differently when they move vertically relative to the listener rather than horizontally, but would make the issue significantly less noticeable by ensuring that event instances never actually reach zero extent and start to sound monophonic.

A more involved solution would be to set sound size to 0, but automate min extent on a distance (normalized) or distance built-in parameter. Unlike the normal extent calculation, distance built-in parameters do take into account the listener’s horizontal plane’s z axis, so automating min extent (and thus extent) on such a parameter would cause the behavior to be both correct and consistent. Creating the necessary automation curve would require slightly more work, but would also give you substantially more power to customize the way extent changes as distance increases.

Hey Joseph, thanks so much for the detailed reply and sorry for taking so long to get back to you. Do you know of any videos or resources online demonstrating this? I’m finding it quite difficult to wrap my head around what you’re saying. Would help me a lot to see this thought process explained with demonstrations or something of the like.

Kevin Regamey GDC talk on Tunic has a quite detailed discussion on how they applied listeners in the game and is in general a very entertaining and insightful presentation.