Skip to main content
Participating Frequently
April 30, 2019
Answered

Realistic Neon Flicker [noob request]

  • April 30, 2019
  • 1 reply
  • 12839 views

Hello!

I'm fairly new to After Effects and I'm using the most recent update [16.1.1 (build 4)]

I'm trying to create a neon light that begins inactive, then flickers with increasing frequency, until it becomes 100% active.

I could animate each key frame, but I know there has to be a more efficient method. I know I can use the wiggle expression, but I can't find a way to animate the parameters to achieve this effect. I tried using the Slider Control, but that didn't work because I couldn't figure out how to make the effect go from inactive, to increasingly active, to 100% active.

I've seen several tutorials, but none of them show a way to do what I'm picturing. I considered clipping the layer and pasting an "off" version at the beginning, and an "on" version at the end, but I would genuinely love to learn and know if there's a way to accomplish my vision with a single layer.

Thank you for taking the time to read and respond.

This topic has been closed for replies.
Correct answer Rick Gerard

Bear in mind that neon is either on or off. It doesn't "fade" up and down, which is what all the various suggestions are doing.


If you want to get absolutely accurate about a neon animation there would be just a couple of frames where the start and end of the tube would have a different intensity and color as the AC voltage is applied.  Neon light flickers all the time at the same frequency as the current. Try shooting a neon sigh at 100 fps and see what you get. When designing a visual effect it is always a really good idea to look at some actual footage of the thing you want to create. There is lots of footage of neon tubes available.

My point is that a realistic startup always involves an arc pulsing at the start and end of the tube to get the ionized gas to light up. If the power supply is tired the arc will start and stop causing the light to flicker on and off as the arc starts and stops, but there is no difference in the intensity. The arc always makes noise, and the transformers handling the load almost always also make a little noise and that sound reinforces the visual effect of the startup flicker.

This video has a closeup of the electrode energizing the neon.

Unfortunately, the random time expression would not give you anything that actually looks like a neon tube flickering as it turns on. A similar approach to the expression I already posted would give you the on and off startup required to create a fairly realistic neon light startup. Modifying value1 and value2 to zero and 1, then multiplying the result by 100 would do the trick. Something like this:

If I wanted a one-second random startup for a neon tube without the other nuances that would sell the effect I might use this expression:

t = easeIn(random(time,5)/2,0,1);

Math.round(t)* 100

But the effect would be much more believable if you synced it to an audio effects track.

1 reply

Kyle Hamrick
Community Expert
Community Expert
May 1, 2019

There's definitely value in learning how to do things with expressions, but this example is short enough that keyframes are probably the best route.

Participating Frequently
May 2, 2019

Thank you for taking the time to respond

That's fair, but I would really like to know how to do this for my own knowledge. I just learned about the random() expression, so I'm going to give that a try.

Participating Frequently
May 10, 2019

Random and Wiggle will be hard to control and time. If it were my project I would first create an audio track with using stock audio FX of a neon light turning on and flickering. Then I would convert use the keyframe assistant to convert the Audio to Keyframes, select both channels and apply a linear(t, tmin, tmax, value1, value2) expression to the properties that would drive the flickering. You can use the Graph editor to examine the values of Both Channels and then pick the point where you want the flicker to start. Here's a typical section of one some stock footage of neon lights I have in my library:

Hovering over any point in the graph will tell you the exact values. Here's a project that I did in about 3 minutes:

Nothing more than Fill with opacity controlled the expression + Bevil Alpha + Glow applied to a Text layer pre-comp. I actually did not need to pre-compose the text layer. It's just two copies of the same text with one set to a white fill and a black stroke used as a Luma track matte for the other dark red text layer with fill only so I could make the font look more like a tube.

A little more work on lighting effects and maybe some subtle lens flare and I'd be happy to deliver it to a client.

I picked values for tmin and tmax that were close together because neon lights don't do much dimming as they turn on. You could change the value2 to 1 then add Math.round() to the expression if you wanted a turn on and tun off, but I think this looks better.

Here's the expression I used for the values in my audio file:

t = thisComp.layer("Audio Amplitude").effect("Both Channels")("Slider");

linear(t, 1.3, 1.5, 0, 100);

Anytime the audio level goes above 1.3 the light starts to turn on, by the time the audio gets to 1.5 the light is fully on, and it never takes more than two or three frames for the tube to light up.

The advantage of this workflow is that you make the effect more believable by reinforcing the flickering neon effect with audio, you don't have to worry about sync, you can precisely control the audio level that will turn on the lights, and if needed, you can slide the Audio Amplitude layer a little to the left or right to give the light a little time to react to the sound.

I hope this helps. Random and wiggle will give you a flickering neon tube, but this will give you one that is far more realistic.


Okay, so (after watching a bunch of videos) I came up with this expression, and it works! I feel pretty confident that this expression has redundancies and/or isn't the most efficient way to do it, but it works. If anyone has any corrections or pointers, I would love to hear them. Thanks again for your help!

easeIn(random(time,2)/2,0,100)