How to solve Depth of Field edge problems in Nuke

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
well everyone my name is zu geta from Yugos desk got a brand new video series this week it's called you just have to be better yes better you know when you're not that good and you should just be better so every week I will present a tutorial for visual effects in under five minutes under five minutes you ask well I am all but tired of long ass tutorials and you know what you can always watch the video again it's not like it's a live art performance that only 20 people watch then it was lost forever right so let's get started so this week you just have to be better at using depth of field in nuke timer starts now five minutes - so I have beauty and then I have also a Ziva now the z-depth of course needs to be shuffled because as usual the z-depth node is actually showing up on the layer and not on the RGB can clearly see that this is a raw depth which means it's to scale for the 3d scene and not only we have to shuffle that depth to pass into RGB so we can see it and we also need to actually find out where is the furthest point from the screen and the closest point from the screen it's much easier for you to do that when you look at the RGB and just swap to alpha Channel putting a great node and of course always don't forget to actually look at the RGB and not have your viewer set to that grade node with that in mind then you can have the value of 3 in this case it's 3108 which is the farthest distance from the Z depth and then the closest range which is around the metal bars on the front of her armor I would say that it's if we look at the shuffle node you will see that it's around 1,800 so that's of course the closest to camera so closest to camera usually is the white point furthest away from the camera is the black point then voila you get a great note which basically normalizes or Z depth now as it is normalized of course you always have to do a few adjustments because certain elements are actually hidden so with that in mind you have to kind of open a great node and kind of make subtle adjustments so that you can reveal or not reveal as much as you want from the scene of course always keep in mind that the closest the camber should always be one that's the idea because that's the sharpest element of the Ziva and with this in mind I am gonna change the white point so it's become one and then of course I'm gonna also put a clamp to one so that you don't have the z-depth with any since it's normalized you do not want dynamic range anymore course keep in mind you'd have to animate the z-depth if the image is moving in this case we're only looking at one scene then of course you do a copy note the copy node of course will allow you to copy the in this case the red channel which is what you progress processed over there into your Z depth into the stream this is because the ZD focus node only works if you have a Z depth in your stream now once you put the Z the focus node immediately you'll see that it will start processing if as you can see putting the foreign code point I can now see what's closest in what's the focus and what's not to focus so I can actually animate that my depth of field by using the focal point once that's in I'm gonna switch to focal plane setup so that I can see what's green is the focus now by changing the depth of field I can have more in focus or less in focus that's the whole thing here's green is in focus blue is out of focus once I'm happy with that I'm gonna go back to the result and then I'm gonna just pump the the focus more I'm gonna put a 20 maybe even more I'm gonna yeah 20 years enough and as you can see now we have a very extreme depth the field already on the scene as you can see the wing is completely focused and I'm just gonna change the blade to a 7 blade so that it looks a bit more like a lens now the only thing left of course here is just to put my background I'm gonna just put a merge node a over B I'm gonna put my background now I'm not gonna bother to put a Z D focus into the background I do have a depth field so you guys can feel free to do that but I'm just gonna put a normally focus node I'm gonna just pump up the D focus you know just so that it looks normal when she's against this background now one of the things that we have on the depth is that we start to have some artifacts these artifacts are coming from the fact that the depth of field is always crucial to white and black so what's white is sharp and what's black is not sharp and as you can see depth of field does not match the actual edge of the Alpha Channel and that is a problem that's because the Alpha Channel has been analyzed and the depth of field is not Angela which is normal you do not want Intel is a Chinon your that the field because like I said if you have a great pixel that pixel will be on different depth in the image because remember black is farthest from the camera white is closest to the camera there's a couple ways of fixing this to at least which you can find on Nuka PDA one of the nodes is the edge extent and the other node is the collar edge both of them you can find very easily on Wikipedia now of course both these nodes will require a mask or better an alpha Channel I will of course always start with the color edge that is the most complete note from both both of them but they will both work another thing I need to do is to just pipe the mask into my beauty and then the RGB into my persist depth once I do that immediately the result of my color edge which will have to be of course inverted because the color edge by default will be inverting my stretching now as soon as you put invert I'm gonna turn off the blur grain and as you can see that what the color edge does is that it grows the pixels outwards which is really good because then you can extend the edges so as the edges were too short for the depth of field and the Alpha Channel this image by growing the textures you can actually grow them enough so that they actually go outside the boundaries of that alpha Channel and as you can see the last pixel which was just right there now is actually extended from the original cut and voila now as you can see my collar edge has removed all those artifacts in Blooming artifacts that you had on the depth mainly because those pixels especially on the top there and specially on the armor on the back especially the ZD focus did not new if those pixels were actually in the front or actually in the back and as you can see that fixed it okay and that is it a very simple pipeline for ZD focus and tweaking the ZD focus with the net extent okay so unfortunately our five minutes are up so I see you next week on another edition if you just have to be better at something that will happen next week as always you can like and share and subscribe and make a comment on this video if you do not like or do not want to subscribe or do not want to leave a comment please stop so I see you all next time goodbye
Info
Channel: Hugo's Desk
Views: 44,020
Rating: 4.957181 out of 5
Keywords: The Foundry, Nuke, Depth of Field, ZDefocus, Hugo's Desk, Hugo Guerra, HugoCGuerra, MPC, ILM, Framestore, Visual Effects, Tutorial, Training, After Effects, Depth, Compositing, Nexus, Escape Studios, NFTS, Campus I12, School, VFX, 3D, CG, CGI, ZDepth, Weta, Weta Digital, Double Negative, Method, Zoic, Baseblack, Cinesite, DNeg, Milk, Molinare, Passion Pictures, Prime Focus, Smoke and Mirrors, Digiatl Domain
Id: TkrbmaZoUSQ
Channel Id: undefined
Length: 6min 50sec (410 seconds)
Published: Sat Feb 27 2016
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.