00:00 - 00:03

hello everyone this is Evan Abrams and

00:02 - 00:05

in this video we're going to look at

00:03 - 00:07

this shadow box technique inside of

00:05 - 00:09

Adobe After Effects the concept here is

00:07 - 00:11

to have a kind of portal or window into

00:09 - 00:13

a little 3D space but without any

00:11 - 00:15

external walls getting in the way we can

00:13 - 00:17

see all the way around this object if

00:15 - 00:19

you want to follow along exactly the

00:17 - 00:21

project file you see me working on here

00:19 - 00:22

will be available in the link in the

00:21 - 00:24

description if you want to pick that

00:22 - 00:26

apart and I should say this tutorial

00:24 - 00:28

will be making use of After Effects 2023

00:26 - 00:30

and make specific use of the updated

00:28 - 00:32

track matte system so if your interface

00:30 - 00:34

doesn't look exactly like mine that may

00:32 - 00:36

be the reason but please ask any

00:34 - 00:37

questions you have in the comments and

00:36 - 00:39

I'll try to help you out when I'm able

00:37 - 00:41

and if you enjoy this kind of thing make

00:39 - 00:42

sure you subscribe so you know when new

00:41 - 00:44

things come out around here alright

00:42 - 00:46

without further Ado let's push on

00:44 - 00:47

through and get a little bit deeper into

00:46 - 00:51

After Effects

00:47 - 00:51

[Music]

00:51 - 00:56

so here's the file we're creating and

00:54 - 00:58

you can see as we rotate it around those

00:56 - 01:00

internal parts that have depth are

00:58 - 01:02

getting cut off around the the outside

01:00 - 01:04

of the window this is in essence the

01:02 - 01:05

shadow box technique and we might as

01:04 - 01:08

well start from the very beginning or at

01:05 - 01:10

least near to the beginning so here in

01:08 - 01:12

illustrator here are all the parts that

01:10 - 01:15

are going to create our beautiful object

01:12 - 01:17

we have all of the layers that will be

01:15 - 01:20

separated out we have those markings

01:17 - 01:22

around the outside separated out onto

01:20 - 01:23

their own layer we have the frame itself

01:22 - 01:25

a little black line that'll go around

01:23 - 01:28

the outside and then of course we have

01:25 - 01:31

the matte object this is the visible

01:28 - 01:33

space through which we will observe the

01:31 - 01:34

rest of the elements this is the space

01:33 - 01:36

that we're going to look through so when

01:34 - 01:39

you're creating your designs think about

01:36 - 01:41

making this space giving it its own

01:39 - 01:43

layer we'll come back to it later we can

01:41 - 01:45

create all of this stuff inside of After

01:43 - 01:47

Effects but I find it a little bit

01:45 - 01:49

easier to draw things in illustrator so

01:47 - 01:51

I start there you could also start this

01:49 - 01:54

all in Photoshop but always remember we

01:51 - 01:56

want to think about this card matte part

01:54 - 01:58

as an integral part of our design so

01:56 - 02:01

back in After Effects we're going to

01:58 - 02:04

import that object select of course the

02:01 - 02:05

card Parts choose composition and layer

02:04 - 02:08

size that'll create a little space for

02:05 - 02:10

us to get organized and our first step

02:08 - 02:12

within that composition is to make

02:10 - 02:15

everything three-dimensional and let's

02:12 - 02:17

make everything continuously rasterized

02:15 - 02:19

let's enjoy all of the quality of our

02:17 - 02:22

Vector layers by turning on the sunshine

02:19 - 02:23

and turn on little 3D cube now you'll

02:22 - 02:25

notice that the card mat has had its

02:23 - 02:27

little eye poked out we'll just be using

02:25 - 02:29

the visible space the data of that

02:27 - 02:31

object in a later step so we don't

02:29 - 02:33

really need to see it now let's move

02:31 - 02:35

these objects around I'm going to grab

02:33 - 02:37

all of the hero elements parent them to

02:35 - 02:39

the largest part of them call up their

02:37 - 02:44

position let's push that back in space

02:39 - 02:47

Maybe 250 pixels let's grab the markings

