Niagara: Looping beam with infinite lifetime

Hi,

what’s the correct way to create a simple beam with infinite lifetime?

In cascade I’d simply create a beam with a lifetime of 1 and an infinite looping emitter with a duration of 1. I did this in Niagara but after each loop you can notice a single frame without a particle on the screen and you see when the current loop ends. My workaround is to create a particle with a very long lifetime like 5000 or so. But what’s the intended way to achieve this looping behavior?

Thanks,
Daniel

Bump! I also can’t figure out how to have infinite life particles without getting that flicker (particles visibly disappear and re-appear every loop).

why not just use a cylinder static mesh with an emissive material?
Turn off Shadows and collision, unless you need it, and just set it to overlap only

Bump… Just encountered this problem also. I’ll use the large duration for now but a solution would be nice. If I ever figure it out ill post ill post the solution on here. The reason I want to use Niagara instead of a static mesh is because while its a simple beam now I want to add other variations and effect to it and it seems like doing it with the Niagara system will give me more options and better visual effects.

1 Like

There’s an option to destroy the emitter once the lifetime ends, and one to allow “unlimited” lifetime.
can’t recall where it is at (my guess is emitter settings), but I would bet that’s where you need to look to keep the beam active.

There is an option under the emitter state called loop behavior, you can set it to infinite, loop or once. The problem is on infinite between the end of the loop and beginning of the next loop it stops emitting particles for a frame and resultants in a flicker. I am not sure if it has something to do with the initial beam set up or it’s just a glitch.

I have also tried setting the “Lifetime” in the particle spawn module to a higher and lower number then the “loop duration” and it either causes a longer flicker or a brighter pulse. That’s why I thought it might be something in the way the (Ribbon) beam particle spawns and how it’s not at its full brightness on the first few frames or something. I don’t really know, but I’ll look into that some more later.

I am also very new to Niagara. The unlimited lifetime option, I don’t know where it is or how to implement it yet.

I will keep searching for the solution.

… its probably translucent so, more ribbons = brighter?

Anyway the problem seems to be that the beam takes time from starting to reaching its full size, so you would have to use a never looping cycle that never dies off…
there is an option to get particles to not be removed. Perhaps try that?

Solved - Found the right configuration of options to get a constant unblinking Beam (Ribbon) particle.
Checked the Interpolated spawning in the emitter properties.
Changed some options in the Emitter State, shown in the pic below.
Under Particle state, you need to uncheck the kill particle option before the others show up. Then check the loop particle option.
I believe there was an extra color module that I removed to not 100% sure on that.
Seems to work fine for mesh particles also

7 Likes

Thank youuuuu <3

Thank you @Seed_37

You probably did remove the color field. I found that was my issue. Specifically I didn’t know there was a curve graph controlling the color so mine was pulsing. Drove me crazy until I went through every option and found the graph.

I changed my curve keys to linear and set the value constant at 1.0, now no pulsating!

image

At the moment I use a custom expression on Particle State Lifetime:

System.CurrentLoopDuration + Engine.DeltaTime

This adds 1 tick to Kill time and therefor it will overlap just 1 frame. With translucent objects this almost unnoticable in-game (at least in my case). At least it does not blink.

I’m still looking for a better solution though. I find it kind of frustrating the Niagara system is simply not suited for this type of behaviour. It begs the question, is it actually better to have (simple example) a health pickup rotating at Niagara level, or is it better to do this at blueprint level with a ‘rotating movement’ component or with nodes (set actor/component rotation). I kind of prefer the Niagara way but I have no actual data about performance cost. I just think the Niagara GPU Compute Sim would be better but that’s just an assumption. Can anyone shine some light on this? Because if there is no actual performance difference I’d rather revert back to the classic node based solution.

1 Like

I may come a bit late for this thread…but i found the solution.
At the “Initialize Particle” section, set lifetime to “CurrentLoopDuration”
image

Then, at the “Emitter State” section, set the Inactiva Response to “Complete”, the Loop Behavior to “Once” and the Loop Duration Mode to “Infinite”

image

1 Like

Go to particle state and uncheck kill when life time has passed

1 Like

Then it will just keep adding to itself infinitely? This never worked for me. Maybe in some cases it could work if a single particle or beam would be constant. But I like to give it some fluctuation in width or brightness/opacity with a sinusoidal curve. This means it needs to repeat itself constantly and therefor it needs to kill itself and spawn a new particle/beam every fraction of a second. Without killing it will just accumulate over time right?