After Effects Blink Expression - What It Does & How To Use It

The blink expression in After Effects toggles a layer's opacity between fully visible and fully invisible based on a mathematical condition rather than...

July 20, 2026
After Effects Blink Expression - What It Does & How To Use It
Affiliate Disclosure: Some links on this page may be affiliate links. If you make a purchase through one of these links, FreeVisuals may earn a commission at no extra cost to you. We only recommend products and platforms we genuinely believe in. Read our full disclosure policy.
Generate videos, images, music and voiceovers with AI + unlimited downloads
Start Creating Now!

After Effects Blink Expression, What It Does And How To Use It

A blinking effect shows up across a surprisingly wide range of motion graphics work well beyond animated character eyes, flickering neon signage, warning lights, hologram style interface glitches, and rhythmic text emphasis all rely on the same underlying on and off toggle. Building this manually with individual opacity keyframes works for a single, isolated blink, but becomes genuinely tedious the moment you need repeated, naturally varied blinking across an entire animation. A well built expression solves this far more elegantly.

Post Summary

The blink expression in After Effects toggles a layer's opacity between fully visible and fully invisible based on a mathematical condition rather than manually placed keyframes, most commonly built around either a Math.sin wave function for smooth, rhythmic blinking or a random, segment based approach for more naturally varied timing. This post covers both approaches in detail, how to build a genuinely natural feeling character eye blink, and creative applications beyond character animation including flickering signage, karaoke style text emphasis, and audio synced effects. It also includes a real video walkthrough, frequently asked questions, and links to Freevisuals resources worth pairing with this technique.

By Jack Wright, Founder, Freevisuals. Updated 2026.


The Simple Math.sin Based Blink

The most compact blink expression relies on the Math.sin function, which naturally oscillates between negative one and positive one over time, producing a smooth, repeating wave. Applied to a layer's opacity property, a simple version reads roughly as setting a blink rate variable, calculating the sine of time multiplied by that rate, and then using a conditional statement to output full opacity when the result is positive and zero opacity when it is negative. This produces a clean, evenly spaced, repeating blink without needing any keyframes at all, and adjusting the blink rate value directly controls how frequently the toggle repeats.

This approach genuinely shines for its simplicity, a single short expression handles the entire repeating behavior, but it does produce a mechanically even, perfectly regular blink pattern that reads as noticeably artificial for realistic character animation specifically, where genuine human blinking never falls into such a perfectly even, predictable rhythm.


Building A More Natural Random Blink

For character animation wanting genuinely convincing, naturally varied blink timing, a more involved expression tracks individual blink segments using randomized durations between each one. This approach typically loops through segments of time, using seedRandom combined with a minimum and maximum duration range to determine how long each gap between blinks should last, producing a result where blinks happen at genuinely irregular, unpredictable intervals rather than the perfectly even spacing a simple sine wave produces. Since human blinking averages roughly once every three seconds but varies considerably around that average, building this kind of randomized variation into your expression produces a considerably more convincing, lifelike result for character work specifically.


Video: A Complete Eye Blink Animation Walkthrough

For a full demonstration building a convincing character blink from scratch, watch How To Create Eye Blink Animation In After Effects, which covers the complete process from preparing your eye artwork through to a finished, natural feeling blink animation. This is worth watching specifically because timing a convincing blink involves subtle pacing decisions, exactly how quickly the eye closes versus opens, how long it stays closed, that are considerably easier to judge by watching a real example play out than by reading numeric timing values in isolation.


Applying The Expression To Multiple Eyelid States

For character rigs built with separate open, closed, and often squinting eyelid artwork rather than a single simple shape, your blink expression needs to coordinate across these multiple layers rather than controlling a single opacity value in isolation. A common approach involves applying your core timing logic to a single controller layer or slider, then having each individual eyelid state layer reference that shared value to determine its own specific visibility at any given moment, ensuring your open, closed, and any intermediate states never overlap or conflict with each other as your character blinks.

Building this kind of layered, multi state rig takes more upfront setup than a single opacity toggle, but produces a considerably more polished result, particularly for characters where the transition between open and closed states benefits from an intermediate squinting or half closed pose rather than an instant, binary switch between only two extremes.


Creative Applications Beyond Character Eyes

The same underlying blink logic extends naturally to a genuinely wide range of non character applications. Simulating flickering neon signage or a malfunctioning LED indicator uses the identical opacity toggle technique, often combined with slight randomness to avoid the effect reading as too mechanically regular for what is meant to look like a genuine electrical fault. Warning or hazard light simulation, an emergency vehicle light or an alarm indicator, similarly relies on this same rhythmic or randomized toggle applied to a colored shape or graphic element rather than a character's eye.

For karaoke style lyric videos specifically, a blink expression can highlight whichever specific word or line is currently meant to be emphasized, toggling a highlight color or background element on and off in sync with a track's actual timing, drawing a viewer's attention to precisely the right moment without needing to manually keyframe that emphasis for every individual line throughout a longer song.


