Z-Depth Compositing

Integrating stock footage with 3D renders can help sell the realism of otherwise plain 3D rendering but compositing 2D stock footage with 3D renders can be challenging. Especially when you want 2D Elements like fire or smoke to exist in the same space as the 3D renders instead of simply comping them on top or behind.

Depth Compositing is one answer that allows you to control where 2D objects appear in the depth of your 3D rendering. Basically this method allows parts of your 3D render to be in front and behind your 2D Footage.

Does this even make sense? Just watch the video, it’s got Sam in it and a parking garage! One of them charges quarters for every 15 minutes and the was free!

The 3D was created in 3D Max using Rayfire. I’ll be making a more detailed tutorial as well! I’m really trying to make more short tutorials like this so people can get to helpful tips fast!

NOTE: Z-Passes can be generated automatically in a 3D Program when rendering.

151 RESPONSES TO "Z-DEPTH COMPOSITING"
May 31st, 2012 @ 12:19 am
Very cool, I'm gonna have to give this a go. Nice breakdown too :)
    May 31st, 2012 @ 6:48 pm
    Yup! I know what his talking about bec I have done it a hundred times and it absolutely definitely awesomely work! :D
    Cesar Bidoia
    June 1st, 2012 @ 9:40 am
    Ok, great , but i read some articles about a real depth compositing, not using z pass.Its a new method that renders a depth information for every pixel.Anyone know something about that? Cause, if im not mistaken, when you use z deth pass all you are doing is making a opacity transform(does it makes sense?) so even do you put the smoke in the middle of the concrete, what behind of it will have some kind of transparency, but in real life that would be solid.(hope it makes sense).
    Cesar Bidoia
    June 1st, 2012 @ 9:43 am
    Thats what i was talking about
    http://www.deepimg.com/in-depth/
May 31st, 2012 @ 12:22 am
Huge as always! Thanks Andrew...
    May 31st, 2012 @ 7:31 am
    always better, ak is improving on and on!
richard liu
May 31st, 2012 @ 12:24 am
Great job! this is a pretty cool video with nice acting and music :)
    Dmitriy
    June 1st, 2012 @ 7:38 am
    Nice try Andrew... WHAT ABOUT ELEMENT 3D??? )))
Farshad
May 31st, 2012 @ 12:24 am
Very Good and Very Cool
Thank you Anderw
    Jovica
    June 10th, 2012 @ 5:22 am
    Andrew.... not Anderw :D
Grantex
May 31st, 2012 @ 12:24 am
your always amazing.
May 31st, 2012 @ 12:46 am
Please could you make an indepth tutorial on this, it would be a good skill to have.
May 31st, 2012 @ 12:50 am
Was good
Same Good job
SDive
May 31st, 2012 @ 12:59 am
The difference is night and day! May I ask, was this accomplished in After Effects? Or does the integration with the depth pass need to be done in a 3D software package?
    May 31st, 2012 @ 11:48 am
    itīs probably done in after effects,using the z depth pass as a matte .. i guess ..
    Owen
    May 31st, 2012 @ 2:24 pm
    The Z pass was made in a 3D but the integration was done in AE!
    SDive
    June 12th, 2012 @ 6:13 am
    Thanks for the replies, guys!
May 31st, 2012 @ 1:07 am
Very quick and useful information. And fastest tutorial ever :)
vfx
May 31st, 2012 @ 1:07 am
Awsomeeeeeeee!!!!! Tut pls ;)
rob
May 31st, 2012 @ 1:16 am
Nice one andrew! im glad you havent forgot about your beloved community :D
Martin
May 31st, 2012 @ 1:22 am
Wow. That actually made a whole lot of sense. Thank you! I'd try to figure out how you did it, but I guess I'll just wait for your upcoming tutorial(?)

