Not sure if this is a niche use case, I found myself using it more and more and just thought I’d share!
A niagara module that lets you animate particles after the system has been deactivated.
Tutorial/node graph at the bottom.
Scenario #1: You have an infinite particle that is supposed to fade in and out based on whether the System is Active or not
Scenario #1 Infinite particle
In this example, the colors are just to help visualize the ‘states’
Green - system activated, fading in
Blue - done fading in and is now living infinitely (until system deactivation)
Red - system deactivated, fading out
Scenario #2: You have a System continuously spawning particles with very long lifetimes, however, in case the System Deactivates, you’d prefer to quickly fade out all the particles.
Scenario #2 Continuous Emission
In this example, the colors are again just here to help visualize things
Green - the particles are living their lifetime as they normally do
Red - system deactivated, fading out no matter the lifetime
I found that for me, in both of these scenarios, having a separate curve to scale/erode/fade particles in the Niagara System itself is the most convenient, rather than relying on outside parameters or spawning an entirely new system with its only purpose being to fade out. This has led me to create this Niagara Module.
How it works
The module works in conjunction with the default ParticleState module.
There is a single parameter in the module called InactiveLifetime.
By default it is not used and instead, the module stops Particle Age attributes from ticking until the System/Emitter is Deactivated. This means that anything you animate by NormalizedAge will run after Deactivation.
If you do use InactiveLifetime, the module won’t modify Particle Age attributes.
However, it creates two extra Particle attributes ‘InactiveAge’ and ‘NormalizedInactiveAge’.
These two parameters work the same way as their non-inactive variants, the difference is, again, they are ticked after System/Emitter deactivation.
NodeGraph / Module link
Feel free to modify or use it in whatever you like.
Also to comment something absolutely trivial that achieves the same thing without the added ‘complexity’.
One might also argue, that a module just straight up counting time could achieve the same things. (oh well)
In any case, some known issues as well:
The module has to be directly after ParticleState, if theres anything inbetween the two, NormalizedAge might tick up for a frame(?) (happened to me on UE4.26, haven’t tested on later versions).
Added the option to DISABLE killing the particle when InactiveLifetime elapsed (Advanced option, defaults to kill)
This can be useful for even more niche cases, where you do want to animate some Particle Attributes after the System Deactivates, but you’d also like to keep it’s full Lifetime.