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

VFX graph to trigger audio

Discussion in 'Visual Effect Graph' started by thareeqroshan, Mar 6, 2020.

  1. thareeqroshan

    thareeqroshan

    Joined:
    Jul 24, 2019
    Posts:
    5
    Hi, im a sound designer trying to implement my sounds into the spaceship demo by unity. One thing i cant figure out is how to trigger an external script when a particle is emitted. For example i want a sound to be played everytime a random particle is spawned using the vfx graph.Can it be done using exposed parameters or even spawnercallbacks ? My experience in game programming is limited so i apologise if this sounds trivial to implement.
     
  2. PaulDemeulenaere

    PaulDemeulenaere

    Unity Technologies

    Joined:
    Sep 29, 2016
    Posts:
    134
    Hi,
    We are working on an Output Event feature to ease the retrieval of the spawn context output. It will be a part of 2020 cycle release but I can't provide you a more precise ETA yet.

    Meanwhile, using 2019.3 LTS, if you want to synchronise a sound and a VFX, there are two main solutions :
    - Control your SendEvent to the VisualEffect by script (for instance, with a Burst block in spawn context) and play your sound
    - Use a timeline and "Visual Effect Activation Track" to control when particles are spawned (but it will not be so random).
    These two approaches have been used in the spaceship demo.

    We are also preparing a breakdown presentation to explain how we have synchronized and played the VisualEffect in this demo.
     
  3. thareeqroshan

    thareeqroshan

    Joined:
    Jul 24, 2019
    Posts:
    5
    Thank you much for the prompt response. I ended up using single burst and sending sendEvent at random intervals from an attached script. Yes having a spawn context retrieval mechanism would be super helpful in the sound workflow as well. The unsynced sound for the sparkleburstAuto in the level was driving me crazy
     
  4. ThomasVFX

    ThomasVFX

    Unity Technologies

    Joined:
    Jan 14, 2016
    Posts:
    45
    Indeed, prior to this week's update, the SparkleBurstAuto was performing the spawn independently from the Sound activation. I made a change so that the random delay is now computed in C# instead of VFX Spawn. This enables also the use of flashing spotlights to emphasize on the sparkle bursts.

    As Paul said, our future ability to output events from a VFX instance shall help us move back all the random delay computation back to VFX and catch all this sync points at the component level to perform sound play and light flashing.
     
    Lars-Steenhoff and thareeqroshan like this.
  5. thareeqroshan

    thareeqroshan

    Joined:
    Jul 24, 2019
    Posts:
    5
    Yeah it's an unnecessary dependancy other wise . Would be cool to have the sound actually react to the complex vfx graphs and be semi procedural in a way. It's cool that you guys noticed that . Will check out the new update
     
    Lars-Steenhoff likes this.
  6. syros

    syros

    Joined:
    Oct 16, 2012
    Posts:
    2
    Hi, I was wondering if there is any new solution to this in latest update yet, cheers
     
    Lars-Steenhoff likes this.
  7. huseyindurak

    huseyindurak

    Joined:
    Mar 17, 2019
    Posts:
    5
    Are we able to push our particle along a path ? like pathflow
    Sincerely...