Very cool, I'll be giving this a try today in my maze game. Update: AMAZING! I'll have to add a video just for this change and you are definitely going in the credits.
You change the color of the light in the light properties, so there's no way you can modify it with a material function. You either need to do it in the light itself, or through the construction script in a blueprint.
Not bad! I have one issue though, I'm noticing between the time, sine, and flac nodes, we have a repeating flicker pattern going on. it becomes pretty clear the more you look at the flickering. how can we continuously randomize the flickering so the pattern doesn't become apparent?
It's difficult for it to not be a repeating pattern when using a sine node as it is a perfectly repeating waveform. You would have to use some form of noise to make it less noticeably repetitive, but it's also much more expensive. You could try using a cloud texture with high contrast and a panner to move it around.
This looks great! Is there a way though to randomize the flickering time so that it doesn't flicker at regular intervals? I found a tutorial showing that with blueprint but then i couldn't make it work in the sequencer, while having a simple light function material applied on the light could make it work easily. Thanks for any help you could give
Yeah, actually. I figured this out after I made the tutorial. Here's a link to a screenshot of my new lightfunction. I'll post a tutorial on it when I get a chance. imgur.com/a/UZoEow8
Hey! I'm pretty new to materials, mostly been doing backend dev stuff, so maybe this is an easy question. My one issue with this type of flicker is if you've got multiple sources they all get sync-ed up. Is there a way to add some sort of random seed or something to each instance of this so they flicker at different rates? I know I can make a bunch of different materials and have it randomly select from them, but i'd like to be able to dynamically do it. I'm not sure if i can expose a variable in the material instance to BP and have each actor feed it a number? Any suggestions? The Material Graph is foreign to me, lol
Yeah, so the Flicker time is what determines the speed of the flicker (it's allowing you to make the game time faster if greater than 1 or slower if less than 1), so if you make a material instance (right click in Content browser and choose Make Instance) then you can adjust the flicker time for any instance. If you want it to automatically choose a random time you can either use the Per Instance Random node which will pick a random value for every copy you put in the world, or instead of the Flicker time, use "random float in range" and then set the min to be .5 and max to be 2 or something like that and you'll get anywhere between half as fast to twice as fast.
Two options: there’s a Per Instance node that you can use to make the time different for each instance, or you can just use a “random float in range” for the time multiplier and set the min to something like 0.9 and max to 1.2 and each one will flicker at a different speed.
Is there a way to make it simply dim, rather than completely go black when flickering? My game is more stylized and having it flicker all the way to black doesn't quite match my scene.
You could use a sine node to drive a lerp node's alpha channel and then set your own values for A and B, with A being a constant of 1 and B being 0.5 for example. Then it's just going to blink between those two values rather than being derived directly from the sine's values.
If you want to make the flicker even less random, here's my updated Node Network: imgur.com/gallery/vfPOZ3q
Does this become expensive in performance if you have multiple light functions in the same area?
i took this even further and added light flicker as well, makes change color with every pulse, amazing tip thanks!
Good stuff! And thanks for posting an update! Legend
Very cool, I'll be giving this a try today in my maze game. Update: AMAZING! I'll have to add a video just for this change and you are definitely going in the credits.
This is great! Thank you!
brother I loved it. specially for it being quick to the point
Brilliant. This is exactly what I needed. Thanks.
This was super useful! thank you - I couldn't find anywhere else (I am a beginner) how to not have to flicker go back to black x
Glad I could help :)
Excellent tutorial, thanks
really helpful tutorial! thank you so much for this
i bit more randomness in the flickering would be nice
Thanks a lot u made my day
great stuff, really helpful
I can't seem to add a color changer to this set up, when I do it just makes the light stay white
You change the color of the light in the light properties, so there's no way you can modify it with a material function. You either need to do it in the light itself, or through the construction script in a blueprint.
Thank you so much for posting this, awesome stuff man!
Thanks, helped alot.
Not bad! I have one issue though, I'm noticing between the time, sine, and flac nodes, we have a repeating flicker pattern going on. it becomes pretty clear the more you look at the flickering. how can we continuously randomize the flickering so the pattern doesn't become apparent?
It's difficult for it to not be a repeating pattern when using a sine node as it is a perfectly repeating waveform. You would have to use some form of noise to make it less noticeably repetitive, but it's also much more expensive. You could try using a cloud texture with high contrast and a panner to move it around.
I actually came up with a better method to make it less random by combining 3 sine waves with different periods: imgur.com/gallery/vfPOZ3q
@@TorQueMoD Hey this is a waaay better result! Thank you for this update!
This looks great! Is there a way though to randomize the flickering time so that it doesn't flicker at regular intervals? I found a tutorial showing that with blueprint but then i couldn't make it work in the sequencer, while having a simple light function material applied on the light could make it work easily. Thanks for any help you could give
Yeah, actually. I figured this out after I made the tutorial. Here's a link to a screenshot of my new lightfunction. I'll post a tutorial on it when I get a chance. imgur.com/a/UZoEow8
@@TorQueMoD hey thanks very much for that, it's really appreciated 🤗 Will try this soon🤟🏼
@@TorQueMoD Did you ever post the video? Can't find it on your page
Hey! I'm pretty new to materials, mostly been doing backend dev stuff, so maybe this is an easy question. My one issue with this type of flicker is if you've got multiple sources they all get sync-ed up. Is there a way to add some sort of random seed or something to each instance of this so they flicker at different rates? I know I can make a bunch of different materials and have it randomly select from them, but i'd like to be able to dynamically do it. I'm not sure if i can expose a variable in the material instance to BP and have each actor feed it a number?
Any suggestions? The Material Graph is foreign to me, lol
Yeah, so the Flicker time is what determines the speed of the flicker (it's allowing you to make the game time faster if greater than 1 or slower if less than 1), so if you make a material instance (right click in Content browser and choose Make Instance) then you can adjust the flicker time for any instance. If you want it to automatically choose a random time you can either use the Per Instance Random node which will pick a random value for every copy you put in the world, or instead of the Flicker time, use "random float in range" and then set the min to be .5 and max to be 2 or something like that and you'll get anywhere between half as fast to twice as fast.
thank you
nice!
Does anyone know how to place several in the scene without them flickering in sync?
Two options: there’s a Per Instance node that you can use to make the time different for each instance, or you can just use a “random float in range” for the time multiplier and set the min to something like 0.9 and max to 1.2 and each one will flicker at a different speed.
Is there a way to make it simply dim, rather than completely go black when flickering? My game is more stylized and having it flicker all the way to black doesn't quite match my scene.
You could use a sine node to drive a lerp node's alpha channel and then set your own values for A and B, with A being a constant of 1 and B being 0.5 for example. Then it's just going to blink between those two values rather than being derived directly from the sine's values.
@@TorQueMoD Exactly what I needed. Thank you!
If i wanted to added multiple torches, how do i make the flickering be at different times?
Just create an instance of the material and adjust the flicker time and choose that as the Light Function you add to your light.
@@TorQueMoD So we need a new instance for every light in the scene?