Transcript for:
Creating Day to Night Transitions

in this video I'll guide you to a complete step-by-step guide on how to create a day toight transition it's already been used a lot in movies where they film something in daylight and then transform it into nighttime i did something different and created a cool transition from this effect at the end of the video I will also break down how I did the final transition in the Vinci Resolve 20 so stick around for all sorts of handy tips in the Vinci Resolve and Fusion i'm currently working on a beginner and advanced Fusion and the Vinci Resolve crash course so stay tuned for that if you want to dive deep in Fusion and Dainci Resolve here is the full Fusion composition we made it can be really intimidating when you're not used to Fusion but I promise you it will make sense when I break everything down to add this clip in Fusion simply select your footage left mouse button and then altclick and drag it on top of your footage here to get it over to Fusion we will right click and then new Fusion clip or we can just simply select the clip and hit the Fusion icon here fusion is a nodebased workflow which is a lot different than using a layerbased system such as After Effects you actually do have a timeline in Fusion it's just right up here above we have key frames and then we can see our footage here but this timeline is only used to set your timing of the clips and also change key frames and whatever parameters you need to do in a timeline system then we also have spline here we can adjust our key frames where needed so if you're like me coming from After Effects here are the things we will use that are similar to After Effects the only difference here is we will use notes to apply all our techniques and uh layers but it's not a layer system it's a note based system so if you never used Fusion before I will explain briefly how notes work and how to use them the way notes work in Fusion is with inputs and outputs so for example this square here is our output of our footage and in between these things we can add notes like for example when we hit control spacebar we can add a note you can see we have all sorts of notes we can use you can go ahead and uh see for yourself all the different notes and what they are doing but most of the notes we will use are actually on the top here but it's really handy to know the most common notes in Fusion remember them so you can type them really fast here and add it to your Fusion page one of the most common notes we will always use as a merge note this is just used for stacking different layers on top of each other and also blending them to add a merge note we can go on the top here and we have a shortcut for the merge for example we want to add a solid on top of this footage we can add a background on the top here and then place it in your foreground so the green color then this will be placed on top and we don't see our footage anymore let's say you want to change the order we can place the background behind our uh footage sort of like a layer system where we place our background before it or behind it to do this in Fusion we have a shortcut CtrlT on the keyboard and then we can change the order which these colors will be perceived so we have our footage on the background which is the orange color and then our solid on the green color we will rename this solid so it's not confusing to rename this we select it and then hit F2 on the keyboard we will name it solid so to change the order of these two colors we will hit CtrlT on the keyboard and then we rearrange things so now we will not see our solid anymore because it's behind this footage and we can also use the blend mode to blend between this note and this note so set it to screen or any other uh apply mode you want we also have a blue color here this is the alpha so the alpha channel we can use this for adding masks or any elements that you want to use the alpha channel for example our footage here let's say we want to mask out only the street here rectangle click on it and then it will use the blue color the alpha channel to create a mask of our uh footage you might be thinking why is it so much work to do some simple things like this when you know how the system works you can work really fast now we added a merge node then a background node all within uh the presets here but there's a much faster way to do this let's select this when we click on it and hit shift on the keyboard we can disconnect it and place it somewhere else or just delete it so we needed a merge node and a background node so we select our footage here then ctrl spacebar background enter and there we go when we do it this way it already made a merge note for us and a background note now let's select our background and add a mask to it and I will just demonstrate how to solo out different layers go to your preview and on the top we have a split screen here in the viewer select this and now we have two viewers and when we go to our media you can see we have three dots here these dots represent which preview you will see when I click the left dot it will show in the left viewer so it will only preview this note we can also just drag it over here and then it will preview it for example when we only want to see the mask we will drag this over here and we can see the mask or just use the dots here this way we can just work on a different mask and see the final output here when you go to the inspector we have all different properties we can use for the selected note for example this mask we we created here we can just change it here in the viewport or just change the properties within the inspector okay first things first let's now convert our log tree footage to recx 709 to do this let's ct controll spacebar and then search for a note called color space space transform then add it to your pipeline and now let's set up our color space first off we need to change the input color space into Canon cinema gamut and then input gamma log three there we go and the output gamma should be gamma 2.4 there we go and now we converted our log three footage in recx 709 because our camera is moving and we want to place things in the background it has to move along with it to do this we need to 3D track our camera first so to add a 3D camera we need to first 3D track the footage when you type in camera tracker this is the one we will use let's make sure we have our camera tracker in our viewport and then preview the auto tracks in the track tab here when we lower the detection threshold we can add more tracks the more tracks you have the more data you will have so it's important to lower this value a bit so we have more tracking data but there will be a problem because this person here is moving and it will try to track onto the moving person and that's something we don't want for our 3D track to avoid this we can simply uh place a rectangle mask here invert it and then when we preview the other tracks you can see it's avoiding this area where the mask is uh set a key frame for the center and then we scrub to the timeline and adjust where needed and also a key frame for the width and height and we can create a garbage mask for this so it's avoiding those areas all right this is all looking good now we can hit autotrack this will probably take up a few minutes depending how much of a resolution your footage is and the many frames it needs to track in the camera settings we can change our focal length i know this footage was shot on a full-frame sensor with 16 mm lens we will apply this if you don't know it don't worry uh Fusion will kind of guess what the camera lens will be now we can go over to the solve tab you can use the track filtering to select or isolate some uh tracks that are not good you can detect bad tracks beforehand before you start solving you can change the minimum track length to adjust how long the track should last for all these uh points i recommend setting these to uh a middle value just because we want enough tracking data and not deleting all the tracks and then we can hit solve okay now the tracker is done calculating and we can see here on the right corner we have an average solve error of 1.7 which is not bad but we can improve upon this when you go to operations on selected tracks you can show all the solve errors when it's at none you see nothing so when you hit all you see all the values so for example here we have a red track uh at a value of three which is not a good track so let's delete this and also delete all the other tracks that are considered bad tracks okay and now once we done that we will go to the solve and then hit solve again okay after playing around a bit with the settings I got the average solve error down to 1.5 which is pretty good in uh our situation let's say you're still struggling to get a decent uh track then you can use an unsharp mask effect and a noise reduction on your footage and this will help a bit to get a good clean track of your scene it's a bit trial and error just have to play around with the settings and see what works best but always check your uh solve error this is a good way to see how good your track really is now we will go to the export tab and hit export now Fusion created a note tree for us which is a 3D comp a 3D scene we can uh select this and go to our preview to navigate in the 3D viewer hit control on your keyboard and use the scroll wheel then we can zoom out when you hit shift on the keyboard and right click we can move around in the scene when you hit shift on the keyboard and use your scroll wheel you can go up and down like this but I rarely use this method just control and then shift right click a quick tip for your nodes and organization just right click and then arrange tools to connect it this ensures it snaps into place so for now let's hide the point cloud and the ground plane to hide things in your uh note tree here we can hit CtrlP on the keyboard and then it will hide those um two nodes right now this camera is connected to the footage this way we when we go in uh our 3D scene we have a footage in the background but we don't really need this for now so let's uh doubleclick this and then it hides it there's a good way to organize notes in your workflow because when you have a lot of note trees like this it can get cluttered and you don't see the light of day you see all those different notes and you don't know what they are doing a way to fix this is to select all of your notes and we can either group them so we can select them right click and then group i like to use a note called underlay and when you add it now we have a section that is highlighted and when we click the underlay nodes we can move the whole note tree we can rename this as well so altclick on this underlay note and then F2 on the keyboard now we can rename this camera there we go and we can also set our color i will use the violet there we go okay now we actually don't need this camera tracker anymore so let's just hit shift and place it on the side here we will not plug it into anything we will just uh leave it here if we need to ret track anything we can do so when we have our camera tracker here okay and now in our render node we can take the output and place the output on our color space transform here when we do so we have automatically a merge node let's place this over here and just for organization purposes let's alt click to have a pipe router and then place it here it's always good to organize all your stuff beforehand otherwise all your notes will be cluttered throughout the whole worksheet and that's something we want to avoid so now we have all our um notes organized let's move on to isolating this uh sky here so we need to essentially do a sky replacement to do so let's first take our footage here and command or control C on the keyboard and Ctrl +V to copy and paste footage and with this footage we will now use a luma mat we will use the luma mat to isolate or key out this area so the sky let's select our color space and then luma key and preview our luma key in our luma key we have in the inspector all the parameters we can use to isolate this background let's first invert it and select our alpha channel here in the viewport okay and now when we clip the low value here and the high value you can see what this is doing you can also contract or expand the edges like this and blur it out but be careful with this blur uh setting here because sometimes it can look a bit too blurred now go out of the alpha and let's invert this for now let's leave this as it is and now we will work on the 3D background so the background image now to import the assets here in fusion you can simply go to the media pool and select the Eiffel Tower cutout and along with the night sky and just place it here we don't need to merge let's delete this and this is the Eiffel Tower and this will be our night sky we will place our two images on 3D cards this way we can place it wherever we want in 3D space let's uncheck the media pool first and select the night sky ctrl spacebar and then type in plane image plane 3D let's add this make sure it's on the foreground so the green color and then the output will go into our merge [Music] 3D when we zoom in we see our image plane here but it's so small you can't even see it go to the image plane go to transform and then set the scale to a much higher value let's say 15 but right now it's in the foreground we need to make sure it's all the way in the back to do this let's select our image plane again and here in the translation we can adjust our Z position let's put it at a crazy number let's say minus 1,000 this way it's all the way in the background and we can scale it up to say 100 1,000 even more 2,000 and now this ensures it's all the way in the background with these handles you can move it up and down on the X-axis the Y-axis and the Z-axis so let's move it [Music] up and you want to make sure now it goes all the way through in the camera animation this we don't want because otherwise our sky will be clipping let's move this up a bit you can go to rotation and rotate it a bit towards the camera like this now don't worry about the bottom side here because we have our uh foreground element in there we just want to make sure the top of the image is not clipping and is always in frame you can also add a color correct note on the image and turn down saturation a bit and more towards green bluish and now we need to get our Eiffel Tower in place as well but before we do this let's select our output of our luma key and place it in the alpha of our render note now we can see our dancer and also the trees and everything are isolated let's uh use this there we go and when we go to this merge node and preview it we see what it's doing it's cutting out the background and uh placing the trees and everything in the foreground on top but obviously it's not perfect we still need to fine-tune things to make it look much better than it is right now don't worry about the foreground here the the mat is not perfect but we will clean up everything later all right now it's time to add our nighttime Eiffel Tower same thing here we add our plane so image plane 3D add it and then plug it into the merge 3D let's set a split screen and make sure the merge 3D is viewed in this viewport now let's go to the image plane again and transform it scale it way up something like 20 and then when we look at our point cloud we want to add it somewhere at the same depth where the real Eiffel Tower is it's got to be way in the background as well so we need to scale this up quite a bit 500 now I'm just going to roughly line everything up just like it is in real life here i'm just going to eyeball this for now somewhere around here should be fine let's uh drag it over here and then up scale it down obviously it's not going to be exactly the same as it is here because it's not perfectly at the same angle but the closer you get to it the better the transition is going to be okay now preview your footage to see that it sits perfectly in the right spot and this is looking good for us okay now let's change the luma mat once more so we don't see the Eiffel [Music] Tower go to your luminance and then the low value let's put it down [Music] and contract and expand the edges a little bit more so we still have some elements of the real Eiffel Tower blended in with the nighttime Eiffel Tower and now we need to fix all the foreground elements here to do this let's get our footage once more copy and paste it and then place it over here and it will make a new merge node now before we add our masks and everything let's first create a uh planer track from this footage only to track the floor so type in planer tracker okay now with our planer tracker selected we can leave all the settings as it is only the tracker we will use the hybrid point area just because it's a better accurate way of tracking our plane so select this and keep in mind we have to select a frame for our reference time that's just the way the planer tracker works when we go in the middle of the footage somewhere around here frame 210 we will set this as our reference time now let's create our mask in this area i think this will work fine with enough tracking data okay then when you selected your area you can set your reference time here set it you can always check it here it's at frame 210 now and now let's go to tracking and track to the end it doesn't have to be so perfect because this will only be used for our masks okay now it's done calculating let's go back to frame 210 and track it backwards double check your uh planer track if everything is looking fine and uh it's not glitching too much then when you're happy create a planer transform this will create a new note for us with all the tracking data with key frames let's get rid of this planer track here and place this at the bottom in your merge node let's create a mask so select your merge polygon and let's create our mask now so make a mask like this there we go place it at the bottom and it's very important to go to frame 210 and then drag this planer transform in between these two notes there we go and now we don't see anything but when we scrub through our footage you will notice that it is tracking and following along our 3D camera we can adjust our mask where needed and also change the soft edge quite a bit so we have a good transition between the light and the [Music] darkness keep in mind we will also color correct this so it will look much better than in this example and when everything is looking correctly we can actually get rid of this uh planer track because we don't need it anymore let's first organize some things so we have a better overview luma mat and then here we will add another underlay note for the masks so let's call this masks now we have a much easier way of reading our note tree we know where everything is right now we have our camera our 3D scene then our luma mat and then here we will get our masks when we look closer to our footage you can see the dancer is almost fully transparent especially in the upper body here that's because we need to add another mask uh called a magic mask this will only isolate the dancer it's a bit tricky to use all these masks but this way it's all looking much better and it really looks like it's nighttime it's a lot of work for one shot but uh once you use all these masks you have full control over the whole look of your image so to isolate the dancer let's drag this footage over here again and add another merge node then here we will add the magic [Music] mask in the magic mask node let's set the mode to better because then it's got to be better of course and the way magic mask works is you select an area and then the tool will magically just create a uh rotoscope for us and see the movement of the dancer so in the stroke mode make sure you select your plus tool and then just isolate and paint over our braid dancer here okay like this this should give us a clean mask now let's solo this and now we need to refine our mask go to the mat options go to alpha and then here we can refine our mask on the lowest point of the threshold drag it close to the middle and the high point drag it to the middle as well use the restore fringe to restore those details especially with the motion blur but don't overdo it just a little bit and I will not use the erode d8 and adjust the gamma when you hit alt on the keyboard you can have the minus tool and uh select areas that you don't want to be masked out and then go to tracking and the same as before track forward and then later we will go track [Music] backwards right off the bat you can see it's doing a great job seeing what the dancer is doing it's following the movement perfectly and I don't have to adjust anything all righty now our magic mask is done calculating and it's pretty sick actually how fast this thing works and how accurate it is can still change the edge a bit so you don't see the the bright sky coming through so let's change the erode and dilate just a tiny [Music] bit then the threshold as well [Music] one thing I recommend is right clicking on your magic mask and once you are happy with the final result you can cache the disk this ensures everything is uh stored in a cache so for example when you leave your program and start it up again the magic mask can do freaky things and it will not look exactly the same like it was before so to avoid things like that we need to cache and pre-render our magic mask now it's time for the details we will adjust our colors a bit so it looks like a nighttime city scene and then also tweak some small imperfections so it looks more refined and better now the first thing I'm going to do is color correct this foreground layer here so when we go to our uh footage again we can add a color corrector so type in color corrector and now you can see what this is going to do this is going to adjust all our foreground elements and we want to make it a little bit more [Music] blue and then adjust the saturation and also the gain we can turn it down a bit and the brightness and then the same for our magic mask let's add a color corrector dessaturated it and adjust the gain if you're still not happy with the edge here on our mask we can go to our luma key and sometimes it's because the backside is still lighting up a bit so we need to change our luma key and then you can see it's going to expand or extract the [Music] edges we can also add a background so we make it a little bit more darker as well you can see the difference this is without the background and this is with a black background and I'm also going to adjust the stars because I think it's way too bright and it doesn't look so realistic so we go to our image plane of the night sky and then the opacity we can turn this down like this [Music] and depending how hazy the atmosphere is you should also see some glow in the night sky especially here with the Eiffel Tower so we can add this behind uh or in front of our camera tracker so we can add a glow and then you can right away see what it's doing let's adjust our glow here don't want to overdo this effect just a tiny bit like this yes perfect and really make sure your magic mask is uh clean you don't want a black or a white edge just keep it right like it should be like this these street lights here in the background in a nighttime scene it will obviously light up so we're going to add some flares here where the street lights are and then we can also highlight our uh street here for these flares in the background let's copy and paste our 3D scene and we're going to place this right between our mask and our magic mask let's make an new underlay node and call this street lights and we're going to change the color to something like uh brown now we can get rid of these uh elements here and now let's go to media pool and add our PNG add the image plane again and then plug it into the merge 3D this scene is a bit tricky because we can't really tell where everything is in 3D space so in this case I'm just going to guess where the position of the poles the street lights are to get rid of the black background we will go to the alpha and turn it down so we only see our flare and now we're going to preview [Music] this and this sits perfectly in the 3D scene now let's do the same for our other street light here so copy and paste this and place it in the background right right about there okay can also scale it up i recommend rotating this element so it doesn't look exactly the same as the other one all right i'm pretty happy with this and now we can add a glow effect to the street lights as [Music] well glow and I will also add a color corrector again and adjust the saturation first and also the glow and now we're going to create another mask for the highlights so copy and paste your footage once again create a merge node and we will use the planer transform again and now let's create our mask right here and another one right here now stack these two masks on top of each other and then add our planer tracker by holding shift and then it should follow along nicely with our footage but we need to change our masks and feather it out a bit so the soft edge like this same for the other one [Music] and now let's add a color corrector and let's solo this and we want to add a lot of contrast so we only perceive our highlights color correct it to the blue side and now let's preview this that's too much blue you can already see a massive difference it's a lot more believable now and when we go to our merge note we can see the before and after i hit Ctrl P on the keyboard and then you can see the difference now the only thing left to do is to go back to Dainci Resolve do our final color grading and our final editing the good thing about working with these nodes is that you have full control over everything now you can change anything you want in the node trees here it's sort of like a map laid out in front of you and you can change anything you want it's the same in After Effects but here we have a more clear picture of what we're working with and especially with compositing techniques like this I recommend using Fusion actually one thing I forgot to mention is our motion blur so all these lights here should have motion blur when the camera is moving so to do this let's go to our render and the merge 2D and then in the settings we can enable motion blur we can adjust the settings here i found that around four quality is a decent looking motion blur we can also change the shutter angle uh but this footage footage was shot in um shutter angle 180 so I'm going to leave it at that and now let's do the same for the street lights and yeah that's it now for the final transition I'm currently in Da Vinci Resolve Studio 20 it's in public beta right now so you can try it out and see for yourself but there are some really handy features especially when you want to create reals let's break down how I did this final transition so this final effect was shot in uh 50 frames per second so we can slow it down later on so for the final transition I made this in a compound clip so first thing I did is rendered out the final fusion uh comp we made and then overlaid it on top of our original since this is 50 frames per second I interpret the footage in uh 25 so that way it's half speed and it's slowing down same for the fusion clip and then these adjustment clips right here are the color gradings so you have a color grading for the daylight and then a color grading for the nighttime and then transition between those as well for the transition itself I just made a simple fade and then in the final comp an overlay as well and then with some additional ambience and sound effects we have our final edit if you look closely there's also a speed ramp going on here so right as the transition is happening I slow it down just a tiny bit and in the Vinc Resolve 20 it's a bit different than the previous version because now we have a separate dedicated key frames uh button so here we see all our key frames and our speed change and with the curves right here we smooth it out our speed ramp so it looks really nice let's say you want to use this for a real you could go to uh timelines and create a new timeline then go to format and use the 1920x 1080 then use the vertical resolution then copy and paste our day toight transition and the good thing about the Vinc Resolve 20 is that we now have a vertical option for viewing our reel this is much more efficient when working on reals you could also go to CtrlF on the keyboard and then have a full preview but when you're editing this is just so much better so much better guys and that was basically all there is to it it was pretty fun to create this effect and uh I hope you guys learned something from this and yeah see you guys on the next video peace