Discussion:
Help with the InPoint expression
(too old to reply)
N***@adobeforums.com
2008-07-18 19:36:38 UTC
Permalink
I think InPoint has a lot of possibility to automate simple tasks when dealing with a lot of layers.

What's the general way to integrate InPoint into common transforms?

Here would be some helpful common things to have in the toolbox...
"At in point, fade opacity from 0 to 100 over X amount of frames"
"At in Point, scale from 0 to 100 over X amount of time"
"At In Point, move layer so many pixels this direction over this many seconds"
"At in Point, rotate layer so many degrees over this many frames"
"At In Point, read the keyframes from this parameter at time index 0"
D***@adobeforums.com
2008-07-18 21:58:49 UTC
Permalink
Here's a simple fade-in to get you started:

fadeFrames = 15;
ease(time,inPoint,inPoint + fadeFrames*thisComp.frameDuration,0,100)

Dan
N***@adobeforums.com
2008-07-19 22:00:58 UTC
Permalink
Very nice! Thanks.
J***@adobeforums.com
2008-07-26 07:20:19 UTC
Permalink
A neat expression!

It's actually what I've been looking for.

Question:

I'm able to create an equivalent fade-out point:

fadeFrames = 12;
ease(time,outPoint,outPoint - fadeFrames*thisComp.frameDuration,100,0)

But how can I include both a fade in and out value within the same expression area?

Also.. Is there a way to link this expression to all of my layers( within a single comp)?.. Or would I have to assign this to each one manually

thanks for any help

Jeff
D***@adobeforums.com
2008-07-27 22:13:24 UTC
Permalink
This should give the fade at both ends:

fadeFrames = 12;
fadeTime = fadeFrames*thisComp.frameDuration;
Math.min(ease(time,inPoint,inPoint + fadeTime,0,100),
ease(time,outPoint - fadeTime,outPoint,100,0))

You could apply the expression to a slider and link all your other layers' opacity properties the slider, but I'm not sure that saves you anything over just using Edit > Copy Expression Only and pasting the expression into all the layers.

Dan
J***@adobeforums.com
2008-07-28 04:39:00 UTC
Permalink
Thanks, Dan!

This was very helpful.

If I may ask one more bit of information....?

How can I vary the in & out time lengths?
Currently they share the same "fadeFrames"
How could I make the fade in = 8 frames, and the fade out = 20 frames?

Thanks again!

Jeff
D***@adobeforums.com
2008-07-28 05:35:11 UTC
Permalink
Like this:

fadeInFrames = 8;
fadeOutFrames = 20;
fadeInTime = fadeInFrames*thisComp.frameDuration;
fadeOutTime = fadeOutFrames*thisComp.frameDuration;
Math.min(ease(time,inPoint,inPoint + fadeInTime,0,100),
ease(time,outPoint - fadeOutTime,outPoint,100,0))

Dan
N***@adobeforums.com
2008-07-30 16:55:24 UTC
Permalink
Dan, you seriously need a PayPal tip jar!
J***@adobeforums.com
2008-09-01 20:18:18 UTC
Permalink
Hi,

Trying to figure out how to adapt this for scale.

I want my clip to scale down from 100% to 60% over the first 2 seconds and then scale back up to 200% over the last 2 seconds.

I've been using the following expression: -

startScale = 100;
endScale = 60;
scaleUpTime = 2;

s = ease(time,inPoint,inPoint+scaleUpTime,startScale,endScale);

[s,s]

I can make it either Scale down at the beginning or scale back up at the end but I can't figure out how to make it do both.

Any help would be appreciated.
P***@adobeforums.com
2008-09-01 21:18:54 UTC
Permalink
Try this:

startScale = 100;
midScale = 60;
endScale = 200;
scaleUpTime = 2;

if (time <= 2) { s = ease(time,inPoint,inPoint+scaleUpTime,startScale,midScale); } else { s = ease(time,outPoint-scaleUpTime,outPoint,midScale,endScale); }

[s,s]
J***@adobeforums.com
2008-09-01 21:41:52 UTC
Permalink
Hi,

Thanks for the response.

Works great on the first clip of my timeline but when I apply it to another clip later on it all went a little wrong but adapted it and it seems to work:

startScale = 100;
midScale = 60;
endScale = 100
scaleUpTime = 2;

if (time <= 2+inPoint) { s = ease(time,inPoint,inPoint+scaleUpTime,startScale,midScale); } else { s = ease(time,outPoint-scaleUpTime,outPoint,midScale,endScale); }

[s,s]

So cheers,

helped me out a ton.

Loading...