[UE; Niagara] Animating particles after System Deactivation

Not sure if this is a niche use case, I found myself using it more and more and just thought I’d share!
TL;DR
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
InfiniteParticleExample

The setup:

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
ContinuousSpawnExample

The setup:

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

BlueprintUE link (5.1)




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).

Update 1.1

BlueprintUE link (5.1)

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.

12 Likes

Hi Guraoz,
Just wanted to say : thanks for sharing this ! Never thought about looking for such feature, but now that I read your post I think it is a very good idea indeed. I’ll give it a try !

You’re welcome! Hope the explanation made sense!
If you happen to run into issues don’t hesitate to let me know!