Hey guys! I'm trying to create a flickering light on a mesh in UDK (and believe me, I made sure to trawl the nets; this is a pretty common newbie request), and I can't quite get it. Instead of merely getting it to pulse, I wanted it to mostly be on, then flicker off/on, and back to on again for a while. The math part of…
Your adding of sines with different periods is a good idea. Suggestions: Your main on,vs flicker period should have a ceil as sprunghunt mentions. This will effectively make the sine wave a square wave. On or off only. For the flickering behavior try: constantClamp[0-1](sin(3/x)*sin(5/(1-x)) (where X is 2*Frac(time * some…
Thanks guys! Sprunghunt, I ended up modifying your solution; I put a ceil on the first Sine and a floor on the second. I also Added a +1 to the mix before it went into the Lerp to give it a 'boost' so when it lights up, it has a bit extra emissive glow. It's not perfect, but I like it so far. Vailias, when I have time, I…
another way of thinking about this -- maybe have the whole thing driven by a texture map? just scroll a gradient in one direction -- you can get super precise timing that way :)