3D Displacement in After Effects - NOW POSSIBLE!

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
take a look at this when I click down on it you will see that we are navigating and exploring this landscape inside of After Effects yes after effects was used to create this scene here so how did I create this it all began a month ago when me Mike and Chris battled it out to create the most incredible effects using the forge plugin my contribution was a 3D map effect and this looked good but it was a lie while it looked 3D I used a 2d displacement effect so that it looked 3D so it did work but we were not satisfied so for the past month we have been creating a real displacement effect inside of After Effects and now it works as you can see you can find the plugin on production crate in the link below as well as an installation video if you need any help Pro users can download to the full version of the plugin but we also provide a free version with a watermark so you can follow along with everything in this video the laforge plugin can do so much more than just displacement so make sure to check it out and let's get started so to begin I have three different layers down here and we want to apply the displacement effect to the bottom layer so to do that go to window extensions and click on laforge the window that pops up will bring you to the library page and the latest edition is the crates 3D displays effect so now when you click on apply selected preset and if you close that you will see that now our layer has a new effect added to it the displacement will require two different layers the first layer is the height layer and we can also set to the source to include UTV masks and effects and similarly the color layer needs to be given a input and we also want the color to be imported into the effect you may notice that a light and a camera have appeared here these have been added automatically and you can see that if we hide the height and the color layer and use the orbit tool to rotate the camera you can see a circle has appeared here so the light actually controls the center of the shape so if we set the coordinates to zero you can see now it's in the center of the composition so now let's do something incredible that you've never done before in After Effects I will be adding a turbulent noise and you can see now that the displacement has kind of begun it looks a bit strange now so I will go to the layer with the displacement applied and I will set the color input as the height layer and this really helps visualize What's Happening Here the bright parts of the layer are being lifted up while the darker parts are resting more at the bottom so now let's increase the scale of the noise and it becomes much more obvious what's happening here once again I will use the camera tool tools to zoom in a bit closer and look at this we have a real 3D displacement inside of After Effects so now let's talk about these sliders here the texture scale allows you to increase or decrease the size of the texture I tend to set this to a low value such as 0.1 so that there's a nice amount of quality per pixel the max radius slider allows you to extend to the displacement further outwards I will show you the purpose of alpha depth multiply later in the video so for context the max steps parameter controls how many steps we take in our Ray marching calculation to render the displaced surface and so having a low value in the max steps cuts off the rendering sooner which can be good for optimization the step size parameter tells the algorithm how big each step should be be in the calculations so a short step size has this effect while a large step size has this effect and this is why increasing the step size often produces weird artifacts so finding a balance is important an optimization we have added is the step size exponent and the effect this has is to increase the step size the further away from the camera we are which means we can have a great quality close to the camera and a lower quality further away where it doesn't matter as much variable step parameter is another optimization that takes a larger step when we are further from the ground you only need to touch these sliders if you have any quality issues or you want to make it run faster so now let's create a landscape in the description below I have linked two files one of them is a color map and the second is a height map now currently it looks black but if we add an extractor effect and set the red and green channels to have the red Channel we can see we now have a black and white displacement map so now if we hide these layers and go to our displacement effect we can set the height to the new image as well as the color to the color map and immediately you can see that this desert has started to appear now it looks a bit flat and weird at the moment so I will scroll down and enable Alpha as depth and what has happened here is that the alpha channel of the effect has actually been set to the depth of the effect so now let's add some light and shading here's the plan we will create a pre-composition for the height data so that we can feed it into another pre-composition featuring the color data we will use the height information to create the shadows and shading and multiply this with the color information these two sources of data will then be fed back into our main composition I guess you could say that we are pre-simulating the lighting into a baked texture so let's pre-compose the height layer and make sure leave all the attributes is enabled because we don't want to change the resolution now notice that the extractor effect needs to be placed inside the pre-composition and the data is back now let's do the same thing for the color map but I will be naming it color shading now I will copy the height layer and paste it inside to the color pre-composition and then just make sure that it is centered inside to the composition if you are new to the laforge plugin I have something really exciting to show you so once again I'm opening the laforge panel and I will click on crates height relight and by double clicking that and closing the panel you can see now we have this beautiful shading that's starting to emerge we can actually amplify the shading by increasing the height scale and if you grab these and begin to move it around you can see that we're creating this beautiful lighting effect on our scene and by zooming in you can see all sorts of beautiful details are starting to appear in fact if you go back to the main composition you can actually see that the shading is already being applied to the surface now since this is a high resolution texture I want to increase the quality of the Shadows so that even the smallest rocks can cast something now depending on when you're watching this there will be a shadow quality slider but if it's not there you can click on send preset to panel now if you click on the code editor and what you're looking at here is the code that was used to create this shading effect and if you go down to line 131 there's a parameter called Shadow step size and by simply changing this three to a one we will increase the quality now you've just edited a plugin inside of After Effects which is absolutely mind-blowing and I cover this code editor more in another video but for now just click on apply preset to enter the settings will update I recommend lowering your preview resolution when you're editing with this effect just so that it's a bit more responsive and look how beautiful the Shadows are when you move the big lights around so as you can see we have three light sources the first light source will be our sunlight so let's change it from a blue to a white and since the sun produces parallel Shadows we have to set the position of the sunlight to be quite far away the sun is also very bright so by increasing the light intensity we can make it match the real world a bit more closely you can also adjust the height of the light so that you're producing longer or shorter Shadows now let's create the blue Skylight so just find a nice bluish color for that and position it somewhere in the middle now the sky is all around us and it's very far away so in order for this to not behave like a single point light what we will do is go up and increase the shadow scatter parameter and this distributes the light source over a wide area you can also increase the height because it's the sky now you may be tempted to give it to this sort of brightness here and to be fair this does look like a beautiful icy landscape but if we look at real Desert photos you can see that to the shadowed areas aren't actually illuminated with blue all too much so instead we will set the intensity to a really low value and of course we could adjust this later we now have one more light and this will be for our Global illumination and this is where light bounces off the ground and scatters all over the place you can really see it in this photo here where the light in the sand is bouncing onto all of these shaded surfaces so for the third light I will give it an orange color and since we want it to bounce backwards I will be positioning it on the other side of the Sun as well as increasing its intensity and you can really see the effect that we're trying to go for here now let's talk about a linear workflows quickly enabling a linear workflow will tell after effects to manipulate calculate and blend light in a linear way this fundamentally is a more accurate way to work with light it is a very deep topic but for now I will show you how to enable it so start by clicking on the little icon down here and make sure your color engine is set to Ocio your Ocio configuration should be set to Aces 1.2 and your bit depth should be set to 32 bits your working color space should be set to compositing linear Aces Asus CG and your display color space should be set to Asus srgb once that's done click on OK since we are now working in a linear workflow we have to disable the tone map checkbox and this means the shading effect now outputs a linear light now since everything is looking darker I will increase the brightness of the sunlight again now that we have the shading we can set the transfer mode to multiply and this actually Blends it with the the original colors of the terrain now remember we are in a linear workflow and so to preview what it looks like in the final export you can set the display color space to Aces srgb and this allows you to make more informed decisions on your lighting so for example this looks a bit too red so I will desaturate the bounce light so now let's go back to the main composition and you can see our desert is starting to take shape now when I look at this I'm noticing that the bounce light is very strong here but very weak over here so a different method I want to try is actually bringing the bounce light back into the center and because we have this dark area down here I will increase the shadow scatter just a bit and lastly since the scattering light is originating on the ground I will be decreasing the height of the third light so now when we go back this is looking so much better on the production crate website I want you to go to the environment category if you scroll down go to the aerial category this features a bunch of beautiful hdri maps and the one I recommend you click on is this one over here which is aerial Sky 16 and you can see how it's got this beautiful line of clouds in the Horizon and a nice clear sky and we will be using this as our background so click on the 4K variant and click download now let's import this into our footage and you can kind of tell that the colors look a bit strange now remember we are in a linear workflow now and so we have to tell after effects to interpret this footage in a linear color space so right click on the footage click on interpret main go to the color Tab and in the color space drop down scroll down until you find utility utility linear srgb and when you go back you can see that the colors are looking far more natural now I will hide this layer and create a new solid and I'll call it Sky now we can add an effect named CC environment and for the environment we can select the sky hdri and when we turn the camera you can see that that we're actually looking around this environment which is really cool so now let's move the sky layer below the displacement now immediately you can see there is a problem here where you can see the clouds behind the terrain so what we will do is pre-compose the sky texture create a new solid layer and add a set matte effect set to the matte layer to the displacement layer and enable the effects and masks if we isolate it you can see we're creating a nice outline of the landscape and by adding a curves effect and selecting the alpha Channel we can increase the contrast of the mat so that we're separating the ground and the sky now if I unisolate that and bring that beneath the layer into the sky and then hide it we can add an adjustment layer add a blur effect and increase sit until the cloud artifacts disappear we can then set the track mat to the mat that we created and now you can see that's working so much better I want to add a bit more fog so I will increase Alpha depth multiply a bit and a neat trick is that we can add a curves effect to the displacement layer and in the alpha Channel we can really control how much fog is near the camera and far away from the camera and remember you can adjust the sky brightness with a simple exposure slider which in this case works really well look how realistic that's looking like if we look this direction the silhouette that the sky is creating is beautiful so let's talk about the quality a bit more because if we zoom in we can see these weird staggered lines and this usually indicates we are not accurately sampling the correct texture position of our terrain so a great setting to change is the backtrack steps and when I increase this slowly you can see that these lines are gradually disappearing so if I set it to 20 they're basically gone another common artifact are these weird lumpy edges a great parameter to adjust for this is decreasing the step size so if I set it to 5 for example you can see it's becoming much more smoother however if you zoom out you can see that our terrain is disappearing which actually creates this really cool effect where the landscape kind of loads in however increasing the max steps makes it render slower so I will actually decrease the max steps and instead I will increase the step size exponent and this will increase the step size the further into the Horizon we go so in effect we are rendering further with the same number of steps so it's really cool another way to do it is by increasing variable step Max and to this basically adapts the raymarch size depending on the situation so feel free to experiment and find the balance that optimizes speed as well as quality let's take a moment to really appreciate this landscape here for example this angle here the way that the light is bouncing onto these rocks it genuinely looks realistic and of course you can go back to the shading and manipulate the light in any way so I've just set it to green and once it calculates it's updated I am absolutely gobsmacked by the fact that this is all being rendered inside of After Effects like my brain genuinely can't compute it it looks beautiful and it's surrendering fairly quickly too like look at this Mountain scene here I I don't know what to say but I would love to hear what you have to say down in the comments down below tell me what you would create with this displacement effect we also have a Discord Channel where you can share what you create with us and of course we can help out if you have any problems thank you so much for watching and remember to make it awesome
Info
Channel: ProductionCrate
Views: 16,446
Rating: undefined out of 5
Keywords: productioncrate, footagecrate, rendercrate, soundscrate, graphics crate, vfx, vfx artist, visual effects, visual effects artist, free vfx, free music, royalty free, royalty free vfx, royalty free music, after effects, adobe after effects, adobe ae, 3D, 3D modeling, free 3d models, after effects script, free after effects script, film, filmmaking, independent filmmaking, 3d terrain after effects, 3d landscape after effects, realistic 3d landscape, how to make a 3d landscape ae
Id: v6PW1cOJ0WM
Channel Id: undefined
Length: 19min 17sec (1157 seconds)
Published: Thu Apr 27 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.