Hi this is Gary with MacMost.com. Today let's look at how to mask text in Keynote and iMovie.
MacMost is brought to you thanks to a great group of more than 750 supporters.
Go to MacMost.com/patreon. There you can read more about the Patreon Campaign.
Join us and get exclusive content and course discounts.
Now suppose you're making a video and you want to do something extra special with the text.
Like, for instance, since you want to have text appear inside of an image kind of behind some
objects and in front of some others. Let's take a look at this image here. Let's say we wanted
the text to come in behind this building but in front of everything else. So a way to do that is
to use Keynote. Let's create a new presentation in Keynote. I'm just going to use the basic black
template there and get rid of the text in there. Then I'm going to drag and drop this image in.
Now the idea is that I want to add some text here that will go behind this building.
So let's go to Text and Create a Title. So I'll set this up to a pretty big font and some sort of
nice bold text. I'll also make it look decent by going to Advanced Image Fill using the default
texture that's there. Setting it to something a little bit brighter. Then maybe also adding
a Shadow to it. So go in here, Shadow, a little bit more or a blur to it, a little bit more of an
offset, and maybe have it down there. So let's say I want to have this text go behind this building.
So to do that I'm going to need to take this image here and have two versions of it.
One that has everything and another that just has this building. To do that in Keynote what
you need to do is create a mask. Go to Shapes here and we're going to use the Pen tool.
Then I'm going to draw, very carefully, some lines that encompass this entire building.
I can go a little bit outside of the frame. You can see I'm doing that. Now I've got it there and
I can adjust these points here to make it a little bit more perfect. I can zoom in a bit if I want. I
the building doesn't have nice straight edges I'm going to have to be a little more detailed with
more points to go around it. But here I've got the building outlined and I'm going to go to Format,
Style here, and change this to a Color Fill. Let's change this to something we can easily see
like a red like that. Now, as I said I need two copies of this picture here. So I'm going to go
to Edit and Duplicate the selection and now I've got one copy on top of the other. I'm
going to send this top one just behind the shape there. So I'm going to go to Arrange,
Send Backward and now it goes behind that. I'm going to select both this shape and Shift Click
and select this image. Now I can go to Format and then Image and then Mask with Selection. Now what
I get is a mask for that image that's only showing the portion that's inside the shape.
So the building is cutout and you can see here what's happening. This text goes behind it. If
it's not behind it for you you can use Arrange and Bring Forward, Send Backward to make sure
that these are layered in the right order. So now if I want to have this text move through here I
can create an animation. Go to Animate, Action, Add an Effect, Move and now I get this line
and I could have the line extend so the text comes completely out there. I think it looks better with
no acceleration and probably something I want to take place over a longer period of time like that.
Now let's try a more complex example using another still image. I'm going to create a new slide here
and I've got this skyline here. So let's drag and drop that in here and I'm going to
put that in the middle of the frame there. Now let's cut it out so basically the Empire State
Building here is behind the text but almost everything else is in front of the text.
So this is going to get a little bit more complex. I'm going to use Shift,
Command and then period to increase the view. You could see that under View, Zoom, Zoom In
so I can get really close here. I can start drawing a shape around things that are in front of
the street here in front of the Empire State Building. So I'll do the same thing here with
Shape, and then I'll use this, and I'll start meticulously drawing like that. This is going
to take awhile. Now you can see I've done the same thing here where I've masked a second copy right
there. But now, this is a much more complex second copy here. So when I take the same title text,
just copy and paste from here, I can arrange Send Backward and you can see it's behind
those buildings. So now I can have it down here. I can have the animation instead of having it rise
up like that and now when I preview that you can see it rise up there in the city.
Now let's go back to this one here and address a problem. Notice here there's
traffic going on there. But if I were to take a look at the animation you could see it's all
static right there. Which could be good if that's the style you're going for. But it would be nice
to actually have that traffic moving. So I've got the still frame that we used here. But I also
happen to have the video of that. So let's drag and drop the video in. Now we take this video and
it's all the way on top and let's arrange and send it all the way to the back and we still have that
image there. That second image. Let's get rid of that. So now we have this image here on top,
we've got the text, and we have the video back here. Let's go and show the build order here
and we can see we've got the movement of the title text followed by the video starting. Instead let's
have the video start with it. So we have Build 1 which is going to happen after the transition and
then with that is going to be the video will play. Now let's take a look at what happens.
You have the clouds moving and the traffic moving while the text is moving. The only
thing that's not moving is this building. The reflections and things in this building are static
but you don't really notice it as much. But we can actually have everything.
So what we can do here is let's get rid of this and instead start over again with a new shape
that will do the same thing we had before
but the difference is that instead of actually cutting this out
we're just going to turn it green. Yes, that's right. Green. So I'll go to Fill do Color Fill,
set the fill to the brightest green. Let's get rid of the video here in the background completely and
instead selected the slide. Then go to Format and then Background and change the color of
the background to green. Now also let's go and select this and make sure there's no line here.
So now you see the animation here will simply have the text slip behind this green area.
So let's Export this. So I'm going to go to File, Export, Movie. So we'll just do the first frame
since we have something else on the second frame. We'll set these to zero so it starts right away.
I'm going to stick with the current resolution which is 4K because that was the size of the
video and the images that I had. So I set this Keynote presentation to be 4K.
But you may actually be doing it at 1080. Then you can do Frame Rate and Compression Type as
you like. This will create a nice small file but if we want top quality you may want to go with
one of the Apple Pro Res settings. Now we'll do Next and we'll Save this to the Desktop.
Now let's take a look at this file in Quick Look. We can see the text goes behind this
little invisible green rectangle here. So now let's go into iMovie. What I'm going to do is
I'm going to bring in the video and put that here in the main timeline. Then I'm going to bring in
the green screen video I just created and put that on top of the main timeline. So it's an overlay.
You can do one overlay in iMovie. So now you could see I've got the text here and all I
need to do is select that and make sure you click this to make sure you're looking at the overlay
settings and change to green screen. Now even though this text is technically above everything
because it's cutout in this section it appears as if it's actually behind the building and we get
full video both on the building here and everything going on in the background there.