Hey, what's up guys, it's Tech Infusion
and today, I'm going to be showing you
how to make this 3D Parallax
Effect in After Effects.
You can take any static photo
and animate it so that it comes to life.
Let's jump right in.
(jagged music)
All right, so this is
mostly an effect achieved
in After Effects, but we do need to do
a little bit of prep
work in Photoshop first.
If you don't have Photoshop,
you can use any other photo
editor that works with layers.
All right, let's first open up the file
you want to apply this
effect to in Photoshop
and then let's just grab
our quick selection tool
from the sidebar here.
If you don't see this tool
it may be hidden under the
magic wand select tool.
Just click and hold down on
that until the sub menu pops up
and grab this tool right here.
Then just trace the foreground
object in your photo
until the entire subject is selected.
If you select outside the object,
you can hold down Alt on
windows and Option on Mac
while drawing to erase
parts of your selection
just like I'm doing right now.
All right, once the whole
thing is selected here,
just use Control + C or Command + C
to copy your selection
and then use Control + V or Command + V
to paste your selection to a new layer.
You'll see that it created
a new layer for us over here
with just your selection.
Let's just hide that new layer for now
by just clicking this eye icon.
All right, next go up to
Select in the menu bar
and click Reselect.
Then go to the Edit
menu and click on Fill.
This will open up a
window with some settings.
Just change the fill
type to Content-Aware.
What this will do is fill that section
where your subject was
with whatever it thinks should go there.
Now this effect will work much
better on simple backgrounds,
so if there's too much
detail in the background,
it may look fake.
But this looks okay,
except for the small outline
where my subject used to be.
Now to fix this,
just select the healing
brush from your toolbar,
and just draw around that outline.
Photoshop will use the surrounding pixels
to guess what should be placed here
and blend it all together.
After that main outline is gone,
just clean up everything else
just to make it look
a little more natural.
All right, once you're
done with all of that,
you should have two
separate layers in Photoshop
in which you have your background layer
and your foreground layer,
which is typically the main object.
Now let's just save this
as a PSD or Photoshop file.
And then in After Effects,
let's just Import this new PSD file.
When importing a Photoshop file,
it will give us a couple of options here.
Make sure that import kind is set
to Composition - Retain Layer Sizes,
and set the layer options
to Editable Layer Styles.
Then just click okay.
This will create a new composition for us
with each Photoshop layer
as a different layer in After Effects.
Now let's just open up
this new composition
it created for us.
So we'll see our two layers
over here in our timeline panel.
Just right click on an
empty space in this panel
and select New and click on Camera.
Then just click okay to create the camera.
Next, let's create a null object.
Again, just right click
on the timeline panel
and click on New Null Object.
Now let's parent this
camera to the null object.
To do this, just use this
pick whip tool right here
and just drag it to the null layer
or you could just use
the drop down over here
and just select the Null.
Now let's click on this little 3D box icon
to convert these layers to a 3D layer.
We'll want to turn this
on for the null object,
the foreground and the background layers.
All right, now let's
open up the Properties
for our background layer
and what we're going to do here
is position this background
so that it lives a little
bit further away in 3D space
than our statue.
Instead of just two
Parameters here on Position,
you'll see that we have three.
This third parameter will allow us
to control the Z position,
which is basically forward and backwards.
Now before I begin adjusting this,
I'm just gonna come up here
under my Preview window
and where it says Active Camera,
I'm going to change my
view to custom View 1.
This is the default custom view,
so yours should look very similar to mine.
Now as I adjust this background
layer's Z position value,
you'll see that the
actual background layer
separates from the statue.
So let's just push this way back
and here we're basically
simulating a 3D world
where the sky would be
way behind the statue.
All right, so now that
it's positioned correctly,
let's go back to the active camera view
and you'll see that our background layer's
not filling the entire frame.
That is because we pushed it so far back.
So let's just go to the Scale options
for our background layer,
and scale it all the way up
until it goes a little bit past the frame.
That way when we move the camera,
it won't ever show the
black background behind it.
All right, perfect.
Now let's go up to the Null Object,
drop down the properties
and with our playhead at the
beginning of the timeline,
I'm just going to create two key frames,
one for position and one for scale.
Then let's go about five
to 10 seconds forward
on the timeline, and move
the null object to the right.
What this will do is
basically pan the camera
to the right because the
camera has been parented
to the null object.
Then let's also scale down
the null object just a bit
and what this is doing
is basically moving the camera forward.
All right, now let's just
easy ease these two end key
frames here on our null layer,
select them and press F9 on your keyboard.
And now let's watch it back.
(gentle music)
You'll see that we're getting
a natural parallax feeling
that you'd get if you were
going to film this in real life.
This is due to the fact that
we used the camera in after effects
and placed our two layers
on two separate planes,
so we'll get that natural movement
where the foreground moves
faster than the background.
From here you can do a couple of things
to make it look even better.
For these 3D Parallax Effects,
I usually have some particles
I can overlay on top
to give the whole thing
some natural movement.
So if you have something
similar to these particles,
which there's a ton of these
you can download for free from YouTube,
just drag this particle clip
over your Photoshop layers
and here I'll enable 3D for this layer
so we can push it behind the statue,
but keep it in front of the sky.
Then just click on this button down here
that says Toggle Switches/Modes
and what this will do
is allow you to change
the Blend Mode to Screen.
Then I'm just going to open
the Parameters for this layer
and using Position,
I'll adjust the Z value
until it goes behind the statue
and then I'll scale it up
and position it correctly.
With these Parallax Effects
it always helps to find other elements
to overlay it with your main foreground
to keep it interesting.
In my case, I'm just going to
use this American flag here.
Remember to set the layer to 3D,
change the Blend Mode to Overlay,
and then I'm going to adjust the Opacity
to make it a little bit more subtle.
Then I'll just open up Position here
and place it in the corner
and then rotate it a little bit too.
Now, when I play back to my composition,
you'll see that these overlay items
really help make the parallax effect feel
more believable and real.
Anyways, guys, that's all for this video.
If you found it helpful in any way,
please remember to leave a like,
and don't forget to comment, subscribe
and hit that bell icon,
so you don't miss more videos like this.
I hope you have a great rest of your day,
and until next time, guys, peace out.
(upbeat music)
