Hello,
I’m currently working on a multiplayer mod (Nitrox) for Subnautica.
The task I’m focusing on is syncing sound between instances but for a moving vehicle.
In vanilla Subnautica, this sound is set as 2D as it’s supposed to play as an “ambiance” sound when you’re driving the vehicle, but I need the sound to be in 3D for the other players that are outside of the vehicle.
Subnautica’s sounds are events located in banks, so I wondered if it was really possible to create a new instance of the existing event (from the bank) but to make it in 3D.
In the case it’s not possible to duplicate an event and to modify its description, is there any other option ?
Thanks in advance,
Tornac
Thanks for replying !
I’m not really used to FMOD systems yet, can you precise a bit more your answer please ?
(I may also precise that I want to make the modifications at runtime and that I can’t modify the pre-existing banks)
In fact my first answer wasn’t appropriate!
What if you simply play with the sound size? If it surrounds the player which is driving, it will sound 2D for him, but it will sound spatialized for other players.
Which version of FMOD studio are you using?
I’m not sure to understand what’s the “size” of the sound.
Well, I’ve already tried many different things, from playing an event instance at a specific place (with 3D attributes) to adding an emitter to play the sound but it will always play the sound in 2D.
Subnautica uses FMOD 1.10.12
Also, I’m only focusing on the 3D sound part, so this is why I wouldn’t mind having a duplicate entry of the event that will be in 3D
If you’re working on an initially 2D event, you just have to add a spatializer in the effect chain of the master track of the event, to make it 3D. You’ll find the sound size on the spatializer’s settings. Make it big enough to surround the driving player.
Ok thanks, I’ll look into how to add the spatializer and come back here when I have an update
May I just ask if this is doable at runtime ?
Not sure! Aren’t you able to modify fmod built event?
Well, it’s a mod so I shouldn’t be able to modify the bank file. So my only option is to modify the event at runtime. Also, we’ve decided not to add a sound file to solve the issue because in the end it will be way heavier. So I just needed to know if it’s possible or not to make the modification at runtime without touching the original files.
I don’t think it’s possible, though I could be wrong…
I’ve made lots of researches about this on the internet and didn’t find any way to do it so I just wanted a last confirmation that this couldn’t be done.
Thanks for replying, and have a good day !
Since you don’t have access to the original FMOD project, my first thought was for you to actually generate new banks (you’ll need a second master bank as well I guess) with an additional project - so, make a new event that references the 2D event, but that has a 3D panner - but then actually I guess you’d still need access to the original FMOD project…in order to be able to reference the event at all…so maybe that’s a no go…
Alternatively, you could handle the attentuation code side. If you can track the distance and position of the sound source, then you could simply manually set the volume with instance.setVolume (I think). Not sure how you’d handle the panning but I imagine there might be a way…?
Good luck!
Because I spent too much time on it, my solution was just to modify the volume depending on the distance of the object so it’s still better than having the song play loud even if it’s far from us