Making a light blink

Hi All,

I hope someone can help.

I have been trying to make a light blink in UE4. I have followed the tutorials for making it blink on and off using delay in the blue prints. What I am trying to make, and cant get my head around it… is to make the light blink for 0.2 seconds, and then wait 2 seconds before blinking again. I’m trying to resemble the NAV lights on a plane.

Cheers,

Matt

You can do it in two different ways;

1- By using blueprints. Follow my graph;

Create a class BP. Add a point light to it. Make light initial visibility to not visible. (uncheck its visibility)

2- Create a light function (inside a material graph). Then add it to the light. (its a little tricky to work with a light function, since you need to work with time node and use trigonometric functions)

Regards,

Also you can make the light flicker randomly here.

thats totally not what the person was asking. they were looking for a blink at a regular interval. the other answers are more correct.

id also add that blinking lights can also be done with timelines rather easily.

It’s just a suggestion for Matt.

It’s just a suggestion for Matt, you never know what he wants to do.

Hey! here’s a demo I put together while building some elements for my game, the rate of flashing can be changed by increasing (less frequent) or decreasing (more frequent) the B value in the divide node!

Another option for a navigation light. in this BP I also have a sphere with an emissive texture in order to make the light visible, and a translucent sphere for the actual nav light when not illuminated.

this is a car blinker!

you neeed to set a retriggerable delay

Here is my ready to use implementation with debugging Print String. Not so graceful, but it works. Just add FlickerOnOff input in Project settings or replace FlickerOnOff with what ever you need in Level blueprint. Then press L key to turn Flicker on/off in the game.
In other way you can use Timeline with Loop checkbox in the timeline.

I created a full Light Function Material for Blinking Lights with Custom Timing.
I used the post of RabbitRunDev for inspiration.


Time On: Time the light should be Visible
Time Off: Time the light should be not Visible
Time Offset: Time Difference for several Lights
Time Offset Multiplier: Multiplies the Time Offset (Changes for each Light)

for Example use:
Time On: 0,25
Time Off: 0,75
Time Offset: 0,25

Time Offset Multiplier:
Light 1: 0
Light 2: 1
Light 3: 2
Light 4: 3

So now 4 Lights should Blink one after another with the same Timing but 0,25 sec Time Difference.

To use this Material you need to create a Dynamic Material Instance and Set the Values for Timing.

Update:
I have now added a smooth Blend In and Blend Out for the Light.
Use “Time Blend” to set the Blend Speed.