Skip to main content
Participant
January 2, 2024
Question

Question i'm dealing with

  • January 2, 2024
  • 3 replies
  • 293 views

Hi guys,

I was wondering if anyone knows the solution to my problem. I'm trying to create a loop with numbers counting from 2000 to 2035 for a project. The only issue I'm dealing with is that I want to make changes in the scaling when a certain number hits the middle (as in the example below). Does anyone know how to fix this? I have used the motion title effect, but I can't figure out how to make it like a carousel with magnification in the middle

This topic has been closed for replies.

3 replies

Mylenium
Legend
January 2, 2024

Why so complicated? A simple text animator set to per line mode would have done the trick. You only have to counter-animate the animator offset as you animate the scrolling and then of course tweak a few parameters.

 

Mylenium 

Community Expert
January 2, 2024

I like the 3D look. I have several animation presets and a couple of scripts that set up cylinder rotations for layers. I said there were a couple of ways to do this. A text animator for scale based on lines would scale up the appropriate line. You would need another one for position, and then you would run out of numbers when you got to the bottom. If you want a 2D solution, I agree, a text animator would do the trick.

Community Expert
January 2, 2024

There are a couple of options. I probably would use an expression on a 3D text layer's Text property to generate the number automatically. Something like this would give you 2020 for the first layer, then add one to the text every time you duplicate the layer.

 

 

2020 + index - 1

 

 

I would then offset the Z position of the 3D text layer by just a little less than the Comp height. If the Comp were Standard HD (1920 X 1080), I would set the position to 960, 540, 500.  I would then add this expression to the Text Layer's Anchor Point to center the anchor point on the text layer:

 

 

// Text Property
s = sourceRectAtTime();
[s.width/2 + s.left, s.height/2 + s.top]

 

 

Next, I would add an expression for opacity on the text layer that looks at the position of the text layer and fades it out as it reaches the comp center. You'll need a toWorld() function to get the position. These values work for an HD comp:

 

 

// Transform/Opacity
tPos = toWorld(anchorPoint);
t = tPos[2];
linear(t, -500, -100, 100, 0)

 

 

The last expression, again, uses the toWorld() function to adjust the scale. These values seem to work fairly well.

 

 

// Transform/Scale
tPos = toWorld(anchorPoint);
t = 100 - 500  - tPos[2];
s = ease(t, 90, 100, 100, 130);
[s, s]

 

 

The next step is to duplicate the text layer as many times as you need numbers and then add a 3D null to the bottom of the stack.

 

When you have added the 3D Rotater null, add this expression to the X rotation. It will count the number of text layers and divide them by 360 to give you a multiplier for rotation based on time.

 

 

// Rotate Null/Transform/Rotation
n = thisComp.layer(index -1).index;
d = 360/n;
t = timeToFrames(time);
t * -d

 

 

This will make the null rotate the proper number of degrees every time you advance the time by one frame. Now comes the tedious part. 

Start with the First (top) text layer and parent the text to the Rotate null, then advance one frame and parent the second text layer to the Rotate null. Repeat the process until all of the text layers are attached to the null with the proper spacing. 

 

You can now disable the Rotation expression on the null layer and animate the rotation. You'll get something like this if you add a camera to the comp and make a little camera adjustment:

That's how I would do it. You can also add expressions based on the position to change the color, add lights, and do a bunch of other things based on the toWorld(anchorPoint) property.

 

The graphic will look better if you pick a Monospaced font so the distance between characters is always equal. In my example comp, the text is always center justified because of the Anchor Point expression. Disable that expression or don't add it if you want to left or right justify the text and then adjust the baseline shift to center up the text layer.

 

Legend
January 2, 2024

Create a text file and type: 2000-2035 or type: 1997-2038 to have 2000 and 2035 in the middle.

add this expression to the Source Text property:

 

min = Number(value.split('-')[0]);
max = Number(value.split('-')[1]);
val = Math.min(min + (index - 1) + Math.floor(time), max - 6 + (index - 1));
color = (255 - length(index, 4) * 70) / 255;
style = style.setFontSize(120 - length(index, 4) * 20).setFillColor([color, color, color, 1]).setText(val)

 

 

Add this expression to the position property:

 

if (index != 1) {
  target = thisComp.layer(index - 1);
  [value[0], target.position[1] + sourceRectAtTime().height + 30]
} else {
  value
}

 

 duplicate your layer 6 times.