Syncing Blink Timing To Audio

For effects specifically meant to feel reactive to sound, a sci-fi hologram interface flickering as though disrupted by signal interference, for instance, linking your blink expression's timing to an audio layer's amplitude rather than a fixed mathematical rhythm produces a result that genuinely responds to whatever sound is actually playing at each specific moment. This combines the core opacity toggle logic already covered with an audio amplitude reference, letting louder or more sudden audio moments trigger more frequent or intense flickering, while quieter moments produce a calmer, more settled visual result.


Adjusting Blink Duration Independently From Blink Frequency

A genuinely convincing blink expression should let you control two related but distinct qualities separately, how often blinks occur, and how long each individual blink actually lasts once triggered. A basic sine wave or simple random segment approach often ties these two qualities together implicitly, but a more refined expression separates them explicitly, using one value to control the gap between blinks and a separate, shorter value specifically for the closed eye duration itself, since a real blink typically closes and reopens within a fraction of a second, considerably shorter than the multi second gaps that typically separate one blink from the next.

Building this separation into your expression from the start, rather than retrofitting it after noticing your blinks feel too slow or lingering, produces a considerably more convincing result since it mirrors how real blinking actually behaves, long stretches of open eyes punctuated by genuinely brief, quick closures rather than a slower, more deliberate toggle that reads as unnatural once you know specifically what to look for.


Combining Blink Expressions With Easing For Smoother Transitions

A purely binary opacity toggle, snapping instantly between fully open and fully closed, can look somewhat abrupt compared to a blink that eases smoothly through a brief transition. For character work specifically wanting a more polished, less mechanical feeling result, incorporating a short eased transition into your expression, rather than an instant, hard cut between states, produces a noticeably more natural looking blink. This can be achieved by using a linear interpolation function within your expression to smoothly transition opacity over a brief window, rather than relying purely on a binary conditional statement that jumps directly between only two possible values.

This refinement matters most for close up character work where a blink is genuinely prominent within the frame, while for smaller, less central blinking elements, or for the non character applications like signage and warning lights covered elsewhere in this guide, the simpler binary toggle often remains entirely sufficient without needing this additional easing refinement.


Common Mistakes When Building Blink Expressions

A frequent mistake involves using the simple Math.sin approach for character animation specifically, producing a mechanically even blink rhythm that reads as noticeably artificial compared to genuine human blinking's natural irregularity. Another common issue involves forgetting that a blink expression's timing values are typically expressed in seconds, leading to confusion when a blink rate intended to produce a slow, occasional toggle instead produces a rapid, strobe-like flicker due to a misunderstanding of the underlying units involved.

For multi layer eyelid rigs specifically, a common error involves applying inconsistent or conflicting timing logic across separate open and closed state layers, resulting in brief moments where both states appear simultaneously visible, or neither does, rather than a clean, exclusive toggle between them at every point in time.


Pairing Character Animation With The Rest Of Your Toolkit

Convincing character animation pairs naturally with the broader expression techniques covered in our Bounce Expressions guide, since combining natural blinking with physically convincing secondary motion elsewhere in a character rig produces considerably more lifelike results overall. Our After Effects templates library is also worth browsing for character and title templates well suited to this kind of animated detail work. For premium templates and additional creative assets, Motion Array and Envato are both worth exploring, and for music to pair with a finished animated character piece, Artlist and Epidemic Sound are both genuinely strong options.


Frequently Asked Questions

Which blink approach should I use for character animation

The randomized, segment based approach generally produces more convincing results for character work, since it avoids the mechanically even rhythm a simple Math.sin based expression naturally produces, which tends to read as artificial for realistic human or character blinking specifically.

How often do real humans actually blink

Roughly once every three seconds on average, though with considerable natural variation around that average, which is exactly why a randomized rather than perfectly regular blink expression tends to look more convincing for character animation.

Can I sync a blink or flicker effect to music

Yes, linking your expression's timing logic to an audio layer's amplitude rather than a fixed mathematical rhythm produces a result that responds genuinely to whatever sound is actually playing, useful for hologram style or reactive visual effects specifically.

Why does my blink expression produce a rapid strobe instead of an occasional toggle

This usually indicates a misunderstanding of your specific expression's time units, often resulting in a blink rate value that is considerably faster than intended. Reviewing your specific rate or duration values against your actual intended timing in seconds resolves this.

Can this same technique work for non-character effects

Yes, the same underlying opacity toggle logic applies equally well to flickering signage, warning lights, karaoke style text emphasis, and reactive hologram or interface glitch effects, not just character eye animation specifically.


Final Thoughts

The blink expression demonstrates how a small amount of expression code can replace what would otherwise require considerable manual keyframing, particularly for any effect involving repeated, naturally varied on and off toggling. Understanding both the simple sine wave approach and the more involved randomized alternative gives you the right tool for whichever specific application you are building, a mechanically regular sine wave for signage and warning lights, or a genuinely irregular randomized approach for convincing character animation.

