Skip to content
TheChatArchiveThe Chat Archive
gpt-4o-2024-08-06· OpenAIAi2 WildChat-4.8M (AI2)

EXPRESSION IN AFTER EFFECTS FOR opacity blinking

  1. User

    EXPRESSION IN AFTER EFFECTS FOR opacity blinking

  2. Assistant

    In Adobe After Effects, you can create a blinking effect by using an expression for the opacity property. Here’s a simple way to make an object blink on and off at a regular interval:

    1. Select the Layer: First, select the layer you want to apply the blinking effect to.

    2. Open Opacity Property: Press T on your keyboard to reveal the opacity property of the layer.

    3. Add Expression: Alt-click (or Option-click on Mac) the stopwatch icon next to the opacity property to enable expressions.

    4. Enter the Expression: Enter the following expression in the text box that appears:

      freq = 2; // Change this value to adjust the blinking speed (times per second)
      Math.sin(time * Math.PI * freq) > 0 ? 100 : 0;
      
      • freq: Determines how many times the layer blinks on and off per second. You can adjust this value to make the blinking faster or slower.
      • Math.sin(time * Math.PI * freq) > 0 ? 100 : 0;: This part of the expression oscillates between 100 (fully visible) and 0 (completely invisible) based on the sine function over time.
    5. Preview: Preview your composition to see the blinking effect.

    By adjusting the freq variable, you can control how quickly the layer blinks. A larger value will result in faster blinking, while a smaller value will slow it down. You can tweak the expression further if you want different timing or easing effects.

  3. User

    slow and smooth fade

  4. Assistant

    For a slow and smooth fade effect in After Effects using expressions, you can adjust the opacity to oscillate slowly and smoothly over time. Here's how you can achieve this:

    1. Select the Layer: Select the layer you want to add the fade effect to.

    2. Open Opacity Property: Press T on your keyboard to reveal the opacity property.

    3. Add Expression: Alt-click (or Option-click on Mac) the stopwatch icon next to the opacity to enable expressions.

    4. Enter the Expression: Use the following expression to create a smooth fade in and out effect:

      freq = 0.5; // Adjust this value for slower or faster fades (cycles per second)
      minOpacity = 20; // Minimum opacity value
      maxOpacity = 100; // Maximum opacity value
      
      amplitude = (maxOpacity - minOpacity) / 2;
      offset = minOpacity + amplitude;
      
      offset + amplitude * Math.sin(time * Math.PI * freq);
      
      • freq: Controls the speed of the fade cycle. A smaller value will make the fades slower, while a larger value will make them faster.
      • minOpacity and maxOpacity: Define the range of the opacity values you want, where minOpacity is the least visible point and maxOpacity is full visibility.
      • The expression smoothly interpolates between the minimum and maximum opacity using the sine function.
    5. Preview: Play your composition to see the layer smoothly fading in and out.

    This setup will give your layer a soft pulsing effect between the specified opacity range, ideal for creating gentle, atmospheric fades. Adjust freq, minOpacity, and maxOpacity to fit the specific look you want.