Download

Blinking Material

I followed this video tutorial demonstrating a blinking flash light.
https://www.youtube.com/watch?v=P14JEacr_ss
https://youtube.com/watch?v=P14JEacr_ss

pretty cool.

I was wondering what I have to modify and add to control the time the flash light is on?

I would like to simulate a blinking light, you can see on an airplane.
Usually, airplanes have a two second pause, and then the light flashes for maybe 1/4 of a second.

The video example doesn’t show, how to control the time of the blinking light.
Or the pulse. Instead of emitting light for an entire second, I would like to emit the light just for 1/4 of a second, or 1/2 of a second.

How can you control that?

Thank you so much for any little help,
appreciate it!

So, you can use sine by creating the math to run a sine period.

Probably what the video partially does.

You need to feed a time into the sine. The sine will then perform the sine math and create the oscillation that will power your material’s emissive multiplier.

If you need to change colors over time it’s a bit more complicated but the gist is

Time * frequency > sine.

The issue then is that a sine is constant, high low values repeat. So you need to only have the material respond to one oscillation. I would do this with an If statement.
if > 0 might work.

That will isolate the 1/2.
To change from 1/2 to 1/4 you have to reduce the value of 0 to something that fits, maybe -.5 idk.
The issue there is I’m not sure what values the sine would return, you have to do some debugging to find out.
It vastly depends on your frequency I think.

wow… that’s a lot of math for me… and I really suck with math… I guess that’s to much for me… any chance to download a material like that from a project file?

not really, but it’s not really math, you just connect the nodes together and see what happens.
There’s also this way, 0 math involved:
MaterialBlink.png