02:44 - 02:49

let's push that by say 50 pixels pushing

02:47 - 02:51

them all back positive numbers pushing

02:49 - 02:53

them away from us that'll leave the

02:51 - 02:55

frame and the card mat right here at

02:53 - 02:57

zero the living at the Baseline

02:55 - 02:59

everything else is behind them for now

02:57 - 03:01

I'm going to go ahead and offset the

02:59 - 03:03

rest of these things just so they're

03:01 - 03:05

exactly like the example file putting

03:03 - 03:08

them at say negative 10 negative 20

03:05 - 03:10

negative 30 and so on that way they are

03:08 - 03:12

offset towards the camera coming towards

03:10 - 03:15

us adding a little bit of depth to our

03:12 - 03:16

lives always important to seem deeper

03:15 - 03:19

than you are here on the internet and

03:16 - 03:20

with all of that work done let's see how

03:19 - 03:21

it's operating we're going to take the

03:20 - 03:24

card Parts we're going to create a new

03:21 - 03:25

composition call this in use because

03:24 - 03:28

this is how we're going to observe this

03:25 - 03:31

thing in use drag the card Parts out

03:28 - 03:33

onto here make it three-dimensional and

03:31 - 03:35

now we can use the rotate tool to give

03:33 - 03:38

that a turn and we want to be able to

03:35 - 03:40

see all of the lovely depth all of the

03:38 - 03:41

extruded elements so go ahead and hit

03:40 - 03:44

that star button which in this case

03:41 - 03:46

stands for collapse Transformations and

03:44 - 03:48

you can see all of those Transformations

03:46 - 03:50

being pushed back in 3D space look at

03:48 - 03:53

that wonderful work now we want to

03:50 - 03:55

constrain them inside that visible area

03:53 - 03:57

inside that window to create the shadow

03:55 - 04:00

box technique so back to the card Parts

03:57 - 04:02

grab all of our layers and we're going

04:00 - 04:04

to point them here in the track matte

04:02 - 04:08

column we're going to point them all to

04:04 - 04:11

use the card mat as their track mat by

04:08 - 04:12

default we are using the alpha matte you

04:11 - 04:15

can switch this to luminance if you want

04:12 - 04:16

to use black and white values and you

04:15 - 04:18

could invert it clicking the second

04:16 - 04:20

switch out here that would invert the

04:18 - 04:23

relationship in our case though this has

04:20 - 04:25

created a lovely little window through

04:23 - 04:27

which we can observe the rest of our

04:25 - 04:30

elements you can see them hanging out in

04:27 - 04:32

behind there and they're respecting that

04:30 - 04:34

track Mount window let's go ahead and

04:32 - 04:37

add a little background in here I'm

04:34 - 04:39

going to just add a new solid let's make

04:37 - 04:41

it a white solid okey-doke put that

04:39 - 04:44

under everything and let's go ahead and

04:41 - 04:47

make that 3D have it do the same little

04:44 - 04:50

track matte game push that far enough

04:47 - 04:52

into the background here maybe 300 there

04:50 - 04:54

we go so then we come back to here you

04:52 - 04:55

can see yep there is our background

04:54 - 04:57

element hanging out I'm going to go

04:55 - 04:59

ahead and animate this now I'm going to

04:57 - 05:01

speed through this process I'm just

04:59 - 05:03

putting keyframes on on rotation and

05:01 - 05:05

position just so you can see how this

05:03 - 05:06

would operate practically and then we'll

05:05 - 05:08

start addressing some of the problems

05:06 - 05:10

that come with this technique and how we

05:08 - 05:12

can get around them so we have the

05:10 - 05:14

element coming on it's turning coming

05:12 - 05:16

closer to the camera tilting or preening

05:14 - 05:18

and then kind of snapping back down to

05:16 - 05:20

some kind of ground plane and we can see

05:18 - 05:22

a lot of problems already when this

05:20 - 05:24

thing turns around we probably don't

05:22 - 05:27

want to see these elements extruding out

05:24 - 05:29

of the back of it we want to see just a

05:27 - 05:32

nice flat card back and then when we

