147 posts
  • Has been part of the Envato Community for over 4 years
  • Has referred 1+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
+1 more
didgi says

Expression for a smooth credit roll

Expression for a smooth Credit Roll.Even rate values should be used if you are rendering to an interlaced format

 rate = 2; //value in pix/frame.
 if (marker.numKeys > 0){
     if (time > marker.key(1).time){
         value - [0,rate*timeToFrames(time-marker.key(1).time)];
     } else {
         value;
     }
 }

without layer marker

 rate = 2; //value in pix / frame.
 value - [0, rate*timeToFrames(time)];
147 posts
  • Has been part of the Envato Community for over 4 years
  • Has referred 1+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
+1 more
didgi says

How to make a squish and squash expression with layer markers

squish and squash expression with layer markers

Thanks, Didgi… I took the liberty of compacting the code a little, and adding thisLayer (not for compactness, but for clarity). I also added an option 2 that uses wiggle instead of sine to add a non-uniform noise-based squish/squash effect.

Use on position or scale (or other Array(2) property) What this expression does is make the layer move around each time it passes a layer marker. Or scale up and down if you put it on scale.

There’s a bit of a harsh jump at the markers. Maybe there’s a way to sort that out with an ease function too.

-felt.

 amp=20; // max amplitude in pixels
 freq=1; //oscillations / second
 decay=10; //how fast it slows down
 n = null;

 if (marker.numKeys > 0){
     n = thisLayer.marker.nearestKey(time).index;
     if (thisLayer.marker.key(n).time > time) n--;
 }

 if (n){
      t = time - thisLayer.marker.key(n).time;
      //option 1
      newVal = amp*Math.sin(freq*2*Math.PI*t)/Math.exp(decay*t); value+[newVal, newVal];
      //option 2 (comment out to use option 1)
      newVal = (wiggle(freq, amp)-value) / Math.exp(decay * t); value + newVal; 
 } else {
      newVal = value;
 }
147 posts
  • Has been part of the Envato Community for over 4 years
  • Has referred 1+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
+1 more
didgi says

Auto Fade Expression

Add to the Opacity property.

Edit: Just to add a little description of what it does: This fades a layer in and out. You can use two markers. If you do, then the layer will fade in from the in-point to the first marker and will fade out from the last marker to the out-point of the layer. If you don’t use markers, the fade in and out times will depend on the “transition” variable. The fade is linear. You could change this by changing the linear function to ease, easeIn or easeOut. -felt

var t = time, iPt = inPoint, oPt = outPoint; //shorthand to keep the code shorter
var transition = 20; // transition time in frames if no markers used
if (marker.numKeys >= 2){ //markers version
   linear(t, iPt, marker.key(1).time,0,100)-linear(t, marker.key(2).time, oPt, 0, 100);
} else { //no markers version
    tSecs = transition * thisComp.frameDuration; // convert to seconds
    linear(t, iPt, iPt + tSecs, 0, 100) - linear(t, oPt-tSecs, oPt, 0, 100);
}

Also, there’s a slightly more robust version here

147 posts
  • Has been part of the Envato Community for over 4 years
  • Has referred 1+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
+1 more
didgi says

Jumpy Wiggle (makes wiggle skip and hold rather than move fluidly)

// Jumpy Wiggle (moves at a random FPS)
v=wiggle(5,50);
if(v < 50)v=0;
if(v > 50)v=100;
v
147 posts
  • Has been part of the Envato Community for over 4 years
  • Has referred 1+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
+1 more
didgi says

Move at a constant speed without keyframes.(x-axis)

 veloc = -10; //horizontal velocity (pixels per second)
 x = position[0] + (time - inPoint) *veloc;
 y = position[1];
 [x,y]

for rotation.

// Spin (rotate at a constant speed without keyframes)
 veloc = 360; //rotational velocity (degrees per second)
 r = rotation + (time - inPoint) *veloc;
 [r] ;
309 posts
  • Has sold $1,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 1+ items on Envato Market
  • Located in India
+2 more
DarkLand says

I have a comp called ‘main’. With in the ‘main’ comp I have ‘ph1’ composition. It contains some Fx & Animations. In Project Panel I organize both comps in a folder called ‘Scene1’.

If I Duplicate the ‘Scene1’ folder I got new ‘Scene2’ folder. The new ‘main’ comp contains old ‘ph1’ comp. But When I duplicate like this the new ‘main’ comp must contain ‘ph1’ and it should contains all Fx & Animation. Is there any Script/Exp available for this??
I hope you Understand my problem :|.

2176 posts aspire to create - create to inspire
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $125,000+ on Envato Market
  • Made it to the Authors' Hall of Fame
  • Had an item featured on Envato Market
+8 more
Creattive says

I have a comp called ‘main’. With in the ‘main’ comp I have ‘ph1’ composition. It contains some Fx & Animations. In Project Panel I organize both comps in a folder called ‘Scene1’.

If I Duplicate the ‘Scene1’ folder I got new ‘Scene2’ folder. The new ‘main’ comp contains old ‘ph1’ comp. But When I duplicate like this the new ‘main’ comp must contain ‘ph1’ and it should contains all Fx & Animation. Is there any Script/Exp available for this??
I hope you Understand my problem :|.

not sure if I have understood you correctly. You want the new main2 comp to contain the new ph2 comp, right?

use this script: http://aescripts.com/true-comp-duplicator/

309 posts
  • Has sold $1,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 1+ items on Envato Market
  • Located in India
+2 more
DarkLand says

not sure if I have understood you correctly. You want the new main2 comp to contain the new ph2 comp, right? use this script: http://aescripts.com/true-comp-duplicator/

Yes.

Thank you very much :)

2176 posts aspire to create - create to inspire
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $125,000+ on Envato Market
  • Made it to the Authors' Hall of Fame
  • Had an item featured on Envato Market
+8 more
Creattive says

@DarkLand: you’re welcome :)

I have a question, too:

Is it possible to change only a specific keyframe in an animation?

I have a layer that’s color is animated from green to blue. For this I have 2 keyframes. I want that you can easily change one of these colors, without having to look for the keyframes, so for example:

animation from green > red.

or

animation from red > blue

So is it possible that I have a control-layer with 2 color pickers, one for each keyframe?

5084 posts
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $125,000+ on Envato Market
  • Has been part of the Envato Community for over 5 years
  • Helps us moderate the forums
+11 more
felt_tips Volunteer moderator says

Is it possible to change only a specific keyframe in an animation?


Is it possible to change only a specific keyframe in an animation?

I have a layer that’s color is animated from green to blue. For this I have 2 keyframes. I want that you can easily change one of these colors, without having to look for the keyframes, so for example: animation from green > red … or … animation from red > blue.

So is it possible that I have a control-layer with 2 color pickers, one for each keyframe?

Not really… well not simply, anyway. But there is a way to achieve what you want to do.

col1 = Comp("x").layer("y").effect("z")(1).value;//ref to color effect
col2 = Comp("x").layer("y").effect("z2")(1).value; //ref to other color effect
if(thisProperty.numKeys >= 2) {
     key1time = thisProperty.key(1).time;
     key2time = thisProperty.key(2).time;
     if(time>=key1time && time<= key2time) {
          elapsed = (time-key1time)/(key2time-key1time);
          elapsed = ease(elapsed, 0, 1, 0, 1); //optional if you want it eased
          tCol = elapsed*col2 + (1-elapsed)*col1;
     } else if(time> key2time) {
          tCol = col2;
     } else {
          tCol = col1;
     }
} else {
     value;
}
by
by
by
by
by
by