Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Audio soundscapes for environment/ambient noise in different parts of level?

Discussion in 'Audio & Video' started by begluka0, Jun 10, 2023.

  1. begluka0

    begluka0

    Joined:
    Jun 10, 2023
    Posts:
    3
    Hello guys,
    I'm not sure how I should implement soundscapes into my unity 3d project.

    By a soundscape, I mean that in different areas of the level you have different ambient sounds playing.
    Is there already an component/option in the audio source for this, or am I supposed to code it myself?

    I'm thinking of having trigger box colliders that define the area I want the sound to be playing in, and then activate the audio source in a script by using OnCollisionEnter() function, but is there a better way of doing this?

    I apologize if this question is an obvious one, I'm pretty new to audio in unity, and now that I'm finishing up my project, I have to learn how to do it.
     
  2. SeventhString

    SeventhString

    Unity Technologies

    Joined:
    Jan 12, 2023
    Posts:
    283
    Hi!

    There is no official component such as ambiance zones our zone random sfx. This is the kind of thing sound designers have the *pleasure* to implement themselves.

    Something I like to do for ambiances:
    • make a big box collider representing your "ambiance zone"
    • when the player is outside this zone, place an audiosource on the edge of that zone (closest point to the player) and spatialize this source
    • the closer you get, the more you shift the sound from 3D to 2D, until you're in there where it's completely 2D
    This way, you can get a sense of "where the ambiance is coming from" when you get closer and once you're in there, it is everywhere around you.

    Hope this helps!
    Cheers!
     
  3. begluka0

    begluka0

    Joined:
    Jun 10, 2023
    Posts:
    3
    Thanks for your answer! I will try looking into that.
    Pretty stupid a solution doesn't exist in the editor already...
     
  4. SeventhString

    SeventhString

    Unity Technologies

    Joined:
    Jan 12, 2023
    Posts:
    283
    I agree so much with this o_O
    I did take a stab at it on a side project, some of that code is here but I don't have a sample scene to showcase it yet... maybe there is some inspiration to gather form that, maybe it will just be more confusing... sorry if it's the latter! :p