05:29 - 05:34

tilt these more extreme degrees we can

05:32 - 05:36

see around the background so for the

05:34 - 05:36

background a few Solutions present

05:36 - 05:39

themselves

05:36 - 05:41

number one would be just grabbing this

05:39 - 05:43

element and scaling it up making it so

05:41 - 05:45

large that no matter what angle we are

05:43 - 05:48

still going to be able to see it

05:45 - 05:50

extending kind of beyond the situation

05:48 - 05:52

unfortunately there will always be

05:50 - 05:54

angles where that is not true so maybe

05:52 - 05:55

this isn't the best way forward one

05:54 - 05:57

thing that you can do that's fairly

05:55 - 05:59

interesting is let's just make it not

05:57 - 06:02

three-dimensional so there we go it's no

05:59 - 06:05

longer 3D we come back to seeing this in

06:02 - 06:07

use it looks like that background is

06:05 - 06:10

pretty much locked in there there is

06:07 - 06:11

kind of an uncanny effect to it in that

06:10 - 06:13

it is being two-dimensional where

06:11 - 06:16

everything else is three-dimensional but

06:13 - 06:18

if we mix in some other 3D things some

06:16 - 06:21

other effects maybe we can kind of hide

06:18 - 06:23

that for example I'll drop a bit of a

06:21 - 06:25

ramp on here let's give that some colors

06:23 - 06:27

something like that and you can see that

06:25 - 06:29

no matter where this thing is moving yes

06:27 - 06:31

indeed those 2D things those effects

06:29 - 06:33

that we've stuck onto this layer those

06:31 - 06:35

are still holding true let's come in

06:33 - 06:39

here and let's add some other layers

06:35 - 06:42

maybe let's go new too solid let's make

06:39 - 06:45

it the comp size let's add some fractal

06:42 - 06:48

noise into the mix let's go ahead and

06:45 - 06:50

add some directional blur onto this

06:48 - 06:52

let's really blur this out in a big way

06:50 - 06:54

creating some light streaks out of this

06:52 - 06:56

and now let's go ahead and make that

06:54 - 06:58

three-dimensional push that kind of

06:56 - 07:01

behind everything and maybe scale that

06:58 - 07:02

up quite a bit maybe set it to add of

07:01 - 07:04

course make sure anything that you want

07:02 - 07:07

to be locked behind that window you are

07:04 - 07:10

indeed using the track matte of that

07:07 - 07:12

card mat so that it remains behind the

07:10 - 07:15

window you can see how this is adding a

07:12 - 07:18

little layer of complexity in behind

07:15 - 07:20

things maybe a combination of 2D and 3D

07:18 - 07:22

type backgrounds is what you need to

07:20 - 07:23

fill in the space back there to make

07:22 - 07:25

this a little bit more believable

07:23 - 07:28

another solution that you might attempt

07:25 - 07:30

is placing walls behind it so what I

07:28 - 07:33

mean by that is let's go ahead and sort

07:30 - 07:36

of remove these two attempts here let's

07:33 - 07:38

make a new solid let's call this wall

07:36 - 07:41

we're going to make it three-dimensional

07:38 - 07:43

push that back a little bit I'm going to

07:41 - 07:46

duplicate it that's command or control D

07:43 - 07:47

to duplicate tip it on its side and I'm

07:46 - 07:49

just going to try to move that over

07:47 - 07:51

we're going to move that over holding

07:49 - 07:54

down command to get that snap going and

07:51 - 07:56

I want to align basically I want to

07:54 - 07:58

align the edge

07:56 - 08:01

so that it sort of meets with the edge

07:58 - 08:03

of our frame here and we're going to go

08:01 - 08:05

ahead make that respect to the track

08:03 - 08:07

Matt come back here and you can see you

08:05 - 08:09

could assemble a little wall that kind

08:07 - 08:11

of goes in behind if you filled in walls

08:09 - 08:12

for the rest of the area you would

08:11 - 08:14

indeed be creating like a tiny little

08:12 - 08:16

room that lives in there so that might

08:14 - 08:18

be a solution for you as well these

08:16 - 08:20

