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

After Effects Combine x2 Expressions - Bounce & loopOut

New Here ,
Apr 20, 2017 Apr 20, 2017

Copy link to clipboard

Copied

I'm after help combining x2 expressions. A bounce expression like below...

n = 0;

if (numKeys > 0){

n = nearestKey(time).index;

loopOut("cycle");

if (key(n).time > time){

n--;

}

}

if (n == 0){

t = 0;

}else{

t = time - key(n).time;

}

if (n > 0){

v = velocityAtTime(key(n).time - thisComp.frameDuration/10);

amp = .05;

freq = 4.0;

decay = 2.0;

value + v*amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);

}else{

value;

}

...with the standard loopOut("cycle") expression. I have a few key frames to lift an object slowly then to drop it quickly (hopefully with a bounce) and I need to repeat this indefinitely. Can any one help?

TOPICS
Expressions

Views

4.0K

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

correct answers 1 Correct answer

LEGEND , Apr 25, 2017 Apr 25, 2017

loopOut()requires keyframes, not expressions. You cannot simply combine these two expressions. You have to apply the bounce first, convert to keyframes and then apply the loop expression, which ideally you might do on duplicate layers to not mess up your original keyframing.

Mylenium

Votes

Translate

Translate
LEGEND ,
Apr 20, 2017 Apr 20, 2017

Copy link to clipboard

Copied

Going to have a moderator move your post to the Expressions forum.

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 ,
Apr 24, 2017 Apr 24, 2017

Copy link to clipboard

Copied

Realised I had copied the loopOut expression into the bounce code in line 4. Can anyone help to get these working together?

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 ,
Apr 25, 2017 Apr 25, 2017

Copy link to clipboard

Copied

loopOut()requires keyframes, not expressions. You cannot simply combine these two expressions. You have to apply the bounce first, convert to keyframes and then apply the loop expression, which ideally you might do on duplicate layers to not mess up your original keyframing.

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 ,
Apr 25, 2017 Apr 25, 2017

Copy link to clipboard

Copied

LATEST

Hi Mylenium,

Brilliant I hadn't thought of doing that. Thanks.

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