Playing a Niagara System in Reverse

Hey all again,

Been awhile and thanks again for all the help in past times.

So I wanted to ask everyone their thoughts on reversing a Niagara system, as in playing a Niagara system in realtime backwards.

From initial experiments I thought as it could play backwards in the sequencer, that I would be able to do the same in real time. However after investigation, it seems like technically when you are playing a Niagara system backwards its actually doing another sim, so in my situation that is not what I’m looking for.

After looking further into it, I have read about driving a Niagara systems not by time but by a value that I pass in.

The end goal is to be able to play a Niagara system by a parameter (set between 0-1) so that at 1 its the end of the systems life cycle and 0 is the start, so it can be played back and forth.

I wondered if this was a valid way of going? Anyone had experience in this or have a better recommendation?

All input is always appreciated, cheers all!

It sounds like something in Life Is Strange 1, isn’t it? I don’t have any actual experience in such effect, but I think UE 5.1’s new feature for Niagara “Simulation Cache” would interest you, but it’s an early experimental feature. There is no official documentation about it whatsoever, I don’t see any relevant resource in Epic’s Content Examples either, but I could be wrong. Even if you could get Sim Cache to work now, there is no guarantee it would work in the next UE update.

A rather primitive approach as you’ve already suggested is to use a float user parameter to act as a lerp alpha/curve index/time base to slide between the initial and destination positions of all particles. You can’t rewind velocity/force driven motion (not without Sim Cache anyway), so all particle movements have to be faked by direct manipulation of the binding position attribute.

I set the System attribute “CustomTime” in System Update stage so I don’t need to use a BP to control the user parameter or slide the time value manually. Again you’d expose the float value via user parameter and fetch the time value from blueprint.

1 Like

Hey @ifurkend,

Thanks alot for this. Really helped get me started.

I was able to drive a system using a user time and still using the same nodes plugged into them. So I was able to switch around the modules to get something that is working well (mostly by adding particle update nodes into particle spawn section).

My question now is I cant seem to get spawn rate to work with a user time. I cant add the spawn rate to the emitter spawn section like I did with other modules (or at least it didn’t work for me). I also tried configuring this section of the module to get it to work (by replacing delta time with my custom time with no luck):

I wondered if you have any insight into getting spawn rate working with a custom usertime variable?

You mentioned sim caches. I can record a sim cache, but how do you play a sim cache back? Do you use the same system?

Again thanks for any input!

Short answer: I don’t know.

Long answer: There doesn’t seem to be any official resources or example project of Niagara Simulation Cache so it’s all but a black box. I am not an Epic TA or familiar with any, so I just don’t have the time and resource to decipher something like that.

As for making spawn rate to work with user time, I don’t think so. You cannot kill a particle and revive it again (Although I have heard that it is possible under a very unusual circumstance, I’d rather not attempt it). First let me get it straight, my user time rewind method doesn’t work with velocity. I have to state that again because in your screen shot you still have all the velocity/forces modules in your “reverse demo” emitter.

My method also requires all the particles not to be killed until the Niagara System instance is destroyed externally.

What you can actually do is to fake spawn rate by delaying all burst particles by particle’s uniqueID: max(User.UserTime - Particles.UniqueID * ConstantRate, 0).

1 Like

Thanks for reply @ifurkend.

I was trying to implement the spawn myself but it seems to error when trying to access Particles.UniqueID.

Any ideas what im missing?

I don’t mean to control the spawn count, but to create a new float parameter in Particle Update stage “CustomTimeDelay” and replace the System.CustomTime in the particle position curve index.