Announcement

Collapse
No announcement yet.

Sound occlusion

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • [UDK] Sound occlusion

    The engine has something to occlude sounds?

    I'm using a fasttrace to see if there is some obstacle, like a wall, between the player and the NPC who is talking. Then the soundcue volume is set to 50% and the subtitle is hidden.

    But the problem is when the occlusion changes when the sound is still playing. So I need to check it with a timer or in the tick, and this is expensive to use with large number of bots.

    Has the engine a way to do this automatically and more eficient?


    Provisional blog: http://cobaltudk.blogspot.com.es/
    Videos: https://www.youtube.com/user/cobaltudk
    Facebook: https://www.facebook.com/babylonprojectgame/

  • #2
    That's a tough problem. I've never heard of sound occlusion in UDK. But maybe something that might work is in the NPC's tick event, just check when its LastRenderTime was. If LastRenderTime <= DeltaTime, it's currently being drawn on screen. If something occludes it, LastRenderTime will go above DeltaTime and you'll know to reduce the soundcue's volume. This isn't perfect: The volume will also decrease if the player looks away from the NPC. But maybe that's acceptable behavior.
    Check out Himeko Sutori, the upcoming tactical RPG where you control armies of over 100 unique characters.

    Comment


    • #3
      Also, instead of all the bots constantly checking line of sight to the player's pawn, maybe do it the other way around. If the bot is within a certain distance of the player when it starts playing a sound, add it to the player's array of sound-making bots. Then make the player trace only to those bots.
      Check out Himeko Sutori, the upcoming tactical RPG where you control armies of over 100 unique characters.

      Comment


      • #4
        I don't know of any such functionality in the engine, and AFAIK even UE4 doesnt have it
        I guess you'll have to start adding up the tricks mentioned here

        to add to the pool of tricks I'll suggest using Nathaniel's suggestion of the array of bots heard by the player, and do your tick-based occlusion reducing it to 1 (or a few) per-tick.
        this way more bots only mean more delay in the occlusion checks, but never less performance
        Help me back! follow me on Twitter
        Developer of Elium - Prison Escape

        Comment


        • #5
          You may also want to consider using reverb volumes. They allow you to apply low pass filters to sounds eminating from outside the volume and vice-versa.

          Comment


          • #6
            Thanks, I wanted to know if the engine has anything before do the job. Coldscooter, I use reberb volumes in some interiors, but the map is to big and the number of houses with interior is too high.

            The solution sugested by Nathaniel seems to be the better option, so the player can adjust the volume ewery few ticks and only for the closest pawns.
            Provisional blog: http://cobaltudk.blogspot.com.es/
            Videos: https://www.youtube.com/user/cobaltudk
            Facebook: https://www.facebook.com/babylonprojectgame/

            Comment

            Working...
            X