Niagara BeamEmitterSetup script BeamID flick between -1 and LoopCount.

When using ribbon renderer in Niagara, I found BeamID is -1 in some frame, which make the ribbon effect broke.

If change BeamID to keep same value when compare failed, the effect correct, is it right?

Hi huafu hong,

Thank you for bringing this issue to our attention. I was able to repro an odd behavior of the resulting effect in UE 5.3 - 5.7 and source versions with the following steps:

  1. Create a new Niagara System/Emitter based on the “Static Beam” emitter
  2. On the “Particle Spawn” Stage:
    1. Delete the “Beam Width” Module
  3. On the “Emitter Update” Stage:
    1. On the “Emitter State” Module, set “Loop Duration” to 0.5
    2. On the “Beam Emitter Setup” Module, set “Beam End” to “Random Vector” with (Vector Scale = 100, Recalculate Random Each Loop = true)
    3. On the “Spawn Burst Instantaneous” Module, set “Spawn Time” to multiples of a frame: 1/60, 2/60, 3/60, 4/60... The result is correct for an even number of frames, but incorrect for an odd number of frames

Your proposed fix seems appropriate, although I believe some extra testing must be made with different combinations of emitter lifetime “Loop Behavior” and “Loop Duration”, which can affect the evolution of LoopCount. I have filed an internal bug report about this so that the engine devs can take a closer look. Here’s the tracking number: UE-368844 (the link should become accessible once the devs mark it as public).

Let me know if there is anything else I can help you with.

Best regards,

Vitor