okay so finally in part three of this tutorial series we will take care of our lightning because at the moment our lightning looks a little bit flat uh because I'm just using some simple HDI so let me show you how the light looks at the moment so we can go into our Shader editor and then we can switch this from object to world and as you can see we have some simple HD light actually from blender and it's by a mapping note um so if we isolate for example our foot path and switch into the viewport shading mode we can disable our transparency so you can see what's going on so as you can see if I just rotate this on the z-axis this is just a simple 360 hdri which is nice for prev visualization but to get some cool looking light we need to set up our own custom lights okay so as you can see in the background the the background image is a little bit lit and that's because even though it's a simple image texture I put this into the emission Shader with a multiply note uh so I can better control the density and if I take it this away it's completely dark and if I uh change the emission value to something higher and it will multiply uh so I can raise up the numbers down here then you can see that our image becomes a little bit bright them and this way we can control our light or our environment a little bit uh with the EM Mission Shader from the image and uh if we now take a look at our green screen footage uh you can see that the footage was lit uh from above I was indirectly putting some lights up the ceiling and they were bouncing off back to the character and this way I had this mood of a of higher light source which emulates the Moonlight of our scene so we have to recreate that but first off let's care a little bit more about the ambient light at the moment it's the background light so if I turn this way up to like three or maybe two uh you can see we get a little bit of global illumination and if I start to brighten up the color from a dark gray to a more whitish color uh actually I get the same result as I would get with the hdri so something around 1.5 is good to just light up the scene a little bit so it's a little bit of a fake glob elimination and as you can see I already prepared a volume scatter uh which is nothing else than fog inside of blender and if we now connect our volume to our volume socket in the world output uh we get darker image because at the moment we have no active light saw so even though if we crank this up to a value like 0.1 you can see there's nothing happening so let's uh get our first uh light which will be our Moonlight and therefore we will use Point light so raise this one up to maybe like 5,000 oh the reason why we don't see this is because it's behind our background so let's put it in front and ah okay now we can see something and that will emulate our Moonlight like we would have in our green screen setup maybe now our fu is a little bit dense so let's bring this down to 0.07 yeah that's looking better and now we have to adjust the position of our Moon because it should be on the right side of our pest doctor but now if you if you look at this our seal looks already better uh so now it's just about fine-tuning our environment light so let's put this Moonlight a little bit higher and put it onto the right side so that it matches with the green screen footage and maybe we can bring this down from 5,000 to 2,500 something like that so we get this nice F off of light and as you can see the FK is spreading the light very nicely and evenly so fu is always a good element to get some cinematic feel to the scene and um now we need to enhance this light a little bit and therefore we will use another light we can take our 3D cursor and put the cursor to the world origin and then we can hit the shift a shortcut to create a new elements and we will go for an AAL light okay and now we have have our area light inside of the scene uh so we need to adjust this so that it enhances the look and the difference between a point light and the area light is that the point light is really like all over the place so it's spitting the light 360° while uh an area light is a little bit more directional or a little bit like a spot and this is better to control uh we can get rid of the point light for a second and now we can take our area light and move it back into position and we can right click and adjust the power and the size so maybe let's make this one a little bit bigger so that the light so is becoming a little bit softer and now we can once again right click and adjust the power and then just play around with the settings by moving the mouse up and down I mean you can do this also in the power section it's up to you sometimes it feels a little bit more intuitive to do it this way and yeah that's looking pretty good so we give a little bit of highlight to the different assets on the right side because this is where our moon should come from and this is the way that things can be lit in film sets so you have like one practical light which in this case is the moon and this one will be enhanced by artificial film lights to mimic that the light source is even brighter than it originally is and this way we can set up some nice highlights on our 3D objects and more importantly uh let's raise up our background so as you can see at the moment that we don't see the image anymore because of the fog uh so we have to raise up our emission and boost up the numbers until you see the The Horizon of our background again something like that so we have this nice transition of the clouds and yeah this is starting to look a little bit better maybe we can add in one more area light so let's go back and do 3D viewport and let's uh duplicate our light rotate this on the z-axis and bring it uh in front of our camera so we have a little bit of a light up here as well so we can see a little bit better the tombstone at the very beginning and maybe we can bring down the moon a little bit yeah something like that okay and now we can animate our existing lights within the scene uh first of all we have to create a point light for our lamp that our pest doctor is holding in his hand and for this one we can once again bring our cursor to the world origin and hit the shortcut uh shift a to create a new Point light and we can bring our light in position so our pest doctor is a little bit in the back of our camera so let's move it on the Y AIS and just try to match it slightly with the footage and then we will animate the position of this Point light and this way we will emulate the light of the lamp which is of course not there in 3D space yet but we try to change that so let's click on the autter keying down there and uh let's go through the timeline maybe we can start a little bit more here and this is our first key frame and when the doctor starts to move the lamp will follow so somewhere here so let's bring it slightly to the side and a little bit to the front because he's moving forward and maybe a little bit up okay and then let's see what the interpolation does between these two key frames yeah as you can see it's a little bit too slow so we have to adjust that so move it along on the x-axis and a little bit up and then we can follow along so once again adjust the key frames where needed and that starts to look good okay go a little bit forward bring the light a little bit forward too and adjust the position once again so it's it's pretty simple and we just have to do like maybe 10 to 12 key frames not too much so we can hand animate this one uh I mean you could track this one in After Effects later on and try to for example get an optical flare or something like that but I'd like to have at least a little bit of Illumination on the on the floor on the ground and this way I think this is necessary and furthermore H we can see our Point light a little bit in the fog uh so this way we can actually fake a little bit of interaction with the lamp and the fog uh so I think this is necessary and uh once again this is kind of like one of the secret ingredients to good-looking green screen footage if you try to match uh the color and the tone and the light of your 3D environment in this case and match it to your liveaction footage it really feels much more integrated so this is really cool and as you can see uh I mean we will animate the path to the end uh now our lightning strike comes into place too uh so we have to animate this one too so our whole Cemetery needs to be lit up when the light strikes the P doctor but until there let's uh continue our animation and really make sure that the point light is following as best as possible and and at the very end it's even though he's holding the lamp more or less still at least give it a little bit of movement because uh it's it's pretty hard to to hold a lamp without moving so this little jittery movement will give you a little bit more of a realistic result okay so let's turn off our pest doctor to see our result and let's go through the timeline I mean it's a little bit of a flickering but that's because of the view Port shading in Eevee later on when we render this it will be a constant light source and I think it's just a little bit but it will do the job and I think that looks pretty good cool okay and now comes our second very important light and that of course is our lightning strike you see it somewhere around here at frame 122 uh we need to have this second light and we will take our area light that we've copied before and we will call this lightning and then we will Grace this up to maybe like 3,000 okay that's a little bit too much maybe 2,000 is fine yeah maybe something like that so this is the power of our strike and we can start animating our power so let's start with the first strike somewhere at around 128 and if we go back a little bit you can see that our pest doctor is here and in complete dark so we have to change that to zero uh and if you are enable auto keying we just don't have to do this every time so let's see and with our lightning strike that continues until this point so we can copy our zero position and paste it oh maybe we need to hold the light for a second so as you can see here it gets pretty bright until here and maybe we have to copy our our power on 2,000 so maybe we can raise this up even to 2, I don't know 200 or something so sometimes a lightning strike builds up so we have to mimic that light oh maybe something like that and then we can go on with the next strike that would be here so we can copy and paste our 2,000 watt key frame maybe we can raise up our light a little bit so it uh the light source is coming more from from above and maybe we can rotate it a little bit more into the scene so that the cemetery is fully covered with this lightning strike yeah I think that looks better and then we just really have to be very precise with this so whenever there is a a strike we have to put up the key frames up to 2,000 and when there there's no strike we have to bring it back to zero and actually the the preset of this light I think I was using a sakani light with some sort of soft box uh was uh pretty dense so uh I think it was the frequence of eight or so so there are a lot of strikes coming in a very short period of time yeah I'm sorry for that we have to uh recreate that so it's a little bit of a annoying task but at the very end it will just sell out because that will look pretty cool trust me I will speed this up a little bit because at this stage we are just copying uh the key frames from 0 to 2000 and back uh just to just get the flicker of our light and then we will meet again when you are finished okay so let's take a look uh here's our pest doctor and the light hits the scenery and you can see it already even though this is just a preview window in blender but it really feels much better we really really feel the interaction between our live footage and our 3D environment in blender and really this is without compositing uh so really it looks good maybe we can do one more light uh that is coming a little bit from this side uh I accidentally reused the light that we've uh duplicated before and changed it to a lightning strike and I think if we just lighten up the scene a little bit here uh I think that will look better so let's quickly rotate this on the Z axis and move it into position so that the side of our mum is a little bit Yeah softer in the lightning and we have a little bit more light going on there and I think that will look a little bit better maybe it's not the most realistic light because our main source comes from the back but yeah sometimes you just have to break the rule and I think this will be pretty forgiven okay and the last step before we go back into after effects is we need to animate our depth of field so at the moment everything is you know sharp and this is not very cinematic because we don't shoot this with a smartphone we shoot this with a film camera so to say and the idea is that we have a transition from our uh Tombstone here at the very front and then we will shift Focus to our pest doctor and in blender it's pretty easy to do uh so first off let's dial in our Focus depth and for that we can pick whip our depth object uh so we can use this pipet at the very right and we can select our Tombstone and then we can play around with the f-stop and the lower the number the more uh shallow depth of field we will have uh if this makes any sense so let's bring down the number uh like with a real aperture uh so the more light we get through our lens uh the bigger or greater the depth of field will be so maybe we can do like 0.9 or maybe one depending on the shot but I think that looks good just eyeball it and yeah okay but we cannot animate this one uh because we have to do it manually with the focus distance so let's click away that and bring our Focus distance into place until we get the sharp point of our Tombstone and then we can maybe add a focal distance of 1.5 uh we can start the animation and when the camera transitions from the left to the right so it's a sweet spot between Shifting the focus but still having our background still not pretty sharp because our pest Doctor Is In the mid-ground uh so you really have to dial in your values a little bit so that the sharpness from the tombstone is clearly away but the midr is being sharp and the background is still being a little bit blurred out so it's a little bit of a back and forth just play around with the numbers until you get a nice result and this is the only thing that we cannot really measure in our blender I mean we could use up some sort of um a scale model uh just as a as a stand in so to say but let's do it quick and dirty with a little bit of eyeballing uh so find a sweet spot in the mid-ground somewhere at maybe 3.3 m and then we are good to go okay so let's uh see the animation so when our camera moves over the focus shifts from our Tombstone to our pest doctor and that's what we want okay so maybe uh we give it a go and we will render this out and then we will check this in After Effects to see whether we did a good job or not okay cool so the render settings are pretty easy uh so as you can see we are in Eevee and we can leave the default settings so Rand of 64 is okay I mean you can crank it up but I'm not pretty sure whether you will get a better result uh of course amem inclusion which is on by default we can raise this up a little bit and we can add in some Bloom for the lights and we can add in some screen space Reflections and we can use refraction and we could bring up the trace precision and the maximum roughness and then we can go into volumetric lightning for example you can uh change the tiling size to 16 for example and I think that's everything we need to cover I mean in the output settings of course full HD the frame rate of our camera then the frames and then we uh go into output we are going for a PNG sequence with uh 16bit RGB or rgba doesn't matter in this case uh because we don't have any transparency uh you can bring down the compression but you don't have to and I think then we're good to go uh so yeah if we uh have found our background render for example okay and we could do that except and then we could start render the animation and then wait for it in After Effects and we will see us in part four of this tutorial series see you there