I love this video and I strongly suggest your course to all who will read this comment! Finally someone who explain the things in a real context. Starting from this video I'm working on my occlusion script, I've a lot of free time while I'm furlough. I'm trying to script something that can move the sound on a virtual position and allow sound gates but less expensive (and fancy) than steam audio. Thanks for all your efforts mate.
@ScottGameSounds4 жыл бұрын
Hey Emanuele! Thanks so much for those kind words! Your comment really means a lot! Awesome to hear that you're using this to develop your own scripts. Good luck with the sound gates part. I've tried making those myself in the past and they can be very tricky. Looking forward to hearing how you get on with them.
@themuffindragon4 жыл бұрын
Awesome tutorial! I loved the in depth explanation of how the script works. I'm pretty new to FMOD and learned a lot. Obviously it probably could have been cut down a little bit but it was very informative all the same.
@ScottGameSounds4 жыл бұрын
Yeah kinda whet over board on this one hahaha, but I'm happy to hear that you found this video helpful Dragonite! I think it's one of my favourites
@MikeLCF4 жыл бұрын
Just a small correction! When the direct sound is not obstructed, but you have obstrucions around it (obstructing mostly reflexions coming from the source room) is not OCCLUSION but EXCLUSION! Good work!
@ScottGameSounds4 жыл бұрын
Yes, you're correct Lucas. Thanks for pointing that out. I wasn't aware there were different terms separating the differences until after I made this video. I hadn't even herd of OBSTRUCTION before, let alone EXCLUSION. I was just referring to it all as OCCLUSION haha. Thanks for the comment.
@MikeLCF4 жыл бұрын
@@ScottGameSounds You did an awesome job! Thank for sharing! I just wanted to put that info there because if people know the terms it's easier to research =)
@rickveldkamp42172 жыл бұрын
Absolutely love the videos! Mine's not working unfortunately, I'd love some help! I had to change some things to resolve some errors: Line 9: Obsolete [EventRef] replaced with: public FMODUnity.EventReference Event; Line 34 & 39: Had to manually set the events in the script by using the event path because SelectAudio wasn't working for me (because of the obsolete [EventRef]) Line 40: Had to change the outdated getMaximumDistance (out Maxdistance) to getMinMaxDistance (out float MinDistance, out float Maxdistance). Line 42: Had some problems with the Fmod studiolistener not being found, and getting a NullReferenceException as a result of that. This somehow resolved itself. The issue I'm having is that I cannot see any lines either in the gameview and sceneview, I imagine that's why it's not working, but I have no clue how to resolve the issue. I also do have some other scripts on the FPSController and FirstPersonCharacter GameObjects, but if I deactivate them nothing changes. So yeah, I'm lost. I'd owe my life to anyone who'd be able to help me. Update: I managed to get the lines to be cast, problem was line 51: somehow the listenerDistance
@tomstan30372 жыл бұрын
Hi ! Thanks for you updates! Did you find your problem with FixedUpdate ?😁
@jakobw.7405 Жыл бұрын
getMinMaxDistance (out float MinDistance, out float Maxdistance) has to be without the float or a second "Maxdistance" variable is created. for me this line works: getMinMaxDistance(out float MinDistance, out MaxDistance); also leave the " listenerDistance
@hvarv6 ай бұрын
Hi Henry! Great video as always! Do you have a similar solution for Unreal Engine or any resources you can guide me to? Thanks a bunch for your tutorials!
@OrnateOwl4 жыл бұрын
You are so good at what you do! Put aside the fact that I was looking for exactly this specifically on Fmod, your explanation, your clarity, your experience, I love it all! Subfrigginscribed.
@ScottGameSounds4 жыл бұрын
WOW Thanks so much! What an amzing compliment to receive. I think that's made my day! So happy to hear that you found this video helpful! I hope I can make more videos that are just as helpful to you!
@OrnateOwl4 жыл бұрын
Scott Game Sounds you already did make many such videos! I'm going on a marathon on your Fmod tutorials soon. Maybe will buy the course as well at some point. Big thank you for expanding our Unity + Fmod learning resources, friend.
@Injabsful11 ай бұрын
what about on top or beneath a player, like limiting if im in a second floor theres a source on third and first can you distinguish them ?
@drummsnikk50732 жыл бұрын
this is majestic.
@gregsmith802 жыл бұрын
Why are we working out the listener positions with congruent triangles and not just adding or subtracting the occlusion widening variable to the listener's position? I haven't tested this yet so I genuinely don't know if it will work, but I see no reason why it wouldn't. The sound source positions can be cached on awake as well (update the positions in the occlusionWidening variable's setter if you want it to be dynamic). Great video, though. Thanks!
@adrianguzman80933 жыл бұрын
Fantastic videos. Top tier content!
@ScottGameSounds3 жыл бұрын
Wow what a great comment to read! Thanks a bunch Adrian!
@atokenbeast39272 жыл бұрын
you dont have a discord so i hope you answer it here, In the quantum break example they had a trace going from the emitter to the player but everything else went from the player to listener. First, why? Second, what was the center(yellow) line for(going from emitter to player)
@jacobvalenzuela25462 жыл бұрын
I couldn't get it to work. I'm getting an error: Assets\FirstPersonOcclusion.cs(40,18): error CS1061: 'EventDescription' does not contain a definition for 'getMaximumDistance' and no accessible extension method 'getMaximumDistance' accepting a first argument of type 'EventDescription' could be found (are you missing a using directive or an assembly reference?)
@MotionMenace22 жыл бұрын
Im getting this too, not sure how to fix it.
@jakobw.74052 жыл бұрын
same issue
@VKametlik2 жыл бұрын
Anyone found a solution? I'm running into the same problem. Using FMOD 2.02, could that be the root of the issue maybe?
@MotionMenace22 жыл бұрын
@@VKametlik i ended up implementing steam audio instead. How ever be careful, using the real time reverb with either fmod 2.02 or my unity version 2020.327f it crashes. Occlusion and everything else is working as intended it seems :) Steam audio is the shit, look into it!
@VKametlik2 жыл бұрын
@@MotionMenace2 awesome thank you 🙏 I'll be sure to look into that! Appreciate it
@TungNguyen-rk1pf Жыл бұрын
tks man, its really help me
@ManaforceStudios3 жыл бұрын
Wouldn't this be very resource intensive in a fully built game?
@Xiaoxiao7384 жыл бұрын
OMG Face Reveal!
@ScottGameSounds4 жыл бұрын
Yep! New year, new facecam!
@handsomelessking9 күн бұрын
Heey, first of all amazing code, if you dont mind i converted it to work in unity's default audio system (was pain to make Reverb Filter work like a float), and can i release the code on github?
@MaximeLennoz4 жыл бұрын
A great Thank You from france !!!
@ScottGameSounds4 жыл бұрын
Aw, thanks a lot Maxime! You're very welcome from England!
@WangleLine4 жыл бұрын
Oh hey, that facecam is new!
@ScottGameSounds4 жыл бұрын
Yep. A christmas present I'm trying out.
@mf8134 жыл бұрын
Thank you man! it's work!
@ScottGameSounds4 жыл бұрын
Ah wicked! Great to hear mf813. Thank you for your comment, and hope you enjoyed the vid :)
@AlicaKnirsch Жыл бұрын
when i Use this Script in JetBrain Riders, the Line 42 "getMaximumDistance" is marked as an error. I dont know exactly why and how to fix it. If somebody knows pls help :)
@angusmccall3400 Жыл бұрын
Replace the whole line with "AudioDes.getMinMaxDistance(out float MinDistance, out float Maxdistance);"(credit to Rick Veldkamp)
@laurena2274 жыл бұрын
Great stuff!:D
@ScottGameSounds4 жыл бұрын
Thanks a lot Cainapp1e!
@oscarcorral14284 жыл бұрын
Phenomenal!
@ScottGameSounds4 жыл бұрын
Awesome! Glad you think so Oscar
@emmetwhite21534 жыл бұрын
Hi, I'm running into a problem and can't seem to get this to work. I'm not seeing the lines cast in the editor view for starters and even with adding the "Occlusion" parameter in FMOD I'm not achieving the result of the sound being occluded at all. Any help? Really enjoying the videos and they are going a long way to getting me informed in this realm.
@emmetwhite21534 жыл бұрын
Seem to worked out the problem. I didn't have the obstructing object have a rigidbody component
@ScottGameSounds4 жыл бұрын
Great to hear Emmet! Thanks a lot for your nice comment :)
@SoundQuest_SD3 жыл бұрын
you're the best! ;)
@ScottGameSounds3 жыл бұрын
No you're the best!
@hankvananhalt75033 жыл бұрын
Hello Scott, Really good explanation, it helps me alot with my current project. I need to seperate the ears/channels of the fmod listener and therefore it is necessary to implement two listener. You mentioned to just add this script to every sound emitting object und check the listener index (this value is assigned automatically in Fmod 2.00+). private StudioListener Listener will contain multiple Listeners, so i needs to be an array, right? Then, how I do access a specific listener inside the Listener Array for the different listener distances? Thank You for Your help, good work!
@hankvananhalt75033 жыл бұрын
Got it to work. Simply declare the listeners as an generic List and assign Listener = FMODUnity.RuntimeManager.Listeners; in start(). Then set ListenerDistance of Listener[0] and Listener[1] (in case you use two listener).
@ScottGameSounds3 жыл бұрын
Oh wow so you've managed to set this up for two differetn l;isteners? That's wicked! I didn't even know how to do that! That could be so useful for multiplayer games. Thanks a bunch for sharing Maximilian and sorry for the late reply to your comment.
@hankvananhalt75033 жыл бұрын
@@ScottGameSounds correct, I use your script for two listeners. Just grab the List of Studio Listeners, that fmods runtimemanager creates when using various fmod listener in unity. Fmod automatically assign an index to every present fmod listener. this index can be used to access the different listeners within your script. Also, I managed to kind of separate the two listeners in left and right ear. By default, every listener got two ears (like a stereo mic). Two Listeners would simulate 4 ears, so I pan the sound source hard left or right by checking which listener index/ which ear is in the emitting area of the sound object.
@ScottGameSounds3 жыл бұрын
@@hankvananhalt7503 damn that's so cool. Thanks Maximilian, I really appreciate you sharing that with me! If I make a video about multiple listeners I'll be sure to shout your name out. Hope you come up with some more cool ideas in the future!
@jackchen21932 жыл бұрын
cool man
@chadfranklin474 жыл бұрын
Who is snoring in the background?
@ScottGameSounds4 жыл бұрын
hahaha that's my dog Vinny. He's a french bulldog with very narrow nostrils so he snores louder than I do.
@chadfranklin474 жыл бұрын
@@ScottGameSounds Lol. Thanks for the tutorials :)
@SubjektDelta2 жыл бұрын
if you do not want to do all this work... use steam audio for fmod and unity.
@djwaterduck91902 жыл бұрын
I wish it was that easy, but FMOD and steam audio doesn't mesh well imo, the reliance on the event emitter for every sound, as well as not being allowed to ever stop the emitter is just a hassle. It's a bit rough and hampers my workflow.
@SubjektDelta2 жыл бұрын
@@djwaterduck9190 sure it's a bit rough but it also works amazingly well. Just keep their documentations open and you'll figure out how easy it actually is. It's a tool, just learn to use it!
@djwaterduck91902 жыл бұрын
@@SubjektDelta Warning, wall of text that no one asked for: Of course, don't get me wrong, I have gone through the documentation, I do believe I have it down how it all works, as I have made every example of theirs work. I think some of the problems I have are connected to being a third person game, for example, 2D player sounds that I want to be diegetic and use reflections, but if I want reflections to work on a sound, it obviously needs the steam spatializer, which makes the sounds 3D (again obviously). Since my listener is on the player, but pans with the camera though, it will pan the sounds that are on the listener as well, which I rather not as it gets messy. Unlike the standard spatializer, I can't find a control for panning either as to disable it completely. Having to use an emitter for every sound becomes a bit of a hassle. If I have multiple sounds in a script, wanting to avoid each sound having it's own script, the only solution I found was to make a child with an event emitter for every sound, reference them all in one script and so on. A bit ugly, but it would work all the same. But since emitters only have 1 instance attached, what if I want more instances to play on top of each other? With only 1 emitter, the event would always restart if a sound is played in rapid fashion. So I need extra emitters now, just to play multiple instances of 1 sound, and some sort of sequence in the code to play the first emitter, then if triggered again, play a second one and so on. Even messier, even if it works. I'd so much rather be able to just create instances in code as usual. I have other struggles as well. But the absolute reliance on the event emitter and the issues therein, and the fact that I can't disable the emitter without also disabling steam audio functionality like reflections and occlusion on that source for the rest of session. I just wish the steam audio plugin meshed better with how to do things in FMOD usually. I also find reflections to be a bit wonky sometimes, bouncing a sound around so much I can hear it more than double the distance of the attenuation. Probably with more experimenting, and using it differently, I'd get that to work how I want though. Same with occlusion, it's great and all, automatic occlusion, hurrah! But it can cut very sharply just going around the corner of a wall, implementing it on my own I could ensure it would fade in FMOD, making it a bit less rough at times. That said, if I got the rest to work well, I wouldn't mind most of the time. Haven't had too much time to mess around admittedly, and I gotta move on soon (for now at least), but I just feel like I have more success at the moment using my own solutions. Seeing as you have used it yourself, maybe I am just completely lost and you have found way better solutions than me. But for now, while steam audio reflections and occlusion are cool, all these workarounds to get it to work like I want, and then barely or just missing the mark, I'd kinda rather not. :/ Really cool tech, especially being free and all though!