Cheers :)
Adnan
May 31st, 2012 @ 1:23 am
Mr Andrew always tries to kill Sam :(
    May 31st, 2012 @ 2:28 am
    he he he
    Yeah, Sam always wants to die :D
alwadhani
May 31st, 2012 @ 1:23 am
i think it's similler to the tutorial about the apple app, which you used the 3d depth map to control the reveal of the lady face and body.
Farshad
May 31st, 2012 @ 1:33 am
Another one with Sam escaped death
cherif
May 31st, 2012 @ 1:34 am
3dsMax and Rayfire for the 3D object?
May 31st, 2012 @ 1:37 am
as always you re the best.
May 31st, 2012 @ 1:42 am
Sam should go to Hollywood
    May 31st, 2012 @ 3:09 am
    There is already a professional Andrew...
    Umer
    June 1st, 2012 @ 9:00 am
    May be they should make there own new "Andrewood"
FLIMEMA
May 31st, 2012 @ 1:48 am
So I'm assuming you're simply using the depth pass as an alpha matte for the 2D stock in AE?

Can't say I've ever thought of trying that before.
CRoblex
May 31st, 2012 @ 2:10 am
Nothing can stop Sam, that guy is my hero. Bruce Willis is a child in comparison. You'll need several entire buildings to hurt him, Andrew. And then he'll take revenge...
Jay
May 31st, 2012 @ 2:24 am
It really feels alive.

Are we going to see Sam get hit with a piano or an anvil in the near future?

Many thanks

Jay
thewalkingneo
May 31st, 2012 @ 2:27 am
can`t see vimeo in china ....
    May 31st, 2012 @ 7:34 am
    google "VPN"
May 31st, 2012 @ 2:31 am
Hey Andrew!

Love the breakdown, but I am curious, where do you get your fantastic catchy soundtrack from?

Much Love
Kieren
May 31st, 2012 @ 2:31 am
Hi
Thanks VC !
Very Nice
May 31st, 2012 @ 2:48 am
This looks again really cool but ok, I guess I need some explenation on th Z-Pass. cause I have no idea what it is for or how to make it. (i use c4d)
    May 31st, 2012 @ 7:52 am
    All you have to do is add the "Depth" multipass renders in C4D. Use it as an alpha matte or whatever suits your needs...like DOF :)
May 31st, 2012 @ 2:56 am
Man thats freaking AWESOME!!!!!! I LOVE VC.. it always help me to learn new things.. thanks andrew!!
    May 31st, 2012 @ 3:59 am
    :D But IN order to BE professional U SHULD learn these kind of small stuff
James
May 31st, 2012 @ 3:07 am
Ummm...and how does one achieve that exactly? Maybe I'm missing something but I can't figure out how you did the "mix & stir"
    James
    May 31st, 2012 @ 4:21 am
    I guess I don't understand what the z-pass does...I'm a 3d newbie
    May 31st, 2012 @ 7:56 am
    The "mix n stir" is where you take the tracked footage(with solved camera) and combine your 3D render with different 2D clips distributed in 3D space in AE. If you use the Z-depth as a track matte it will magically adjust the transparency of the 2D elements so they appear to "mix" with your 3D render. Enjoy!
    May 31st, 2012 @ 8:34 am
    Check out the Portal Tutorial we do something similar with a Z-pass. I'll probably make a short tutorial for this as well.
    James
    May 31st, 2012 @ 9:17 am
    Aaah...very cool. I will check out the Portal tut...thnx!
med abid
May 31st, 2012 @ 3:07 am
Usual, always creative
Thanks
Danny
May 31st, 2012 @ 3:14 am
Woooow , AMAAZING .... soooo realistic.

Danny , from Roumania.
May 31st, 2012 @ 3:27 am
Hey Andrew,

can you upload it to Youtube? somehow the video is blocked :/
DJOzmanMJ
May 31st, 2012 @ 3:44 am
Amazing man, you're the best compositer I've ever seen and btw funky beat ;P
Siavosh Mehraein
May 31st, 2012 @ 4:00 am
Good tips.
this one was a very quick useful tutorial.what is the 3d program used in this video? 3ds max?
    James
    May 31st, 2012 @ 7:17 am
    I'll bet it was done with Element
    James
    May 31st, 2012 @ 9:13 am
    I think Andrew just updated the post (unless I'm losing my mind & didn't read that far...) and added that the 3D was done in 3dmax...so I guess Element wasn't used in this example...
Daruis
May 31st, 2012 @ 4:26 am
omg it's look too realistic man just like hollywood movies we should see you name in the cast soon enoguh in hollywood action movies VFX By:Andrew Kramer hahaha
Boom ROom
May 31st, 2012 @ 4:28 am
Nick
May 31st, 2012 @ 4:33 am
Nice job Andrew!!Can't wait till next tutorial!!!
One question though:
Where do you find all these sweet songs you put in your short videos???
May 31st, 2012 @ 4:54 am
This is cool but what tools or techniques are available to extract Zdepth from existing footage? I'm dying to crack this nut.
    May 31st, 2012 @ 8:36 am
    Not exactly. If you have existing footage you might just use masks and things to create the occlusion. It comes in handy more to get rid of the perfect CG look of geometry destruction to add more chaos.
    Alan
    June 1st, 2012 @ 2:34 am
    You Cannot Extract Zdepth from a 2d footage using after effects although there is a way in nuke by using camera traker and a depth generator node
    Cesar Bidoia
    June 1st, 2012 @ 9:51 am
    yes, you can, but its expensive at the moment, look
    http://www.yuvsoft.com/
    John
    June 6th, 2012 @ 10:36 am
    Andrew, a roto-generated depth map would make a good advanced tutorial or part 2 to what you plan to do here, for those of us who like to get crazy. It will also be interesting to see when AE takes on deep compositing.
Basuru
May 31st, 2012 @ 5:12 am
Need a Gr8 tutorial from you for this one :) !!
chris
May 31st, 2012 @ 5:16 am
More tutorials on reactor in 3DS Max would be great.
Markus
May 31st, 2012 @ 5:42 am
how do you get z-depth from existing stock footage?

i assume you cant?
Declan
May 31st, 2012 @ 5:43 am
That was really good although the footsteps weren't in time.
ColTrigger
May 31st, 2012 @ 5:48 am
Well, using Stock-Footage from AE2 is one Method, but I like it better to create my own if I'm using CGI anyway.
C4D got some great new plugins for creating Dust, Smoke and Fire. It' not like I don't like AE2, but I see it everywhere and I like my stuff to look unique and I also like to know that noone will see on the first look how I made it.
So when I use AE2 its in combination with CGI, this way I think it adds even more realism.
    May 31st, 2012 @ 8:37 am
    Absolutely. Combining smoke simulations with real footage makes a big difference. Using things like fume FX is great but to get the scale of the detail right can be very slow but with this method you can combine everything together.
May 31st, 2012 @ 5:55 am
You need to make more 3D tutorials on how to make stuff like that!!! :)
May 31st, 2012 @ 6:11 am
Very cool! Thank you very much for putting this video together.

Video Copilot has been very busy lately, working on 2 tutorials, holding a matte painting challenge, working on Element 3d, working on Optical Flares for Nuke, and working on Demon Cam for Android!
Mike
May 31st, 2012 @ 6:27 am
You missed killing Sam this time, Andrew. Looking forward to your next attempt...
Ahmed Rashed
May 31st, 2012 @ 7:26 am
OK ! and where is the toturial ??!!!!!!
Ahmed Rashed
May 31st, 2012 @ 7:27 am
OK ! ! and Where is the Tutorial ?????
Eric
May 31st, 2012 @ 7:42 am
This looks fake and kind of cheesy to me, am I the only one?
    May 31st, 2012 @ 8:53 am
    No. It's cheesy, trust me!
    James
    May 31st, 2012 @ 9:38 am
    I think it looks great...
    May 31st, 2012 @ 11:21 am
    Eric. When you have your own website that thousands of people visit daily, and are pumping out tutorials to help educate and inspire those people. I'll make sure to drop a post and ridicule your work. Until then (probably never), good luck on presumably un-succesful social life.
    Daruis
    May 31st, 2012 @ 11:53 am
    are you kidding me it's so realistic!
    JeffO
    May 31st, 2012 @ 6:06 pm
    Andrew, If you rotate the falling concrete beam 45 degrees counter clock wise (so it lines up with the beams shown above Sam's) all of the cheese will become Cheeze-Its!!
    Mo’stafa Mo’sa
    May 31st, 2012 @ 7:35 pm
    Eric....Make It Look Great Not Real...! that's your motto when creating vfx in movie..!
    June 1st, 2012 @ 12:27 am
    I gotta agree with Mo'stafa. If it were "real," the concrete would have just fallen with little to no crumbling, especially no shatter - it should be reinforced with iron rebar, after all. But that is very undramatic and lacks kinetic energy. (besides, if it were reinforced it wouldn't have fallen... am I thinking about this too much?)
    Cheezwhiz on very crumbly crackers.
    Mo’stafa Mo’sa
    June 1st, 2012 @ 4:30 am
    you are right Tokyo but sometimes when you intend to create dynamics shot or 3d scene. you should use a reference such a photograph .Thanks ?
Tim Creed
May 31st, 2012 @ 7:52 am
This reminds me that I still need to buy Action Essentials 2. Very interested in this!
    Ben Jones
    May 31st, 2012 @ 10:30 pm
    yea.. I finally caved and bought it too... very useful. A lot better than most of the stock footage out there too.
May 31st, 2012 @ 7:57 am
There are some great tools/scripts for that by EFX

http://aescripts.com/efx-render-elements-z-depth-tools/
BattleSH0t
May 31st, 2012 @ 7:58 am
Wooo... That was cool : D
May 31st, 2012 @ 8:01 am
This looked great. I really need to learn how to do 3D cause at the moment all I know is 2D compositing :(
May 31st, 2012 @ 8:01 am
They just don't build things to last anymore, let that be a lesson to us all, use open parling lots!

Exceptional well done as always Andrew.

Hat tip to Sam Loya on the acting front, he throws himself right into this stuff.
Phill
May 31st, 2012 @ 8:02 am
I like the part where it sounds like Sam has high heels on :D
Arthur Bizkit
May 31st, 2012 @ 8:08 am
Lady & Gentlemen, He's Back!
Bj
May 31st, 2012 @ 8:11 am
Nice one Andrew Kramer!Just what I would expect from VideoCopilot.
LOL
May 31st, 2012 @ 8:12 am
Hello andrew amazing stuff here i love you rayfire simulation can you give some tips fir a good fragmentation a good texturing and a good zdepth ? aamazing stuff


thanks you for this video

Eric
france
Eric
May 31st, 2012 @ 8:36 am
You keep throwing and throwing new knowledge at our faces just to avoid the matter that we are all waiting for. You know what I am talking about. Yeah. Gimmme the obj particllleeesss with wierd noise animations ahhhhhh :P
I hope everything is going well for you guys at Video Copilot R&D. Cheers from Montreal
May 31st, 2012 @ 8:41 am
AWESOME ANDREW!!! check out my test I did with the camera tracker and C4d ;) https://vimeo.com/35653021
sabini1
May 31st, 2012 @ 8:57 am
Thank you very much Andrew :)

Did you use the built in materials of Vray or Mental ray
for the cg model or created it yourself?

Greetings from Israel :)
Farshad
May 31st, 2012 @ 9:15 am
Very Cool but Andrew , where you create Z-Depth ? in AE or 3D MAX ??
Justin
May 31st, 2012 @ 9:17 am
YES MORE TUTORIALS, THANKS ANDREW! I check Videocopilot every day hoping for more updates!
Silas
May 31st, 2012 @ 9:43 am
You should start a text file with a list all of the tutorials you have yet to make, because it seems like you forget about some and move on. I'm almost completely positive it's because you're extremely busy, but there have been plenty of great tutorials you've promised that haven't come out. Sorry about the whining.
May 31st, 2012 @ 9:45 am
Andrew I've found one mistake! The sound effect of a walking man, doesn't match with Sam's shoes:))))but other then that is awsome! Waiting your JUNGLE tutorial.
vers
May 31st, 2012 @ 10:08 am
yeah, love the breackdown in the end...itīs great to see that there are more tutorials coming with 3d integration!
May 31st, 2012 @ 10:35 am
Wow this really cool , waiting for the tutorial
A3
May 31st, 2012 @ 10:38 am
Hi Andrew, I was reading and listening podcasts about deep compositing, as used on Rise of the Planet of the Apes, for example (http://www.youtube.com/watch?v=19w3vkFp5X0). It was done using nuke.

In your example, did you use several planes inside 3dmax with the stock footage on them as textures so they can merge well in between the object parts? Or did you find a way to use some kind of deep compositing inside AE?
Roy
May 31st, 2012 @ 11:03 am
yeahhhh great come back as usual, andrew please give me the name of the bg music .
Hendrik
May 31st, 2012 @ 11:43 am
I wonder if the result will be same when the camera actually moves forward in z... i suppose the depth map changes in that case?...
    Steve Green
    May 31st, 2012 @ 1:33 pm
    Depends how you do it - in Max for example you could generate it by using a falloff map applied to the 3D objects referencing a static object in the scene rather than the camera itself.
    hendrik
    May 31st, 2012 @ 2:32 pm
    so does this mean whatever the case, the depth map can be used to pin a 2d object to an intended point in z space.. It is possible to do by copying the coordinate numbers from c4d to after effects but i was not aware of doing the same with depth map...
    Steve Green
    May 31st, 2012 @ 11:49 pm
    It's not really the position you're copying though just getting the alpha to refer to a range of z-depth to give an illusion, since the stock doesn't have any z-depth.

    It may be OK for something that's over quickly like these impacts, but not sure if it would be much too obvious on something more persistent where the camera move a lot or panned around rather than being flat on.
May 31st, 2012 @ 1:02 pm
the depth looks great, I'm experimenting using RPF files when exporting from 3dmax.not a lot of tuts out there explaining how to export(and import to AE) RPF files properly from any 3d app.maybe you could explain the use of RPF in one of your up coming tuts?
R-CANE
May 31st, 2012 @ 1:58 pm
I just dropped an actual piece of stone with a couple of guys that size from a ladder in the parking garage down the street from here and it didn't even look near as real as in this video!
Trevor
May 31st, 2012 @ 2:48 pm
I would just like to thank Sam for, once again, risking life and limb so we can enjoy this footage. Sam is a real hero - brave, courageous, always walking into situations without a care for his own safety. Throwing live hand grenades, being run over by a truck, being possessed by a demon, being infected with bugs under his skin... you name it, he's done it.

I'm glad he narrowly escaped disaster in this one, so he can come back and put it all on the line again... and again...
bwoogie
May 31st, 2012 @ 4:03 pm
Crap! Sam almost died! Again!
May 31st, 2012 @ 4:16 pm
Tutorial please...,Sam...cool...
Silas
May 31st, 2012 @ 4:55 pm
please do a tut on this!
May 31st, 2012 @ 5:53 pm
Yeah! I know what his talking about and I've done it a hundred times and and it really works! :D
May 31st, 2012 @ 6:40 pm
where do i get that stock footage of that brick breaking down.PLease say... i want it for my project!!! I'm a big fan of you!
DeviouS
May 31st, 2012 @ 9:46 pm
Sure hope part of Sam's salary includes hazard pay. hehe

You sure do love inserting him into dangerous situations. Collapsing buildings... grenades... subcutaneous, flesh-eating insects...

What's up next in the Chronicles of Lloya
May 31st, 2012 @ 10:20 pm
You spared the Samīs life. :)
May 31st, 2012 @ 11:51 pm
Hey guys check out this AE Video.
Its awesome!
http://www.youtube.com/watch?v=TTqm0YsnqrM
    Sean
    June 1st, 2012 @ 9:31 am
    What is awesome?
micheal
June 1st, 2012 @ 12:31 am
well done but that it's the lesson of "the portal" also applies Z depth of well here like that on another
Sam Mundon
June 1st, 2012 @ 1:44 am
Hey Andrew, great little movie, just wondering, will the Z depth passes be something you can generate with your new plugin element 3D or would that not be possible?
Mike
June 1st, 2012 @ 2:16 am
Hey,,,
Whats up with sam wearing high heels that click clack when hes walking in a parking lot?
Amer
June 1st, 2012 @ 2:36 am
Andrew, can you release a bunch of these 3D elements in a stock pack? Like a mini action essentials? I would be very interested in buying that, as I (like many others) lack the 3D skills and don't have time to learn 3Ds Max.
rajesh
June 1st, 2012 @ 2:48 am
i am not able to see the image or video tht is posted in blog .. some (Access to this site has been blocked as per Court Orders) msg is appearing behalf of tht post .. what shold i do ?


help me someone pls
Matt
June 1st, 2012 @ 3:01 am
It doesn't matter, I really like your long tutorials :-)
Alistair Jake
June 1st, 2012 @ 3:13 am
This is very Cool, interesting indeed!!! hopefully the tutorial should come earlier, thanks
John
June 1st, 2012 @ 5:16 am
Just in time
i am working on something and need this thing
tuts Plz

:D Andrew you are amazing man hope for you more and more success

Thanks man for helping us with these amazing tutorials
June 1st, 2012 @ 7:04 am
Andrew, you've done it again! I'm sure you know this, but what you do has a HUGE impact on this industry. Seeing stuff like this helps me to remember why I got into computer graphics in the first place. If you ever consider serious visual effects training, I'd pay! Just sayin'. :)
Jerard
June 1st, 2012 @ 8:35 am
is that plexus??? nice... breakdown please...=)
June 1st, 2012 @ 6:49 pm
i hope the tutorial will come soon ^^
shalae
June 2nd, 2012 @ 1:51 pm
Great Andrew, it would be nice if you make a tutorial of this video.. ;)
Sahil Siddiqui
June 2nd, 2012 @ 6:24 pm
Is sam working out :O
He looks Fit in this video
Irfrandes0930
June 2nd, 2012 @ 8:33 pm
i hope the tutorial will coming soon
Imran Khan
June 3rd, 2012 @ 4:59 am
Super! Great Work Thanks for this Tutorial.

Andrew Kramer
is
Back
after the FX
June 3rd, 2012 @ 8:57 am
woooooow this really cool , waiting for the tutorial!!!
can someone give me the name of the FX sound and music using in this video ??? pleassssse
June 3rd, 2012 @ 7:41 pm
Hello Good work my friend check mi channel youtube.com/magikodj thanks for your tutorials
genobambino
June 3rd, 2012 @ 9:03 pm
Why doesn't Sam have his own TV show?
Tim
June 4th, 2012 @ 7:19 pm
Hi Andrew,

I know you are really busy at the moment with the new site and product launch coming up but could you let me know what camera was used for this composition. It looks good! Also, did you use anything to bounce the daylight on to Sam? I know lighting is key to make good filming.

Thanks
fyzANDme
June 5th, 2012 @ 5:52 am
whaaaaoow ! awesome !
June 5th, 2012 @ 2:38 pm
Thanks Andrew this is awesome. This is gonna save me from dropping concrete blocks for each take. Is it easy to modify this file in AE, any plugins required?

-Matt
Alex
June 7th, 2012 @ 1:21 pm
Did you use 3D channel extract effect in AE or something other?
June 9th, 2012 @ 10:41 am
I find this horribly helpful for ideas and i look forward to the tutorial! :)
Jovica
June 10th, 2012 @ 5:28 am
Andrew... you have great team :D
Abraham
June 10th, 2012 @ 6:16 pm
I know
u used : 3dmax + Fracture + V ray + AE + Camera tracker + action essentials I think so!

By the way nice video
Akhilesh
June 11th, 2012 @ 5:55 am
Andrew dude, u rock!!!!!!!!!!! :D
U are ma guru in other word ma teaher in after effect (Indirectly). :)
Genegene
June 14th, 2012 @ 7:43 pm
Looks amazing. Anyways anyone knows the sound? its freaking cool!
June 29th, 2012 @ 1:09 pm
Hey Andrew, nice short tutorial, but I'd love to see a more "in depth" one showing how you mix n stir. Also, maybe a stupid question, but how did you get the geometry shadows to import into your scene? Thanks.
Nuurs
July 1st, 2012 @ 5:55 pm
Hey Andrew impressive work here as usual, I'll like to know how can I do it, but instead of using 3D Max and Rayfire, I'll like to know how with Cinema 4D and Thrausi 1.22 R12, because there's not much interesting C4D tutorials online showing After Effects integration, Hopefully with your new 3D plug-in we'll have more about C4D and AE, trust me man I'm C4D user and I know that 3D's Max is an standard in the industry, but C4D is as much as powerful, but with not much interesting tuts online.
Please man make some, please.
Keep the awesome work and hope you'll be back soon Andrew San Diego!, lol
Shahab
July 2nd, 2012 @ 3:33 pm
hi,
Did you track the camera and then render your 3d scene ? or this is the fake camera movement at the end ?
June 17th, 2014 @ 7:12 am
Thanks Andrew this is awesome. An impressive work here.

hope you'll be back soon.

Aste al Centesimo
POST A COMMENT!
Before Posting
We're trying to encourage more thoughtful commenting.  Please take a moment to write a meaningful response to this post.
* Name
* Email (will not be published)
Website
* field is required