Hey Guys, Flat Pack FX here and in
this tutorial I'm going to show you how
to take your 2d images and make this 3d
parallax effect so stick around you're
watching Flat Pack FX.  Hey guys
welcome back to the tutorial now in this
tutorial I'm going to show you how to
make this effect called 3d projection
mapping now simply put this effect
allows you to take a 2d image and make
it appear to be three-dimensional now
this is an intermediate-to-advanced
effect so if you're new to After Effects
I really recommend that you watch
through this video a few times and just
carefully follow the steps to make sure
you don't miss anything
now also in this example you can
obviously use your own images but I've
supplied two images here that I got from
online and I've put links in the
description below if you want to use
those same images now just two very
quick things when you're choosing your
images this effect works best when we're
looking at some sort of tunnel street or
alley way now it doesn't mean this
effect won't work for other images it's
just that you will get the best results
if you have an image that is of some
sort of tunnel alright so the first
thing we want to do is create a new
composition it's gonna call my effect
I'm gonna make sure this is set to 1080
25 square pixels and roughly about 30
seconds in length now the first thing I
want to do is just drag my image
straight into this composition and I'll
need to resize it so it fits my
composition now there's four parts to
our projector there's the camera which
is our eyes there's the light source
which is going to be our torch there's
our image which could be our hand and
then we have our surface that we're
projecting onto which is our wall now we
need to create each one of those so the
next part is we're going to create the
camera so I'm just gonna right click and
create a new camera I want to set this
to be 28 millimeters and then hit OK and
then I also want to create the first
layer so we've got four distinctive
layers here that we're going to project
our image onto we've got the ground
plane we've got the ceiling and then
we've got these two side planes so we
need to recreate the
inside of After Effects so the first
thing is I'm going to right-click and
create a solid just gonna set this as
default a white layer and then hit OK
then I'm gonna come up to effect down to
generate and I want to add this grid
effect and that's just going to make it
a bit easier to see what we're doing
here now the first part of this is I
need to make it a 3d layer now we need
to rotate this layer so that matches our
ground plane as best we can so we do
this by going to the rotation tool and I
rotate this layer like this then I can
move this into position and I can
continue to adjust this layer and scale
it as well so that it fits our ground
plane as close as we can possibly get it
so something like that now next I need
to adjust the material options of this
layer so I can navigate down to the
material options and I need to make sure
the car shadows is set to OFF the light
transmission is zero except shadows is
on and except lights is off so this is
really important that these are set to
these specifications now once I've got
that all I need to do is take that layer
I can duplicate it I'm just gonna simply
use my Z property just to move it up
towards the ceiling so it lines up
nicely with our edge here so something
like that next I can take one of those
layers again I can duplicate them and
this time I'm going to use my rotation
tool on the y-axis to move them up into
a vertical position and then I can
adjust them using my z-axis here so that
they line up with the edges here and
then I can reposition this by scaling it
and then shifting it around until
basically these edges all line up so you
can see what we're doing here we're
basically creating a square so I can do
some very slight adjustments here and
then I want to take that layer again and
I duplicate it and all I need to do is
just move it over using the z-axis and
just do the same thing again I just
reposition it here until it roughly
lines up with my edges here that doesn't
have to be perfect but as long as these
sort of gaps here are all sort of closed
that's all we need you can see it's
already created that illusion of being a
tunnel we've created almost a
three-dimensional tunnel inside of After
Effects now the last part is I'm just
gonna create an end plane so I'm going
to duplicate this one last time I'm
gonna rotate this layer so that it's
flat I'm just gonna simply move this one
into the distance and then just
reposition it because best I can there
now it's worth at this stage just taking
the time to get it as accurate as you
possibly can but you can adjust this
later so don't worry too much if it
doesn't all line up at this point now
the other thing we can do here is just
to check how this box is all lining up
if I go to my camera tool I can actually
just rotate this box around now I can
actually just move this out and you'll
start to see that we can see this box in
a three-dimensional space so you can see
that my end layer is not lined up the
rest of my planes I can just simply drag
this one back here and grab this layer
and move it closer to my grid and then I
can just reposition this here I'm also
just gonna rotate this one slightly back
into place I understand this may be
quite difficult for some of you if you
haven't worked with any sort of 3d
program or you have trouble imagining a
three-dimensional space but it can be
done it's just a matter of slowly
working through it and moving each layer
a small bit at a time until you end up
with everything in the in the correct
position now I can see here that this
layer will need to come closer just to
help close that gap once you think
you've finished your box I can just
reset my camera here and then just make
any final adjustments that I need so
that we're as close to that edge as
possible now bit of overlaps okay it's
just that we need to have all the edges
sealed up now once we've got this in the
position that we're happy with now we
can now we're ready to actually remove
these grids so I'm gonna select those
white solids and I'm just gonna tap this
FX button to remove the actual grev so
we end up with our white planes again
and then the last part of this is I'm
going to create the light so I'm gonna
right click and create a new light and
it's very important that I set this to
be spot I need this to be 100% intensity
and in my cone angle to be a hundred and
eighty degrees and my cone feather
I need set to zero now most important I
need the color of the light source to be
white and I need this to be car shadows
to be on the other thing I can adjust
here is the shadow darkness to be a
hundred percent which is important and
then hit okay now at the moment we can't
actually see anything and that's because
we need to actually position all of our
elements in the right place so I'm going
to go to this button here to go to the
to view horizontal and the view on on
the right hand side is what our camera
sees and the view on the left is our
scene played out from above so from a
bird's eye view now we want everything
to line up with our cameras position so
if I hit my camera layer and hit P on
the keyboard I can actually copy this
position property here and I can paste
it onto my light source and that's moved
our lights in line with our camera and
I'm also going to do the same with this
layer here after I turn on the 3d layer
again so I'm gonna make it a 3d layer
and I'm going to paste position property
onto that layer and that's moved that
layer in line with our camera and
actually need it to sit in front of the
camera so I'm gonna move move it out so
it's it's away from the camera so we end
up with a gap that's our image and
that's our camera layer there so we need
a bit of a gap there and then we need to
scale our image back down so I go down
to my scale property by hitting S on the
keyboard and I'm gonna scale this right
down now you will need to scale this
down to probably around 1% or so and
then you can readjust the final scale so
that it fills the edge of your screen
where you roughly had it before at the
moment mines really blurry the reason
for this is because I have depth the
field turned on to my camera layer and
come down to the camera options and I
can just turn off depth of field and
then make the final adjustment here just
to fill the edge of my screen now I'm
just gonna go back to my original one
view so I can see what I'm doing now at
the moment looks exactly the way we had
it before but we have to do one last
thing to our scene here which is adjust
the material
options for our projector a layer at the
moment is not transparent so when the
light hits it the light's not actually
passing through onto our background
layer so we need to make it transparent
so the light can shine through this
layer and project it onto our background
so we go down to the material options
for your image and we need to change the
car shadows from off to only so if I
click it once it goes to on if I click
it twice it goes to only and then we
need to adjust the light transmission
from 0 to 100 and there you go
so image has now reappeared now again it
looks exactly the same as we had before
but if I go to my camera tool and just
simply pan around our scene you can see
the big difference you can see that it's
actually now turned it into a
three-dimensional scene I can actually
turn all the way out here and it will
change the perspective that I'm looking
so if I wanted to do a simple camera
move here I'm gonna set a keyframe for
my position and point of interest I'm
going to go to my camera Z track tool
and go across to roughly about 5 seconds
here and just do a simple dolly movement
in and if I played through that you can
see straight away the difference that
this effect has created you can see it
actually looks like the camera is
traveling down the tunnel now you can
also do some other interesting things
here by using the different camera tools
I can move the camera closer to the
ground here and as my camera moves
towards down the tunnel I could move the
camera over to this side of the wall and
then I could rotate the perspective so
it looks so we've got a bit more of a
dynamic camera movement going on here
there really shows how this effect is
working so you can see the difference
that we've got there now you can see
we're actually getting this line appear
right on the edge here and that is where
the box doesn't line up with this side
of the box as well so what you need to
do is you just need to scale this up
slightly and that's just gonna fill that
edge again so
just where the two layers aren't
connecting so you just need to look out
for those and then make your adjustments
as you go now that is one way to create
this effect and it can get a little bit
complicated but the key is just slowly
work away and follow those steps very
carefully and eventually you'll get
there
now here's another composition that I
prepared of a road and again I followed
the same principle that I've just shown
you here in this previous one but in
this case I'm using two planes instead
of four so I deleted the sidewalls and
then I went back to using my floor plane
and my ceiling plane and it ends up
having the exact same effect now you can
take the same principle and apply it to
a wide variety of different images and
you can also take this effect to a very
advanced level where you can actually
create your own custom planes by masking
a layer and then projecting your image
over the top of that now at the moment
I'm just trying to keep things simple
for you and easy to follow so there you
go guys there's an introduction to
camera and projection mapping inside of
After Effects
I hope you've learnt something and if
you have any further questions about
this effect please pop it in the comment
section below thanks very much for
watching guys and I'll catch you in the
next tutorial and remember flat pack
effects is the flat pack anyone can
build
