Nuke Tutorial | How to use the Depth Generator in Foundry's NukeX

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
everybody this is Terry riot at foundry and for today's workflow we're gonna take a look at the depth generator in nuke X to create a depth pass that can be used for grading masking softening in our example here we're gonna add atmospheres for our plate and to our trusty sphere that's all been generated in nuke so let's get into it alright we're gonna take a look at how the node works we're gonna need a camera that has been tracked to our plates I have one prepared here we're also gonna need a source which is our plate the node has already actually generated depth from our plate so let's hop over to the depth channel and adjust the gamma and gain so we can see it a bit better now let's explore the node if we have a mask that's occluding objects we can choose how we want to deal with it like let's say we had a moving object it would be tough for the node to generate the depth so we would mask it so we only have static objects in our plate and this is where the depth will be created from now for this plate we don't have any moving objects so we're not gonna need to change this we'll keep this to none for a depth output we can choose to generate depth or distance now depth is going to be the distance along the cameras that axis and the distance will be the output along the Ray of the camera Center to a 3d surface point we want to generate depth not distance the surface point will let us create a position pass from our footage and the surface normal allows us to create a normal pass although we don't need this for a shot we're gonna take a look at how to create them a little later on now frame separation is what this node is all about and this is what's going to define our depth we can use this to select the offset between the current frame on either side to calculate our depth so for example if our frame separation is set to 2 and we're at frame 100 the node is gonna look at frame 98 and frame 102 to create the depth from what it's doing is matching pixels between the frames to create 3d points and then that's where the depth is generated from having a higher frame separation gives us a larger baseline for the camera and it gives a more accurate depth result but there's a trade-off it can reduce the quality of the pixel matching and give us incorrect 3d points so a general guideline would be for fast moving cameras have a smaller frame separation and for slower cameras use a larger separation for a shot that has a variation in speed you'd want to be key framing the separation now we can also have the depth generator analyze a sequence and attempt to come up with the best frame separation so let's go ahead and do that so something to note as this is working it out we have to make sure that our camera is tracked for all the frames in our sequence not just a partial thing otherwise it's not going to work out okay now that it's done we have the calculated accuracy so let's scrub through and you can see that the accuracy is changing throughout our shot now what we want here is to get to as close as one as possible and that will be considered accurate the frame separation in this case is ranging from around 15 to 19 and we're going to need more control for this as our accuracy is fluctuating quite a lot so our other option is to analyze a frame now this is where you're likely going to find the most success we can go to a frame and analyze it so it's going to work through the timeline and give us a frame separation and result in the calculated accuracy so from here it's very important I want to do a visual inspection of the shot and add any key frames where I think they're needed so I can either do this by analyzing a frame or by manually entering a frame separation value it's a little easier in this case to add a frame separation value manually because the guesswork is taken out I know the general value that things should be in so I'm gonna go and do this for a couple of frames here now looking at the pass is only gonna help me so much I want to QC this against a plate so what I'm gonna do is shuffle out the depth I'm going to then invert it I'll add a grade note and use this on the mask to grade the plate let's choose a color for the plate and then now we can adjust the grade of the depth and I want to move throughout the shot and make sure I'm happy with the frame separation and we can always make adjustments as we go along if we find things or messing up but this is very important we want to make sure that we're spending time tweaking the frame stuff operation to something that we're comfortable with and we have a pretty great result with before we get too deep into things so back to the depth generator let's take a look at some of the attributes under the depth generation section we have depth detail the default value is 0.5 so this is using half the resolution of the plate to create detail a low value will speed up the process and deliver a smoother result and a higher value will use a larger resolution to create the detail and it's also gonna pick up some very fine detail but the process is gonna be quite heavy the normal detail is specific for the normal map which we didn't generate let's move on to the next one and if you think the depth is noisy in flat areas of the image we can increase the noise value this will tell the node to ignore noise in our footage when creating the depth the higher value the smoother the map but you can see that things will get blended and we're gonna lose detail if we set it low it'll concentrate on details and not worry if the map comes out noisy or not so let's make sure we use this gently you could also denoise your footage before using the depth generator to help with this strength defines how strong the pixel matching will be between frames default value is normally okay but if some edges aren't fitting like let's say in this trolley area we can increase the strength to force match the details sharpness will help with object boundaries we can go high to show clearer separation between objects smoothness will give a variable softness to the result it's good to take a look at the edges here and use a balance of the sharpness and the smoothness now this can be important and or not so important in some cases depends what you're doing with the plate the depth limit will clip the minimum and maximum values allowed inside of the depth map so everything outside this range will be clipped and will be gone you can also mark bad regions to show areas that are unclear or in exact from the calculation and you can have a visual representation in the viewer this plate is actually pretty now that we've calculated the depth we can see how we applied it in the script so for our shot we've added a 3d object as well as some atmosphere so we want to know where to place this sphere in 3d space that's gonna work with our depth pass so we can do this by creating a displace card from the depth generator you want to do this on a frame where the calculated accuracy is high so this area looks good and we're gonna create a card so now we have a reference for where to place our 3d objects now I've used the displaced card for reference in order to place my sphere and built up the base color logo then using a reflection shader and hgri along with the Ray render so we have some reflections then an ambient occlusion shader and the ray renderer so get some contact shadows once I have the result I can combine the depth from the sphere and add it to the result from the depth generator and I can use this to mask and grade so as far as the fog goes of a larger sphere that has noise mapped to it it's been placed in position thanks to the displace card from the generator the depth has been shuffled out from the sphere and combined with the output from the death generator and we're gonna use this to grade the output and used as a mask as well so we're masking the noise here so an additional grade node with some color that's also being used in the depth as a mask so now we have a result okay now last thing we're gonna look at is creating a position and normal pass for our footage we can use for relighting and for texturing or retexture ring so first let's take a look at creating this surface pointer position we want to do is create a new channel let's name it position and for the channels we want to create we don't want RGB information we want 3d so we wanted to do XYZ and said ok so now like that we can go ahead and check our position and now we have a position channel so same thing for the surface normal just switch this back we can go and create a new channel let's call this normal and we also want X Y and set information let's go ahead and inspect the channel and now that we've enabled a normal channel the normal detail will now give us feedback when we get to use it so that about wraps it up for this workflow I hope you enjoyed learning about the depth generator and how you can be using it on your plates you
Info
Channel: Foundry
Views: 22,627
Rating: undefined out of 5
Keywords: nuke 12, nuke tutorial, nuke vfx, foundry nuke, nuke compositing, compositing vfx, post production, vfx, visual effects, cg, green screen, how to use nuke, vfx supervisor, depth generator, visual effects compositing, vfx 3d, vfx program, video editing, vfx effects, vfx tutorials
Id: Bwba8x_0m80
Channel Id: undefined
Length: 9min 40sec (580 seconds)
Published: Wed Jun 17 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.