Search Unity

Can timeline stop emission of particles?

Discussion in 'Timeline' started by dadude123, Apr 20, 2018.

  1. dadude123

    dadude123

    Joined:
    Feb 26, 2014
    Posts:
    787
    Hello,
    I'm using timeline to orchestrate a pretty complex particle effect.

    The problem I'm having is that timeline simply destroys the particle system after the clip is done, instead of letting all existing particles die on their own and then destroying the system.

    In the selected track (5) I'm repeating a particle system as long as needed, when the cursor reaches the end of the clip, it instantly destroys the particle system.



    I already tried all the clip options like "Control Activation", and setting "Post Playback" to "Active" for example. But it doesn't make a difference.
     
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    3,411
    Can you file a bug report? I recently made several changes to how timeline handles particles, it's worth looking into this as well.
     
    dadude123 likes this.
  3. dadude123

    dadude123

    Joined:
    Feb 26, 2014
    Posts:
    787
    Just in case this is related.
    Here's what I think should be happening, maybe we can figure out where my approach is wrong (or maybe where there's really a bug).

    I have two tracks, one is a particle system that's set to loop.

    Track (5) selected in the screenshot has its particles "destroyed", like there's no wait to let the particles naturally fade out.

    The second track (track 6) is a particle system that is set to not loop, but I'd like timeline to repeat the particle system anyway. That the particle system is made in a way so it emits for 0.25 seconds and then stops. If set to "looping" it would look right, but then it gets cut off by the timeline. (the particle lifetime is short in this system, so simply repeating the system itself instead of letting it loop on its own works fine; of course this is a special case, and when the particles are supposed to live much longer, this approach won't work anymore)
    The problem with this track however is, that it cannot loop. There's no setting in the track that would allow me to override the particle systems looping mode. And when I select the track it shows "hold" when it gets extended. Probably because its gets its "loop or hold" value from the particle system. It would be nice if we could override that though.


    I will try to strip down one of our scenes a lot so it still works to show the problem and then file a report.
    Should I file two reports for the different cases? Or just one that deals with all of this?
     
  4. dadude123

    dadude123

    Joined:
    Feb 26, 2014
    Posts:
    787
    I reported a bug along with a project to easily reproduce it in: 1028367
     
    karl_jones likes this.
  5. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    3,411
    Timeline does the looping by calculating the time and passing it into the particle system Simulate function, so it should be possible to just not loop the time value and go back to 0 after playing an iteration, although I'm a little unclear why you cant just do this with a looping particle system? Would it not be easier to create multiple control tracks for each loop point?
     
  6. dadude123

    dadude123

    Joined:
    Feb 26, 2014
    Posts:
    787
    You're right, it would be easier to just make it loop. The only reason why I even tried unchecking "looping" in the particle system was to try to find a workaround for the first problem. Thinking it would simply "pulse" the system once and then not cut it off.
     
  7. wagenheimer

    wagenheimer

    Joined:
    Jun 1, 2018
    Posts:
    81
    Is there some way of doing this? I also need to make the timeline stop the particle system instead of killing it.
     
  8. julienb

    julienb

    Unity Technologies

    Joined:
    Sep 9, 2016
    Posts:
    125
    Is the Control Activation option enabled on the Control Clip? If you disable this option, the particle system should stop but will still be enabled.
    ctrlClip.png
     
  9. wagenheimer

    wagenheimer

    Joined:
    Jun 1, 2018
    Posts:
    81
    @Julien
    I tried it, but It only works for non-looped ParticleSystems. For looped, it doesn't stop, it keeps playing.
     
  10. wagenheimer

    wagenheimer

    Joined:
    Jun 1, 2018
    Posts:
    81
    I was able to work around this by adding a key to ParticleSystemActive and setting it on and off.
     
  11. AdultLink

    AdultLink

    Joined:
    May 20, 2017
    Posts:
    4
    Is there any update on this issue? Seems like it's still happening on 2018.3.0f2.

    It's a pain in the ass since instead of a simple control track, now I have to write play and stop methods and call them through keys, which is bad for timeline readability, not to mention it takes longer. Quite an ugly workaround to be honest.
     
  12. wagenheimer

    wagenheimer

    Joined:
    Jun 1, 2018
    Posts:
    81
    Try A adding a key to ParticleSystemActive and setting it on and off on the TimeLine. You will need to double click to edit the track on animator.
     
  13. Arycama

    Arycama

    Joined:
    May 25, 2014
    Posts:
    81
    I'm also having issues with this still, ended up writing an entire custom playable track/mixer/clip system to work with built-in particle systems. Also I can't see any updates planned on the roadmap or similar, despite finally getting support for things like actually being able to change volume/panning for audio clips in 2019.

    To recap, a control track will start the particle system but disable the gameObject at the end, which causes the particle system to completley disappear instead of letting remaining particles die on their own.

    Alternatively, if you tell the control track not to disable the gameObject on completion, the particle system is just paused at the end and the particles remain visible indefinitely.

    Having to write a bunch of custom code to handle this should not be necessary.
     
    jimmyjamesbond, keni4 and dadude123 like this.
  14. jimmyjamesbond

    jimmyjamesbond

    Joined:
    Mar 17, 2015
    Posts:
    14
    It feels like I'm missing something. I mean, if you're Unity creating a particle control track the first thing you would do is play and stop, right?
     
  15. snoche

    snoche

    Joined:
    Feb 22, 2010
    Posts:
    57
    I am having the same issue, I start an intro with a particle that should be looping until I disable from another timeline but I can not make the particle to stay on and working. Any update or roadmap for this fix?