152 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
+3 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)];
152 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
+3 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;
 }
152 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
+3 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

152 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
+3 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
152 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
+3 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] ;
312 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 :|.

2650 posts aspire to create - create to inspire
  • Elite Author: Sold more than $75,000 on Envato Market
  • Helped several times protecting Envato Market against copyright violations
  • Has sold $125,000+ on Envato Market
  • Made it to the Authors' Hall of Fame
+10 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/

312 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 :)

2650 posts aspire to create - create to inspire
  • Elite Author: Sold more than $75,000 on Envato Market
  • Helped several times protecting Envato Market against copyright violations
  • Has sold $125,000+ on Envato Market
  • Made it to the Authors' Hall of Fame
+10 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?

5257 posts
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $125,000+ on Envato Market
  • Helps us moderate the forums
  • Has been part of the Envato Community for over 5 years
+11 more
felt_tips 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;
}

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by