Create a 3D Scene from a Single Photo in After Effects | In-Depth PARALLAX Tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments

Great tutorial! I love photography, I wonder if opening the aperture of the camera would have the same effect of blurring out the city background.

👍︎︎ 3 👤︎︎ u/George_Jefferson 📅︎︎ Jan 30 2021 🗫︎ replies

Good stuff man, glad you followed through with the tutorial.

If I'm gonna be picky, I like you added the shadow but you forgot to angle it. It's good you took the train, rotated it 90 degrees and stretched it. But if you look at the other shadows in the photo, they are at an angle. Regardless, this whole project is spectacular

👍︎︎ 1 👤︎︎ u/wonderboi_777 📅︎︎ Jan 30 2021 🗫︎ replies

[removed]

👍︎︎ 1 👤︎︎ u/[deleted] 📅︎︎ Jan 31 2021 🗫︎ replies
Captions
hi everyone today i will be showing you the steps you can follow to bring a still photograph to life and turn it from a 2d flat image into a really cool 3d scene by creating a parallax effect so first thing we need to do is slice the image into different layers and to do that we're going to be using adobe photoshop and if you already know how to do this just feel free to skip ahead to the animation part also keep in mind that all project files are available on my patreon for those of you who wish to skip certain steps or simply want to have a clear idea on how this was put together right once you start photoshop go ahead and import the image unlock the background layer select it and press enter to rename and i'm gonna call it original and we're gonna be going through the process layer by layer so let's start by separating the couple and the bench here first duplicate the original layer by pressing ctrl j let's name it couple hide original select the couple layer and now go ahead and choose the pen tool and as you may have guessed we're now gonna draw a mask around the couple and their bench i won't be including any shadows in my mask and i will let that be a part of the ground instead which i will be isolating in a separate layer later on as well once you're done drawing the mask go over here and click add layer mask click one more time on the same icon to create a vector mask and what i want to do now is erase some areas that are not part of my subject here as i can still see some sections of the ground in my image one way to do that is using the brush tool so let's go ahead and change to that currently my background color is set to white and my foreground color is set to black which means we're able to use the brush like an eraser and by the way here is a really cool trick you can use to speed up the process if you want to erase along a straight line you can click on the end of either side hold shift and click once on the other end so you can definitely take advantage of that to avoid causing any rough edges while you're erasing also note that anytime you make a mistake and wish to change the brush back to the drawing mode you can just press x once which will swap the background color back to white and you can now use the brush tool to bring back the parts which you've deleted by mistake keep in mind that some masking techniques such as this one are really time consuming and requires a lot of patience so to avoid having a super long tutorial i will be speeding some of these parts up but i will do my best to explain the main techniques that you need to be aware of in order to be able to split the layers seamlessly on top of that i actually did upload a separate video of the whole recording so do check it out if you wish to watch an uncut version of the whole photoshop process all right now that we're done with the couple and bench layer we can move on to the remaining subjects so enable the original layer once again duplicate it rename the copy to trees hide the other layers now to isolate the trees i could obviously use the same masking technique by drawing around using the bend tool but since the trees have a lot of details especially around the branches here using that method would take me ages so instead i'm gonna use the magic wand tool let's bring the tolerance up to somewhere around 70 and now click anywhere inside the tree and what this does is that magic wand 2 will include other pixels that are close in color into your selection now go down here and click add layer mask as you can see the branches part isn't so bad yet the magic wand tool did include parts that we don't need as well as remove some areas which are actually part of our subject so we're gonna have to fix that manually now so to do that with the layer mask selected go ahead and change to the brush tool make sure the foreground is set to black and now we can start erasing around the trees and if you want to double check if you're not leaving any spots behind you can create a new layer place it all the way at the bottom fill it all in red and this high contrast of colors will allow you to easily spot any parts that you've missed so yeah that's a really uh cool trick i learned along the way if you guys know about any other cool tips yourself don't hesitate to share it with all of us in the comments below once you're done with that there are still few parts which i want to restore so let's hit x again and start drawing on the areas which the magic wand tool excluded once you're done with that you'll end up with both trees in one layer all cleaned up and now we can move on to the train part once again select the original layer duplicate it let's give it a name and hide the other layers so we can focus solely on this one as we did with the couples and the trees now the only difference here is that there are other elements here blocking our subject such as the fence and the trees the challenging part here is to actually recreate parts of the train which are covered by other elements and to do that you need to switch over to the stamp tool which will allow you to grab samples of your image and paste them elsewhere to do that make sure the train layer is selected set the brush opacity to 100 and for example here i can tell for sure that behind this fence i should be able to see solid orange color similar to what's clearly visible on top here so i can just use the stamp tool to grab samples from the plain orange area here by holding alt left click and simply paste it over the elements that you want to remove and always keep an eye on this little white cross here which works as a reference to what you're copying and that's pretty much the main technique you need to use here to paint over and recreate these blocked sections of the train now of course it does get a bit complicated at some parts so again if you need to learn more about this part do check the extended video which i will link in the description down below now keep in mind that this doesn't have to look absolutely perfect since the train will be animated and you will barely notice any flaws all right now that you're finished painting the train simply go ahead and draw a mask around the train using the pen tool take all the time you need here to make sure that you're drawing a really clean mask and once you're done uh click here on add layer mask click one more time to add vector mask and again similar to what we did with the couple and bench layer with the layer mask selected we're gonna erase the parts of the train which we're supposed to be able to see through to make it even easier you can use the magic wand tool to select those parts since the sky which you can see through the windows is almost plain in color just make sure that contiguous option is enabled and you can even select multiple areas together by holding down shift prior to each selection and this way erasing with the brush tool will be limited within that selection now all that's left to do here is to extend the layer so we can create a longer train so to do that select the train layer duplicate it and let's move the copy down here select the layer mask choose the rectangle tool draw a rectangle around the front part here and let's use the brush tool to erase it press ctrl and d to deselect and as you can see now i'm moving this copy towards the back here to extend the train and now you can just repeat the same process simply duplicate the train copy into as many layers as you wish depending on how long you want the train to be and by moving each of these copies to the back you can extend the image now go back to the train layers select the one at the very top hold shift and click on the one at the very bottom to select all of them now drag all the layers down towards here to group them in one folder which i'll simply name train select the group that you just created and press ctrl t to transform and as you can see here all the layers are now stitched together creating a long vehicle the only thing i want to add to this is a cabin at the very end so let's select the very first train layer and rename it to front duplicate it and rename the copy to back bring it over here then go to edit transform and flip horizontal and simply move the layer all the way to the end to create the back section of the train [Music] moving on let's now focus on getting the fence separated into its own layer select the original layer duplicate it and name the copy fence hide the other layers and similar to what we did with the train you can go ahead and use the stamp tool to recreate the covered parts of the fence and by the way you can also try and use the content aware feel feature which is really powerful and meant to remove elements of your scene very easily however it didn't work pretty well for me here since the image is kind of complex hence why i'm doing it manually instead but you can always try that first because when it works it really saves you a lot of time once you're done stamping go ahead and create a layer mask and to isolate the fence properly we need to erase everything around it so this time i'm going to use the quick selection tool which in my opinion is way smarter than the magic wand tool so all you need to do is draw around the area you want to select and the tool will automatically select similar tones and stops when it finds image edges after that go ahead and select the brush tool to erase inside the selection i find that this works really well for this part and as you can see guys you can always combine different tools in the same project i highly encourage you to experiment with different tools before deciding which one to use there is really no right or wrong it all depends on the content you're editing and how much time you're willing to spend perfecting the selection or any other type of tasks that you're working on now as i mentioned earlier this layer is meant to have the fence only so let's go ahead and remove the ground so maintain the layer mask selected and draw a rectangular shape around the ground here and use the brush tool to erase within the borders and finally press ctrl d to deselect now let's go ahead and hide all layers switch the original layer back on and rename it to ground and as the name implies we're going to be working on painting the blocked parts of the ground as well as erasing everything else around it i imagine most of you at this point can't wait to jump over to the animation part and assuming that you are now able to combine all the tools and tricks i've used up until now i strongly believe you guys know exactly what to do here and don't really need any detailed guidance for this specific part so to avoid dragging this video any longer once you're done cleaning up the ground don't forget to erase everything else that remains around it now the only thing left in this photoshopping part is the city background and since most of the current background is hidden by the train i've decided to grab another skyline image here that i want to use so let's import that over and place it at the very bottom below all layers now let's move it down a bit and position it properly you can also use the stamp tool here to extend the top part so you can feel the frame now of course the colors of this image don't really match the rest of the scene so let's do some adjustments first create a hue and saturation layer right click on it and create a clipping mask to make sure it only affects the layer that's directly below it now let's bring the master saturation down a little bit i want to desaturate the sky itself so let's change over to blue here and desaturate it as well now let's add an exposure layer create a clipping mask bring the exposure a bit higher and bring the gamma down now let's add levels create a clipping mask and simply bring the mitts down a bit and just like that the city fits way better into the overall tones and colors of my scene right now that we're done with the photoshop part let's jump over to after effects and start animating first thing you need to do is import the psd file you just created when this window pops up change the import kind to retain layer size and enable merge layer styles into footage and click ok as you can see after effects created a new composition from the psd file which we just imported inside which you can find the exact same layers that we just isolated first let's switch all of these layers to 3d you can do that by clicking here and dragging down along all the layers and since we're talking about 3d layers now we certainly need to create a camera so go over here to layer new camera set the focal length to 50 and film size to 35 and click ok now to understand how all layers are put together in 3d space let's add another view here for now the one on the right will display whatever our camera is looking at and this one on the left is currently showing us top view of our scene as you can see here there's our camera and right in front of that this straight line over here represents all the layers which are currently placed on the same coordinates to change that and eventually achieve the parallax effect we're gonna work on moving those layers and place them on different z coordinates to create an illusion of depth let's start with the city skyline first so go ahead and select the city layer and what you need to do is simply push it further from the camera by increasing its position value on the z-axis you can either do that by pressing p and changing the third value here or by simply holding the z-axis inside of the selected layer here and drag it further away from the camera and as i'm doing that you can see in our camera view that the city is being pushed further and further now i went through this step before and i know that it's good enough to push it this far away now the only issue here that pushing a layer further makes it seem smaller so to fix that simply press s to bring the scale property up and simply bring the value up until the layer fills up the frame completely oh and by the way you can always use the dolly tool and other camera features available here to test how things look like actually before you do that let's go over here to the train layer and disable collapse transformations and now you can see as we move forward the city skyline seems way far away compared to the foreground so that's a very good start right moving on let's switch all layers off except for the city fence and ground now i'm okay with where the fence is placed but i'm not so happy with the way the ground is positioned it still looks really flat so let's fix that first select the ground layer go over here and select the anchor point tool and let's move the layers anchor point along the y-axis all the way up to the top border right here now let's move over to this view again and change this to left so we can have a look at our scene from the left side and remember that you can always use the same camera tools on this view as well to look around so select the ground layer and as you can see it's now front facing our camera and that's what we want to change so let's press r to pull up rotation properties and change the x rotation value to -90 so this will make the ground layer perpendicular to the fence layer and you can always refine its position on the side view here to make sure that both layers are barely intersecting [Music] right now if you look at the scene from the camera's point of view since we rotated the ground it now seems squashed in so we need to stretch it out towards the camera so press s to pull up scale unlink properties and bring the y value up to stretch the layer out all the way towards the bottom of the frame now if we check how the scene looks like when moving in and out there's definitely a better feel to it but because of the current perspective the ground still looks a bit distorted and to fix that you need to go over here to effects and presets panel search for corner pin drag it over to the ground layer and you will notice that the corner pin effect has four properties each associated to one corner of our layer so let's go to the lower left property click on its target and place it on the lower left corner of the frame similar to that select the lower right target and place it on the lower right corner of the frame that's how you can get rid of that weird distortion effect moving on to the other layers let's focus on the trees next so enable the trees layer we can go ahead and enable two views to have a better understanding of where the trees are positioned in 3d space and next thing you need to do is slide the layers upwards up until here actually you know what before we refine that let's go ahead and split this to two layers so we can have the ability to control each tree separately press ctrl d to duplicate rename one to three left and the other two three right select three left change over to the rectangle tool and simply draw a mask around the tree positioned on the left side of the frame similar to that go ahead and draw another mask around the other tree as well now because we split these three layers into two each one of them now has its own anchor point so let's move that down and place it right at the base of the tree not the bottom or the end of the layer but the bottom of the tree itself right where it's supposed to meet the ground and of course you need to do the same thing for the other tree layer as well now again let's go back to two views and make sure that both layers anchor points are positioned on the same height as the ground layer okay now select three right and move it along the z axis towards the right side which will bring it forward towards the camera as you're able to see here on the active camera view so simply move it all the way until it becomes aligned with the original tree position it's still way off towards the right so let's move it along the x-axis over here and bring it back to its original location now of course since we made the tree come closer to the camera it now looks a lot bigger than it was so let's simply bring the layer scale down and apart from that you can always refine its position especially if it seems that the layer is intersecting with the ground now you can do the exact same thing with the second tree except that now we know the proper z-coordinates for the trees so you can simply copy the position properties from tree right and paste it over on three left which will instantly move it towards the same position and now you just need to move it towards its original spot in the image and again let's bring it size down a bit to match it back to the original look and as you can see on the left view the layers are properly aligned let's do a quick preview of that and see what we achieved so far everything seems right the trees are perfectly tracking their original location on the ground so nice very well once you're done with that go ahead and enable the couple layer and you probably know exactly what needs to be done at this point going back to the side view the couple layer is placed way lower than it should be so let's move it upwards and then move it along the z axis all the way over here we can leave it here for now before defining so let's go ahead and move the anchor point to the bottom border of the layer as usual okay now we can switch back to a single view and what you need to do is slightly adjust the layer's position as well as its scale until it matches the shadows you can easily refer to the shadows of their shoes and those of the bench legs as well to make sure the layer is properly positioned i really think mine matches really well like this already so let's go and have a look okay just perfect nice all right now what's left um of course the train so let's switch that back on move its anchor point over here and now we're gonna make the train pass by from right to left so double click on the train to open the composition let's go over here to layer new null object rename it to train control now move over here to these layers which as you may remember other layers we duplicated earlier in photoshop to build the whole train so select all of them and change the parent to layer 1 train control what this means is that whatever change i make on the null object the other layers will just follow so what we're going to do here is skip forward to this time code here press p to pull up the position property click on the stopwatch icon here to create a new keyframe now move the null object all the way to the right skip ahead the fifth second or so and move the null object all the way to the left until the trains exit the frame now go back to the beginning press space to play and you can see how the train passes by from right to left and to make sure it looks more realistic select all layers and enable motion blur also make sure that motion blur is enabled on the composition layer as well otherwise it won't work and now when you preview the animation again you can see that it looks a bit more realistic and by going back to the main composition you can see that the animation plays pretty well here the train passes by from right to left with motion blur applied now let's add in a bit of camera movement to the scene so let's move back to the very beginning of our timeline bring the camera properties up and let's go to position and toggle the stopwatch to create a keyframe skip ahead to around the seventh second or so move back to the z value and bring it up to move the camera forward and as you can see just like any other layers here the camera also has its own properties that you can edit and add keyframes to which will allow you to add motion to your 3d scene now of course when you preview the animation you can see that it's all coming together camera is moving forward showcasing the parallax effect and the train as our main element in motion makes the scene more interesting and kind of adds a little story to it all right now there's something i want to add since it was requested several times as some of you may know i actually posted this clip on reddit and quite a few people there mentioned that the fact that the train doesn't cast any shadow makes no sense and i totally agree so let's go ahead and work on it go over here to the train layer duplicate it press enter to rename and let's call it train shadow press r change the x value to 90. let's move the layer down and match it to the ground stretch it along the y axis and let's add a fill effect and set the color to black now go back to the train shadow and change the blending mode to soft light finally bring its opacity down somewhere around 40. there you have it the train is now casting shadows and you can say that the animation is complete although there are a few more things you can add to make it even more interesting as an example in my original animation i added sunlight so let's go ahead and do that first create a new solid name it sunlight [Music] go to effects and search for optical flares do note that this plugin is not native to after effects and you need to download it from video co-pilot first let's add it over to the sunlight solid we just created change the render mode to transparent now click on options and browse the presets library until you find this one golden sun click ok now change the source type to 3d and to move the sun to the corner select the target and place it somewhere around the top left corner here and that's it that's one of the ways you can follow to add some cool sunlight effect to your scene another thing i'd like to do is add a bit of blur to the city the fact that it's located at that distance should make it look a bit softer than everything else so select city and let's add a gaussian blur effect you can increase it slightly i would avoid going any higher than 10 so just keep it really minimal and yeah so that's actually one of the many things you can add to make the animation even cooler things like wind blowing on the trees birds flying by such details would definitely be a great addition but i won't be going through that as i think the tutorial is long enough as it is i really wanted to focus more on the essential techniques that you need to know to be able to achieve the parallax effect so that being said i hope you guys enjoyed this video and learned something new and useful if you did then don't forget to give this video a like if you have any questions please don't hesitate to drop them in the comments below i will read all of them and i will do my best to provide all the answers you guys need apart from that don't forget to subscribe stay safe and i'll see you guys in the next video peace [Music] you
Info
Channel: MDMZ
Views: 11,257,365
Rating: undefined out of 5
Keywords: mdmz, medmehrez, parallax effect after effects, after effects camera tutorial, 2.5d after effects tutorial, 2.5d animation, parallax, parallax effect, aftereffects, adobe after effects, 3d image, 3d photo effect, 3d projection tutorial, remove objects photoshop, remove crowd photoshop, image to 3d, animate photos, animate images, make image move, animate photoshop, photo to video, after effects mapping, aescripts projection 3d
Id: 7tVyu-rjHbg
Channel Id: undefined
Length: 29min 31sec (1771 seconds)
Published: Sat Jan 30 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.