walls don't have to live right here we

08:18 - 08:22

could push them out further in either

08:20 - 08:24

direction but they can create that stop

08:22 - 08:26

Gap that you require so that you don't

08:24 - 08:28

end up seeing kind of the balance of

08:26 - 08:32

your illusion now whichever method you

08:28 - 08:33

choose we still have the problem of what

08:32 - 08:36

is on the back of this card how do we

08:33 - 08:38

make this 2D from the back but 3D from

08:36 - 08:40

the front well what I'm going to do is

08:38 - 08:42

actually take this element and

08:40 - 08:44

pre-compose it and we're going to leave

08:42 - 08:47

all the attributes in here and let's

08:44 - 08:48

call this cards you know plural with an

08:47 - 08:51

s

08:48 - 08:54

so inside cards here we just have that

08:51 - 08:56

one layer we might as well call this say

08:54 - 08:58

card deep so this is going to be the

08:56 - 09:00

version that has depth make sure you put

08:58 - 09:02

on collapse Transformations and make it

09:00 - 09:05

three-dimensional that means that

09:02 - 09:08

everything is going to still behave

09:05 - 09:10

exactly the same so far so good so what

09:08 - 09:14

I want is another layer that is going to

09:10 - 09:15

be 3D but does not have depth so let's

09:14 - 09:18

go ahead and construct one of those

09:15 - 09:20

maybe I'll just take these two elements

09:18 - 09:22

here let's just copy those background

09:20 - 09:25

elements and let's see we're going to

09:22 - 09:27

come out here maybe paste those again

09:25 - 09:30

make them not three-dimensional let's

09:27 - 09:32

pre-compose them and call this card back

09:30 - 09:34

and let's see we want it to kind of have

09:32 - 09:36

that same shape so let's come back in

09:34 - 09:39

here let's bring the card mat with us

09:36 - 09:42

going back into the card matte area here

09:39 - 09:45

and we'll ask these here to use that as

09:42 - 09:47

a track Mac maybe we scale these down

09:45 - 09:48

kind of like this

09:47 - 09:51

think I want it to be a little bit

09:48 - 09:53

distinct let's go ahead and snap my

09:51 - 09:54

initials on it nothing wrong with that

09:53 - 09:56

it's looking good

09:54 - 09:59

now we've got back here we've got the

09:56 - 10:01

card back and we've got the Deep version

09:59 - 10:03

of the card I'm making this little layer

10:01 - 10:05

3D but not collapsing as Transformations

10:03 - 10:08

because it's meant to just be a flat

10:05 - 10:10

paper thin card back not a rich deep 3D

10:08 - 10:13

diorama so if we're able to toggle

10:10 - 10:16

between them so if sometimes this is the

10:13 - 10:18

layer that's visible and sometimes this

10:16 - 10:20

is the layer that's visible

10:18 - 10:22

like that then we're going to be in good

10:20 - 10:25

shape so let's create a way to toggle

10:22 - 10:28

between them I'm going to use the drop

10:25 - 10:31

down menu so bring that drop down menu

10:28 - 10:33

control onto cards plural node here

10:31 - 10:35

remember we're in the in-use comp so

10:33 - 10:37

this is the thing that contains all the

10:35 - 10:39

other things and in the menu here we're

10:37 - 10:42

going to come into edit and let's call

10:39 - 10:44

this back let's call this one deep we

10:42 - 10:46

don't really need a third one so I'll

10:44 - 10:48

remove it we'll hit OK and I'm going to

10:46 - 10:50

lock up here in the effects I'm going to

10:48 - 10:52

lock that so that we can return to it or

10:50 - 10:54

it just stays there as we come back into

10:52 - 10:56

here option clicking on the stopwatch to

10:54 - 10:58

open the expression editor and I'm going

10:56 - 11:01

to use a little expression to tie the

10:58 - 11:04

opacity of this to that drop down menu

11:01 - 11:06

so we're going to point to the menu dot

11:04 - 11:09

value which would return a value of one

11:06 - 11:10

or two whether it's selected number one

11:09 - 11:13

or number two and we're going to make a

11:10 - 11:16

