Now the Chrome part of this effect is basically built,
and I want to show you that if we back this up in time,
we can see that that reflection and the distortions are being
applied to the text as that text animates in.
It does take a bit of time to render.
You can tell that my machine is starting to chug a little bit.
These are some render intensive effects,
so don't be discouraged if playing things back takes awhile.
I'm going to be editing my preview render times and
just for your sake If not having to sit through this,
but know that it will take some time to render.
You can always adjust your resolution from fold down
half or even third or a quarter to speed up these preview times.
But now I can play this back and you can see how
that reflection is moving around within the contents.
Now there is an issue with this,
and that issue is that as this text is rotating,
the reflection source is staying in the same spot,
and that's not how something that's reflective would behave.
When it flatter like this,
it's going to be reflecting what's further up
than it would when it's looking straight on.
If this is what we're seeing when the text is straight on,
then as it's rotated it needs to be shifting
that reflection around so that we're seeing a different part of the reflection.
Well, we've already added this offset control inside of our reflection source comp,
and I can't see my effect controls because I actually have two of them open.
Remember we locked the controls for that offset and transform.
We're going to use a little bit of trickery to get
this offset value to link to the rotation of the text,
so that we don't even have to bother adjusting
the position of the reflection After Effects will do it for us,
and we're going to do it with expressions.
This is one really great use case of
expressions where you don't have to know all that much,
but you can make your life a lot easier in After Effects with them.
First of all, I'm just going to close that effects controls.
We don't need that locked anymore.
The property that I'm concerned with is inside of the chrome 3D move comp,
specifically the x rotation,
because that is what's going to drive the position shift of our reflection.
Based on how this text is rotated,
I want the offset value of this effect to be adjusted automatically.
I'm just going to reset the transform and the offset for now,
and we'll fix the alignment of that later.
But if you didn't know this,
you can actually stack timelines for different comps.
If I click and drag on my reflection source,
I can move this anywhere in my interface,
but I'm just going to drag it down so that it's in
the same panel group as the rest of my tabs.
But this top purple highlighted section,
if I let go of that,
it's going to stack those two panels.
Now I have two different timeline panels visible.
In this first one obviously is the reflection source and
then down here I'm going to switch to the chrome 3D move.
That way I can see this x rotation property at
the same time as adjusting this offset effect.
I want to get to that shift centered to property in my timeline,
so I'm just going to double-click on it.
Give myself just a little bit more room,
and I want to create a relationship between this shifts center to
property and the x rotation using expressions.
This little pick whip right here is called the property pick whip.
If I click on that and drag it down to the x rotation value and then let go,
it's going to automatically write in an expression
on that property and adjust the offset position value.
Now, that's not exactly what I wanted,
but it made it really easy to be able to reference
that particular property in another comp.
That's all I needed this stacked timeline panel for,
so I'm just going to drag that back down this time to
the center of this highlighted section and let go,
and that brings all those back together.
But what after-effects did is wrote an expression that basically took
that rotation value and mapped it to the x and y values of the shift enter to property.
As I scrub through here,
you can see that it's now animated.
Because over the first four seconds of the time in the chrome 3D move comp,
we have that rotation value changing from negative 90 all the way to zero.
If I look at that reflection source and value,
it starts at negative 90 and goes all the way down to zero.
I now have this relationship between
the two properties without any keyframes on this effect.
But obviously I don't want it to just be a direct relationship where I
get the exact same value of negative 90 to zero.
I want it to end up where we had it before.
If I disable that expression that's at 960 by 540,
and really all I care about is the 540 value,
the y value of that shift center.
The x and y doesn't actually change anything since this is just a linear gradient,
and that wouldn't be affected by the y rotation anyway.
I'll re-enable that expression and we're going to edit it a little bit.
I'm giving myself a little bit more room,
and we'll start by just clicking on that expression to start editing.
To give myself even a little bit more room so we
can fit all this without wrapping the lines.
I'm going to just disable this switch right here temporarily.
But we have two lines of expressions.
This first line is defining a variable,
which is basically shorthand for a line of code.
This temp that After Effects filled in by default is
going to equal this line of expression code,
which is what references the x rotation for
the Chrome source layer inside of the Chrome 3D movie comp.
Don't worry, you don't need to know how to write that.
That's why we use the property pick whip.
But just in plain English,
that's what this is saying.
Anytime I write temp inside of this expression,
it's going to be exactly the same as if I had written out this long line of code.
Now, I don't like the word temp,
that isn't very descriptive.
I'm going to rename this r for rotation.
The name of your variable can be whatever you want.
I'm going to change it to r, and just to organize this a little bit better,
I'm going to press "Return" to give myself
a line gap between the variables and the actual expressions.
Now this line of the expression is an array.
An array is just a way to store multiple values in a single line of code.
This particular property has two values in it separated by a comma.
This is an array.
Making these square brackets is telling
After Effects that this is going to be a property with multiple values,
and then you can separate each value in the array by a comma.
The first value was temp by default,
but I can change that to r,
same thing for the second value,
change that from attempt to r,
and now we're going to get the exact same thing,
because all I changed was the name of the variable.
Let's start by getting rid of the expression driving this first value.
Because remember I said it doesn't need to adjust the x value, just the y-value.
I can change this first value which references the first value in
this property array from r to just say value and then do another square bracket.
After Effects will automatically type in the closing square bracket and zero.
What does this mean? It means the value of whatever we're applying this expression to,
so in this case it's the shift center to property.
But because it's an array property,
which we just talked about,
I need to tell After Effects which part of that value we're looking at.
In this case, we want the first value which After Effects assigns 0 to.
Zero is the first value in the array,
1 is the second value in the array.
If this was a 3D layer and we're looking at the position property,
we would have a third value,
the Z position, and that would be 2,
so 0, 1, 2, it starts at 0.
What we're saying is, look at the value of the first property in the array.
Now, I can freely adjust
that property and it is no longer being controlled by the expression.
Again, this doesn't really matter since it's a linear gradient,
but it's good to know that's how you can keep the control at
the value level of this property instead of driving it by an expression.
That was actually the easy part.
The next thing that we need to do is re-map the values of
this x rotation so that it's more useful to
us in this context of this "Shift Center To" property.
We're going to do this using an expression called linear.
This is one of my favorite expressions because it literally allows you to remap
any set of values to any other set of values,
and I'm going to try to explain that to you very clearly right now.
I'm going to drop down a line and make another variable.
This one we're going to call L for linear.
Then I'll press "Space" "Equals" "Space" because that's the name of our variable.
Now we have to tell it what the variable contains,
and we're going to write an expression starting with linear,
and After Effects auto-fills that for me, puts in parentheses.
Those are important.
We're basically saying this is the expression method we're going to use,
and inside of these parentheses is where we set all of the values for it.
We need to say what are we going to linearize?
Well, we're going to use the x rotation value as our linear source.
I could put this long line of code in,
but that would be silly since I've already stored it in a variable.
I'm just going to press the "r" key to reference that long line of code.
Then I'll press a "comma",
and now what we need to do is choose
our minimum and maximum values of
that property that we're going to take a look at or pay attention to.
The starting point of the animation,
the text has rotated negative 90 degrees.
That's going to be our minimum value.
I'm going to type in negative 90,
and then I'm going to separate that by another comma and we're going to
now type in the maximum value that we're going to pay attention to,
which at the end of the animation is 0 degrees,
so I'm going to type in 0.
We're looking at the x rotation value from a minimum of
negative 90 degrees all the way up to a maximum of 0 degrees.
Then we're going to separate that by another comma and we're going to put
in a new minimum and new maximum value.
Basically what we're going to linearize or remap
these two values to for this "Shift Center To" property.
The way you can think about this is when the x rotation is negative 90,
what do we want the "Shift Centered To" y property to be?
Well, honestly, I don't know what that number is yet.
If 540 is the value for it being at the resting point,
then we're probably going to need to increase it so that
this whole gradient shifts down as the layers rotating back.
Instead of 540, let's just do 700.
This is totally arbitrary,
we're probably going to have to change that,
but I'm just going to guess 700.
Then we need to put one more comma and give it the new maximum value,
which I just said is 540.
That's what we want the resting position to be when
the rotation of the text is at 0 on the x-axis,
then we want the "Shift Center To" y property to be 540 pixels,
and that's how you write out a linear expression.
I'll go over this one more time,
hopefully, to just make this crystal clear.
We're going to run a linear expression based on the x rotation of the text layer,
paying attention to the values from negative 90 degrees to 0 degrees and
remapping those values to 700 pixels to 540 pixels.
We need to finish that all off with a semicolon
that's just telling after effects that's the end of this line of code,
and then instead of using "r" down here for the second value in this property,
we're going to use "l" for that linear.
Now that that's all done, I'll click off of it and my gradient shifts around,
as I click and drag through here you can see what's happening now.
Back at the beginning,
where the rotation value was negative 90,
on that first key-frame for that text layer,
negative 90 right there,
we're getting a value of 700,
which is what we typed in right here.
As that animates forward,
taking into account all of the easing we did on that rotation animation,
it's remapping those values to where we ultimately get back to 540.
It's centered position because that's what we put into that linear expression.
I really hope that made sense.
Even if it didn't, as long as you followed my instructions,
you should be getting the same result.
But what we need to do now is go into the "Chrome Look" comp
and take a look at what is actually going on with that reflection.
To make this render a little bit more quickly,
I'm going to solo the "Fill" layer and I'm going to change my resolution to half,
and now we can see that that reflection is moving.
It's not moving quite as much as I had hoped.
I think we're going to need to adjust that.
But my thinking behind this is that as this text is rotated flat like this,
we need to be seeing more of this sky layer,
the sky part of the gradient,
and not so much of this pink ground material.
I think that I just didn't push that value high enough here.
Before I do that though, let's go to our resting position.
Look at that final resting point with the reflection and
adjust the gradient to fit this text a little bit better.
Because changing the position of that gradient is going to determine how
far we need this reflection to move as the text is being rotated.
I'm going to grab that shape layer and get into that gradient fill
so that I can just move this up and I'll hold
"Shift" so that it just moves on the y-axis,
and I want to see what that looks like here.
I think the top needs to come down a little bit more so we
get that darker gradient coming in on the top side of it.
Maybe bring that top-down just a little bit more and I think that's pretty good,
and so that to see it as a whole.
I think that alignment is working better now.
Now that that's set,
let's go back to a frame where we can really see that text flattened out.
Right about there, we need to be shifting this reflection texture down a lot more.
Let's go back on our reflection source,
go into that offset expression.
I double-tapped the "e" key to bring up the expressions on that layer,
and change this value from 700 to something much bigger, say 1200.
Click "off" and now that,
that offset has really shifted it down,
if we go back to our "Chrome Look", there we go.
Now we're seeing a lot more of the sky as the text is rotated back,
and as that rotates back to its upright position,
that reflection is moving with it.
I think that value is much better.
Let me preview this so you can see what it looks like, and there we go.
Now that is a much more realistic-looking reflection because as the texts rotates,
the reflection rotates with it.
If you've never used expressions before,
I realize that was a lot to take in.
I know they can be confusing,
but this really is a much simpler way of animating
that reflection because it's now linked to the 3D move key-frames.
No matter what I do to this timing,
I could make it three seconds instead of four,
I could adjust the easing of that rotation,
it's always going to be based on that rotation property.
If I preview this again,
the reflection is going to be aligned and shift properly no matter what.
That's why I went to the trouble of doing it that way.
Let me undo these adjustments I just made.
But it just makes this whole effect a lot more seamless and easy to adjust
without having to change a lot more properties to make it work.