• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Need a Expression that is NOT random or Wiggle

New Here ,
Dec 09, 2016 Dec 09, 2016

Copy link to clipboard

Copied

Hi,

I've got a checkbox control that is parented to Opacity of an object that i want to come on and off every 0.5 seconds to create a blinking effect.

I don't want a random blink, i don't want a wiggle, i'd like a fixed expression for the checkbox control to switch from on and off indefinitely for my composition.

Please can you help? i know it's got to be simple i just can't figure it out.

Thanks

Views

10.8K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 09, 2016 Dec 09, 2016

Copy link to clipboard

Copied

Math.round(time/0.5)*100

Simply apply it directly to the opacity.

Mylenium

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 09, 2016 Dec 09, 2016

Copy link to clipboard

Copied

when i apply that expression it turns opacity to 100 after that time but after the same amount of time after doesnt turn it back to 0%, i'd like it to alternate between exact values 100 & 0 every half second.

thanks for your help

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 09, 2016 Dec 09, 2016

Copy link to clipboard

Copied

My bad... That should have been a modulus operator:

Math.round(time%0.5)*100

Mylenium

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 20, 2020 Feb 20, 2020

Copy link to clipboard

Copied

That value will give a changing gradient from 0 to 50% opacity over the course of half of a second. This is more code but this works for me:

 

t = time%1       // Get get the current second (as a value between 0 and 1)

if(t > 0.5)         // If the current second is in the last half

    100              // Return full opacity

else                  // The second is in the first half

    0                  // Return no opacity

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Dec 09, 2016 Dec 09, 2016

Copy link to clipboard

Copied

You can use expressions but for that kind of easy spring, blink and wiggle stuf I'm using free script/plugin called DUIK. It's mostly known from being awesome rigging tool, but it also have several usefull tools among them also blink.
You can find Duik here: https://rainboxprod.coop/en/tools/duik/  Untitled-1.jpg

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jan 13, 2017 Jan 13, 2017

Copy link to clipboard

Copied

Hi BenB,

Did any of these answers help you achieve the optimum result?

Thanks,

Kevin

Kevin Monahan - Sr. Community & Engagement Strategist – Pro Video and Audio

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 15, 2017 Jan 15, 2017

Copy link to clipboard

Copied

You also can try

50+(Math.sin(time*Math.PI)*50);

or simply create two Keyframes. One for 0 and one for 100 and use expression loopOut("pingpong");

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 01, 2020 Dec 01, 2020

Copy link to clipboard

Copied

LATEST

the loopOut("pingpong"); works great for my purpose! thanks a lot!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines