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

Volumetric Audio

Discussion in 'Assets and Asset Store' started by Darkcoder, May 3, 2014.

  1. BasicallyGames

    BasicallyGames

    Joined:
    Aug 31, 2018
    Posts:
    89
    Hey, I just bought this, but I'm having a really weird issue I can't figure out. I tried adding this to a prefab that gets instantiated at runtime, and then the size of the object's box collider and the object's position get set as the level generates. I'm not sure if that has anything to do with the issue, but what happens is, once the objects are instantiated, any objects that the VA_Audio Sources are attached to immediately teleport to the position of the AudioListener, and I can hear all sounds with the VA_Audio Source attached at once, no matter how far away I move from where the audio should be coming from. Each VA_Audio Source is attached to a child object of the prefab, and uses the box collider of the prefab as its VA_Box. I've tried messing with some settings, like checking "Is Hollow" (Which I don't want since I want the audio to play while inside the trigger), but that didn't help. Spatial blend is all the way to 3D, and the blend setting on VA_Audio Source doesn't make any difference either. Max distance is 10 and linear, and I've tried messing with the distance settings to no avail. Any idea what the problem could be?
     
  2. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,331
    Does this issue only occur when using prefabs? i.e. if you drop the prefab into your scene in edit mode, does it work?

    In either case, screenshots of the spawned prefab inspector and the sound child would be great.

    Also, which exact version of Unity are you using?
     
  3. BasicallyGames

    BasicallyGames

    Joined:
    Aug 31, 2018
    Posts:
    89
    I've tried applying VA_Audio Source to non-prefabs while in edit mode, but as soon as I hit play they do the same thing... Which seems really weird, honestly I thought that was likely the cause of the issue. I also just noticed that the VA_Audio Sources I put in the scene are moving towards the AudioListener in the scene even in edit mode! I can't even move the transform of any objects VA_Audio Source is attached to without disabling the script. I'm using Unity 2019.1.9f1. The demos work perfectly in this version, which makes this even more confusing to me. In play mode, some objects teleport instantly to the Audio Listener and sit on it, while others will follow the Audio Listener, but not fast enough to keep up if I keep moving the camera.

    Also, one thing I just found is that if I disable all but one of my cameras in a scene, I can move the object freely while in the editor, and it won't move back. Disabling all but one of my cameras doesn't seem to make any difference in play mode though.I have multiple cameras in the game that run at once, most of which are child objects of a main camera, which contains the Audio Listener. The main camera isn't a child of anything. I also have a global camera that isn't attached to anything, used for applying post-processing effects to the final image.

    Edit: Ugh, I just realized what the problem was. I had the VA_Shape attached to the same object as VA_Audio Source. I separated the two and now it works great. Thanks!
     
    Last edited: Jul 13, 2019
  4. NeatWolf

    NeatWolf

    Joined:
    Sep 27, 2013
    Posts:
    924
    Hi there @Darkcoder !

    I bought the asset a couple of years ago, but I haven't used it in production until now. I remember testing it and being pretty useful and unique!

    I see it hasn't received many updates lately - it's because it's still perfectly working with all Unity versions? (it's not a rhetorical question, some assets really just keep working with no issues even years after coding them)

    It's going to be black friday soon, so reading a "2019.2.x officially supported" in the last updates of the asset I suppose wouldn't hurt the sales - unrequested advice ;)
    (I should be doing the same, I know T_T)

    Cheers,
    Alex
     
  5. deanparker

    deanparker

    Joined:
    Sep 30, 2014
    Posts:
    7
    Any plans to update the shaders for UDP? 2019.3.x is showing Fuchsia color.
     
  6. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,331
    Yes, I’m working on an update that will bring this asset up to the standard of my others. I plan to finish this update by the end of the month.
     
  7. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,331
    Hey everyone,

    Version 1.1.9 of Volumetric Audio is now out!

    This updates all the code, documentation, asmdefs, demo scenes, etc to be in line with all my other assets.

    Let me know if you encounter any issues :)
     
    NeatWolf, DriesVienne, wxxhrt and 3 others like this.
  8. WILEz1975

    WILEz1975

    Joined:
    Mar 23, 2013
    Posts:
    368
    Hi.
    The tutorial shows the outdated asset?
    Now to use the areas (VA Box) I have to use the "Position" check on VA Audio Source.
    But, if I do, (if the areas are VA Audio Source children's, as for the capsules in the tutorial) the areas move around all the time.
    Actually what moves is the gameObject AV AudioSource. Being the childrens' boxes, they move with it. The boxes seem to go crazy and move.:eek:
    I wish they stay where I placed them.
     
    Last edited: Dec 2, 2020
  9. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,331
    It sounds like you have the VA_Box and VA_AudioSource components on the same GameObject, which won't work properly. Your VA_AudioSource should be in a child or completely separate GameObject depending on how you want to organize your scene.

    The tutorial video is really out of date. For now I recommend you look at the example scenes. I plan to make lots of new videos around new year's time!
     
    AthrunVLokiz likes this.
  10. ZeonIr

    ZeonIr

    Joined:
    Feb 23, 2014
    Posts:
    15
    love to know if is works with master audio? coos is no deal for me tell there support some sorta
     
  11. Dorn

    Dorn

    Joined:
    Mar 12, 2013
    Posts:
    1
    Hello,

    Is Volumetric Audio compatible with FMOD? I need to implement ocean sounds on maps with many rocks and islands, but i'm using FMOD for the project. FMOD cancels Unity's audio listener and uses its own, which means i can use the addon only if it works with FMOD.
     
  12. knas01

    knas01

    Joined:
    Feb 24, 2018
    Posts:
    233
    Hi @Darkcoder, same question as ZeonIr above. Apparently it works if the asset uses Unity Mixer channels or Audio Sources. So I wonder if this asset does?
     
  13. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    635
    Hello. There is a problem with Your system, If We created rivver that is around a hill, and player standing on that hill then when using volumetri mesh from it, it seems like audio source is kept in place of player even if ihe is far away from that river cause he is on hill, probably because river is all around him so Your system dont know where it exactly should place audio source?
     
  14. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    635
    It seems like the problem was that Game Object with VA Volumetric Mesh was scalled so it didnt worked properly then
     
  15. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,331
    Sorry for the late replies everyone, somehow missed these notifications!

    I don't have this asset so I can't say for sure. If it works using normal AudioSource components then maybe.


    If FMOD uses the Transform.position to position the sound then yes. For the other features like occlusion and spatial blend then you will have to modify the code slightly in VA_AudioSource.cs line 344:SetPanLevel, and 355:SetVolume, which should be easy to do.


    This asset adjusts the AudioSource component settings, it doesn't touch any mixer settings, so it should work?


    If your river mesh is actually shaped like a river then it should work, but if it's just a flat plane/quad that only looks like a river because it's intersecting the terrain geometry, then it won't work.
     
  16. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    635
    As I mentioned the problem was because object VA_mesh was scalled in unity transform, So there shoudl be info that scalling dont work proper with VA-Mesh ;)
     
  17. Fibonaccov

    Fibonaccov

    Joined:
    May 5, 2020
    Posts:
    58
    The sample links above lead to a 404 FYI.
     
  18. commonblob

    commonblob

    Joined:
    Apr 24, 2015
    Posts:
    20
    How does this compare to Steam Audio from a performance perspective.
    My main use case is occlusion and reverb based on geometry. It appears this can do it well, is that the real case?
     
  19. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,331
    Volumetric Audio is a high performance way to improve the Audio Source and related components with various tricks to adjust the pan/volume/etc. It's not a highly advanced realistic spatial audio system like Steam Audio.
     
  20. commonblob

    commonblob

    Joined:
    Apr 24, 2015
    Posts:
    20
    Thanks! Must have missed that ;)
     
  21. egutentag

    egutentag

    Joined:
    Nov 27, 2020
    Posts:
    14
    Tried to add the VA_audio source to the reverb zone and then the reverb zone started to move to the player and I can't move it, I was spouse to be at the center of the house:
    upload_2023-8-1_9-49-47.png


    I've sent mail 9 days ago.
     
  22. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,331
    Sorry, I'll answer your email now.