Highlighted

Speed slider control

Explorer ,
Aug 28, 2020

Copy link to clipboard

Copied

I have a text box that slides into the screen fron the right. It stops for a couple of seconds and slides back out. I want to use a slider control to control the speed and the pause. I'm a little lost with expressions at the moment. I hope this makes sense and thank you for any help.

Adobe Community Professional
Correct answer by Rick Gerard | Adobe Community Professional

I would animate keep the stroke animation on the same shape layer. I see you have two. 

 

It looks like you have not included the tying the position of the background shape layer to the position of the text layer. Unless you want them to move independently, you shouldn't do that. All you should have to do is animate the position of the text layer and add a Trim Paths animator to the stroke. You can have more than on stroke on a shape (path) and you can add an additional Trim Paths to every stroke you apply to a shape. 

 

If you use time remapping the entry and exit speed of your animation will change. A better option would be to set protected areas for the in and out transitions. There are several good tutorials on Essential Graphics and Mogrts that explain how to do this. 

TOPICS
Expressions, How to

Views

80

Likes

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

Speed slider control

Explorer ,
Aug 28, 2020

Copy link to clipboard

Copied

I have a text box that slides into the screen fron the right. It stops for a couple of seconds and slides back out. I want to use a slider control to control the speed and the pause. I'm a little lost with expressions at the moment. I hope this makes sense and thank you for any help.

Adobe Community Professional
Correct answer by Rick Gerard | Adobe Community Professional

I would animate keep the stroke animation on the same shape layer. I see you have two. 

 

It looks like you have not included the tying the position of the background shape layer to the position of the text layer. Unless you want them to move independently, you shouldn't do that. All you should have to do is animate the position of the text layer and add a Trim Paths animator to the stroke. You can have more than on stroke on a shape (path) and you can add an additional Trim Paths to every stroke you apply to a shape. 

 

If you use time remapping the entry and exit speed of your animation will change. A better option would be to set protected areas for the in and out transitions. There are several good tutorials on Essential Graphics and Mogrts that explain how to do this. 

TOPICS
Expressions, How to

Views

81

Likes

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
Aug 28, 2020 0
Adobe Community Professional ,
Aug 28, 2020

Copy link to clipboard

Copied

How are you moving the layer? If you set keyframes then you have to implement value-at-time, but that can get awfully complicated. If you use the layer in and out point to move a layer then you can use a slider to adjust the time it takes to move in and out. 

 

Show us what you have going on in the timeline and we can help. Without knowing that all I can do is post an example of an animation preset that I have the moves layers based on the layer in and out point, but all of those presets have multiple sliders and a checkbox. I don't know how useful one of those would be, but here goes. If you add the appropriate controls to this expression it will slide a layer in from the left, bounce to a stop, then fall off the bottom of the screen all based on in and out point. The resting position depends on where the layer is placed at the start and the layer scale doesn't matter. All that is important is that the anchor point is in the center of the layer.

sif = effect("slideIn Frames")("Slider");
sof= effect("slideOut Frames")("Slider");
// find in and out pointOfInterest
stime = time - inPoint;
inTime = sif * thisComp.frameDuration;
	if (effect("Match SI SO")("Checkbox") == 0) {
	outTime = sof * thisComp.frameDuration;
	}
	else if (effect("Match SI SO")("Checkbox") == 1) {
	outTime = inTime;
	}
// Fix  layer size when scaled
sf = scale - [100, 100];
xSize = width + (width * sf[0]/100);
ySize = height + (height * sf[1]/100);
realSize = [xSize, ySize];
// Set Positions
spx = 0 - realSize[0] + realSize[0]/2 ;
rstx = value [0];
rsty = value[1];
epy = thisComp.height + realSize[1] - realSize[1]/2;
// create movement 
freq = effect("bounce Frequency")("Slider");
        amplitude = effect("bounce Amplitude")("Slider");
        decay = effect("bounce Decay")("Slider");
    posCos = Math.abs(Math.cos(freq*time*2*Math.PI));
	nt = time-inPoint;
    y = amplitude*posCos/Math.exp(decay*nt);
moveIn = Math.min(linear(stime,0,inTime,spx  ,rstx-y));
moveOut = Math.min(easeIn(time,outPoint - outTime,outPoint - thisComp.frameDuration,rsty ,epy));
[moveIn, moveOut]

Likes

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
Reply
Loading...
Aug 28, 2020 1
Explorer ,
Sep 01, 2020

Copy link to clipboard

Copied

Hi Rick and thank you for this, much appreciated.

Yes I've been using keyframes. The moving text has a linked box container and some strokes that animate. I have some sliders to control colours.

My thoughts were to put all this into a comp and set a time remap. Use a slider on the time remap. Set an expression on the time remap. With the aim to export this as a mogrt so the duration of the anim can be controlled in Premiere.

Screen Shot 2020-09-01 at 16.42.00.png

 

 

 

Likes

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
Reply
Loading...
Sep 01, 2020 0
Adobe Community Professional ,
Sep 01, 2020

Copy link to clipboard

Copied

I would animate keep the stroke animation on the same shape layer. I see you have two. 

 

It looks like you have not included the tying the position of the background shape layer to the position of the text layer. Unless you want them to move independently, you shouldn't do that. All you should have to do is animate the position of the text layer and add a Trim Paths animator to the stroke. You can have more than on stroke on a shape (path) and you can add an additional Trim Paths to every stroke you apply to a shape. 

 

If you use time remapping the entry and exit speed of your animation will change. A better option would be to set protected areas for the in and out transitions. There are several good tutorials on Essential Graphics and Mogrts that explain how to do this. 

Likes

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
Reply
Loading...
Sep 01, 2020 1
Explorer ,
Sep 02, 2020

Copy link to clipboard

Copied

Thank you for the valuable pointers Rick.

I'll look at keeping the strokes on the same layer. I wanted the background shape layer to slide in slightly earlier than the text which is why I didn't link them.

Good point on the entry and exit speed.

I've been looking at responsive templates and setting intro and outros, exporting as mogrt. But so far I can't get this to work in Premiere, shall keep trying.

Cheers again, much appreciated

Likes

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
Reply
Loading...
Sep 02, 2020 0
Explorer ,
Sep 02, 2020

Copy link to clipboard

Copied

I've just figured my problem. I wasn't setting the Master in Essential Graphics as the correct comp so it wasn't exporting correctly. Now I have done this the duration is responsive in Premiere!

Likes

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
Reply
Loading...
Sep 02, 2020 0
Adobe Community Professional ,
Sep 02, 2020

Copy link to clipboard

Copied

If you want the background shape to slide in you can either use an expression based on the layer in and out points to make the move or just add a couple of keyframes and modify the position expression by subtracting Comp Center from the background layer position and then adding the text layer position. 

 

The expression would look like this:

txt = thisComp.layer(index -1).position;
ofst = position - [thisComp.width/2, thisComp.height/2];
[ofst[0] + txt[0], txt[1] ]

 

 

Likes

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
Reply
Loading...
Sep 02, 2020 0