simple if else conditional so we're

11:13 - 11:19

going to say if m is exactly equal to

11:16 - 11:21

one or maybe I'll just say if m is

11:19 - 11:23

exactly equal to the index value the

11:21 - 11:26

index of this layer which is 1 you can

11:23 - 11:29

see over here a little one then the

11:26 - 11:31

result should be 100 else make your

11:29 - 11:32

opacity zero sure if my braces going in

11:31 - 11:34

the right direction and then we'll come

11:32 - 11:36

into the opacity of this and copy and

11:34 - 11:38

pasting the expression into the property

11:36 - 11:39

so now we could look at the back or we

11:38 - 11:41

could look at the Deep version and we

11:39 - 11:44

can toggle between them let's return to

11:41 - 11:46

in use so at this point in time we want

11:44 - 11:50

this to be on the Deep version around

11:46 - 11:52

here we would want it to be the back

11:50 - 11:53

version like this and of course one

11:52 - 11:55

thing you're going to notice right away

11:53 - 11:57

while that is backwards Evan so just

11:55 - 11:59

make sure you come in here and we're

11:57 - 12:02

going to go transform flip horizontally

11:59 - 12:04

problem solved so we're going to set

12:02 - 12:07

keyframes on that particular controller

12:04 - 12:10

so that it is going to look correct and

12:07 - 12:13

then at this point we are looking at the

12:10 - 12:16

front so we go like this and we can kind

12:13 - 12:19

of toggle through and see how that is

12:16 - 12:22

working for us go ahead and copy and

12:19 - 12:24

paste so this is going to slide into

12:22 - 12:26

frame looking correct does a little

12:24 - 12:28

switch over now we're looking at this

12:26 - 12:30

now it's going to go back there's the

12:28 - 12:33

switch copy paste

12:30 - 12:35

like that and we play it back looks like

12:33 - 12:37

it has a card back to it it's flopping

12:35 - 12:39

around even if it's only up for a couple

12:37 - 12:42

of frames it helps to sell the illusion

12:39 - 12:44

now what if we wanted to extend this

12:42 - 12:46

what if we wanted this to feel more

12:44 - 12:48

three-dimensional well if we call up the

12:46 - 12:50

scale of this object and we'll just

12:48 - 12:52

unlink them if you scale the Z depth

12:50 - 12:55

you're actually scaling this entire

12:52 - 12:58

thing back in space so if you wanted

12:55 - 13:00

this to say go from something that looks

12:58 - 13:02

pretty flat we could actually scale this

13:00 - 13:05

down to not be zero because that's going

13:02 - 13:07

to cause problems but something like .01

13:05 - 13:11

and then at a certain point you could

13:07 - 13:14

keyframe this to have some depth to it

13:11 - 13:16

so making use of the scale here can take

13:14 - 13:19

us from a three-dimensional version to a

13:16 - 13:21

flat version another way you might do

13:19 - 13:23

that is by adding another option to our

13:21 - 13:25

drop down menu control so let's go to

13:23 - 13:27

edit let us add another one of these

13:25 - 13:30

call this one flat so I'm going to come

13:27 - 13:32

in here I'm going to first set this to

13:30 - 13:35

flat at so now we're looking at nothing

13:32 - 13:37

I'm going to duplicate card deep and set

13:35 - 13:39

one at the bottom and let's call this

13:37 - 13:41

flat and all we have to do is uncheck

13:39 - 13:43

the collapse Transformations now this

13:41 - 13:46

will not have that kind of depth when we

13:43 - 13:49

come back into the in use Zone you can

13:46 - 13:52

see that this is now flat version so we

13:49 - 13:54

can toggle flatness or we can scale to

13:52 - 13:56

and from flatness another thing that I

13:54 - 13:59

want to point out one final note on this

13:56 - 14:01

is what if you wanted elements that

13:59 - 14:03

protrude out of the front of the object

14:01 - 14:06

so what if we wanted to have say our

14:03 - 14:08

hero object instead of being sort of at

14:06 - 14:10

the back let's push this towards the

14:08 - 14:11

front right at the frame and it's going

