Smoother Flickering Light

Hello. I am using the attached blueprint as a light function for a point light. I am working on a horror-esque puzzle game and wanted a flickering light for atmosphere, but no matter which of these 3 functions i try, it doesn’t look smooth. There’s either too much time as bright or there’s an awkward flicker in the middle that me and my team don’t like. Is there a better function? Or is there a better way to pull this off?

You get awkward flicker in couple of places because:

  • Frac will return 0 once the Sine value gets to full numbers (1, 0, -1)
  • Frac will return 1-x if fed negative values, so at the moment of transition to negative Sine values you will have an immediate jump to full brightness again.

If you want smooth fading of the light try something like this:

80308-untitled.png

The Divide and Add nodes will make sure you get full use out of the Sine spectrum (rather than from -1 to 1, you will get 0 to 1) for smoother results

1 Like

That looks a lot better! Thank you!