For character work specifically, layering in the additional refinements covered throughout this guide, separating blink frequency from blink duration, and incorporating a brief eased transition rather than a purely instant toggle, is what ultimately separates a technically functional blink from one that genuinely reads as convincing, lifelike animation to an audience watching closely.

How to use the Blink Expression

  1. Locate the Opacity Property: In your After Effects timeline, select the layer you want to apply the blink expression to. Press "T" on your keyboard, and this will bring up the Opacity property for that layer.
  2. Alt + Click: Hold down the "Alt" key (or "Option" key on Mac) and click on the stopwatch icon next to the Opacity property. This action will open up the expression editor.
  3. Enter the Expression: In the expression editor, you can type in or paste the blink expression. There are various ways to write this expression, but the core idea remains the same: to toggle the opacity between 100% and 0% based on specific conditions or timings.
  4. Fine-tune as Needed: Once the expression is applied, you can adjust parameters or conditions to get the desired blink frequency and pattern.

For instance, one method shared on Reddit involves using a mathematical function to check if the current frame is prime. If it is, the opacity is set to 0, and if it isn't, the opacity is set to 100. This method results in a fairly frequent flickering effect, which might be suitable for glitchy or digital effects.

Examples of Blink Expressions

Basic Blink for Opacity:

This toggles between fully visible (100%) and invisible (0%) every second.

jfreq = 2; // Blink frequency (times per second)
if (Math.sin(time * freq * Math.PI * 2) > 0) 100 else 0;

  • Parameter: freq
    • Adjust this to set how many times per second the blink occurs.

Blinking for Visibility:

For Visibility (true/false), you can use:

javascript

Copy code

freq = 2; // Blink frequency
time % (1 / freq) < (1 / freq) / 2;

This creates a toggle effect where the layer alternates between visible and hidden.

Smooth Flickering Effect:

For a less abrupt blink, create a flicker effect using a sine wave:

javascript

Copy code

freq = 5; // Frequency of flickering
amp = 50; // Amplitude for intensity
value + Math.sin(time * freq) * amp;

This expression works well for lights or effects that need a more natural pulse.

Why is this expression useful?

The beauty of using expressions in After Effects, like the blink expression, is that it gives you a lot of control without cluttering your timeline with keyframes. If you've set everything up correctly, you'll have all the options and avenues you'd ever want to achieve the right look. It's during this phase that you can make the majority of your creative decisions, such as timing, frequency, and even the intensity of the blink.

Common Uses of the Blink Expression

  1. Animating Lights
    • Simulating blinking neon lights or LED indicators for signage or UI designs.
    • Mimicking the on-off behavior of emergency or vehicle lights.
  2. Character Animations
    • Creating natural blinking movements for a character’s eyes in 2D or 3D animations.
    • Adding life to static characters by making their expressions dynamic.
  3. Visual Effects
    • Simulating warning signals, such as alarms or hazards, with a flashing effect.
    • Creating a strobe light effect for party or concert scenes.
  4. Transitions and Text Effects
    • Making text or shapes blink on and off to grab attention or emphasize elements.
    • Adding blinking effects to text in lyric videos, advertisements, or intro sequences.
  5. Digital and Sci-Fi Themes
    • Mimicking the flicker of holograms or glitchy computer screens.
    • Adding blinking effects to futuristic UI designs for immersive storytelling.

Creative Applications Of Blink Expressions

1. Neon Sign Animation

Blinking text mimics the behavior of flickering neon lights. Apply the blink expression to the opacity of text layers to create a realistic "faulty neon sign" effect.

Example: A store sign flickers inconsistently, giving an old-school vibe.

2. Emergency Alarms or Hazard Lights

For warning signals, a rapid blink with red or yellow hues can convey urgency.

Example: A sci-fi spaceship panel has lights that flash at specific intervals to indicate danger.

3. Character Eye Blinking

For a 2D animated character, use a blink expression to alternate between open and closed eyelid states.

Example: A cartoon character blinks every 3 seconds with slight randomness to feel natural:

blinkFreq = 0.3; // Blinks per second
timeOffset = Math.random() * 0.5; // Add randomness
if (Math.sin((time + timeOffset) * blinkFreq * Math.PI * 2) > 0.5) 100 else 0;

4. Text Highlighting

Use blinking to emphasize certain words in a lyric video or announcement. The blink effect can highlight a word momentarily, syncing with audio beats.

Example: A karaoke video highlights the current lyric by blinking it.

5. Holographic Displays

Combine a blink expression with opacity and distortion effects to mimic a flickering hologram.

Example: A sci-fi interface with flickering text or images as though disrupted by signal interference.

Tips for Advanced Blink Usage

  1. Sync with Audio: Use the Audio Amplitude feature in After Effects to sync the blink frequency with music or sound effects.
  2. Randomization: Add randomness to the frequency or timing for a more organic feel.
  3. Layer Groups: Use expressions to control multiple layers simultaneously, such as an array of blinking lights.