14:10 - 14:14

to be pushing forward if you come back

14:11 - 14:15

into here to in use you're going to see

14:14 - 14:17

that of course it's going to have

14:15 - 14:19

elements that get cut off as it flips

14:17 - 14:21

through all we need to do is to come

14:19 - 14:23

into this element and make sure that

14:21 - 14:26

these are not looking at this as a track

14:23 - 14:27

mat so we set that to be none and

14:26 - 14:29

anything that's set to none as long as

14:27 - 14:33

it's near the front of this object will

14:29 - 14:34

seem to protrude out of that element so

14:33 - 14:37

I'm just going like this so you can see

14:34 - 14:39

indeed that does appear to be poking out

14:37 - 14:41

of the frame so if you want things that

14:39 - 14:44

are inside the shadow box and outside

14:41 - 14:47

the shadow box the big differentiator is

14:44 - 14:49

that track matte situation in here all

14:47 - 14:51

right that's it for me I hope this

14:49 - 14:52

technique is helpful and useful for you

14:51 - 14:55

and that you make something interesting

14:52 - 14:57

with it if you do please share it with

14:55 - 14:59

me I'm at EC Abrams on all social media

14:57 - 15:00

platforms and I love to see what people

14:59 - 15:02

make from what they learn around here

15:00 - 15:04

the project files for this particular

15:02 - 15:06

piece are available at the links in the

15:04 - 15:08

description so please Avail yourself of

15:06 - 15:10

those and if you want more tutorials

15:08 - 15:12

like this in your life make sure you

15:10 - 15:13

subscribe right here on YouTube so you

15:12 - 15:15

don't miss out and you'll likely want to

15:13 - 15:18

follow me on Instagram or Twitter or

15:15 - 15:19

behance or all those other places around

15:18 - 15:21

the internet for announcements live

15:19 - 15:23

streams I'm up to all kinds of things

15:21 - 15:25

out there but thank you so much for

15:23 - 15:27

watching until next time stay creative

15:25 - 15:30

be kind to each other and I'll see you

15:27 - 15:30

around the internet

Exploring Shadow Box Technique in Adobe After Effects

This tutorial by Evan Abrams delves into the shadow box technique in Adobe After Effects, creating a window into a 3D space without external walls hindering the view. The tutorial makes specific use of the updated track matte system in After Effects 2023. By following along, viewers can learn to manipulate layers, create depth, and utilize track mattes to enhance their projects.

Creating the Shadow Box: An Overview

The tutorial begins by designing the object in Illustrator, separating layers for different parts. Importing the object into After Effects, Evan makes each layer 3D and continuously rasterized to retain vector quality. By adjusting positions in 3D space, a sense of depth is added to the object. Utilizing the track matte column, the layers are confined within the visible space, creating the shadow box effect.

Enhancing the Technique

To address issues that arise, Evan explores various solutions. One option involves adding a background layer and effects to create a more immersive scene. Another method includes introducing walls behind the object to conceal unwanted elements. Additionally, Evan demonstrates how to toggle between 3D and 2D versions of the object using expressions and drop-down menus.

Adding Depth and Dimension

To further refine the technique, Evan shows how to scale layers to add depth perception. By scaling the Z-depth, the object transitions from a flat appearance to a three-dimensional view. Incorporating a "flat" option in the drop-down menu allows easy switching between different perspectives.

Conclusion and Further Exploration

As the tutorial concludes, Evan encourages viewers to experiment with protruding elements and share their creations on social media. The project files are available for download, enabling users to practice and expand their skills. By subscribing to the YouTube channel and following Evan on various platforms, viewers can stay updated on future tutorials and creative endeavors.

Embrace the shadow box technique in After Effects to unlock new dimensions in your projects. Let your creativity soar and master the art of creating captivating 3D spaces. Dive deeper into the world of motion graphics and stay inspired on your creative journey!


By following Evan's techniques, you can master the art of creating captivating 3D spaces in After Effects. Take your motion graphics to the next level and immerse yourself in the world of shadow box techniques. Let your creativity shine as you craft intricate visual experiences, opening windows into boundless artistic possibilities.