Nuke Essentials: 06 Multipass Rendering Compositing (Single AOVs)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone this is reza welcome to another nuke video this is the first video of a two-part series and the focus will be on rendering and compositing render passes or aovs we talk about maya nuke workflow and we start by setting up individual passes inside maya then we take our render and composite the back inside foundry nuke to create this image this video has been requested by many of you so i hope you find this [Music] useful [Music] all right here we are inside autodesk maya and i will be using arnold shaders and lights for this example but again the principle stays the same regardless of the render engine that you're using so inside maya my robot is posed i've got my lights all in the right direction considering the back plate that i'm about to use and the only material that i added apart from the robot is this ai shadow mat so this is something that you need to catch the shadows that's casting on the ground and i didn't really use any diffuse attributes we can use tinted diffuse make use of that indirect diffuse or if you've got a glossy object and need reflection you can make use of specularity but i went with the default value for that now um yeah apart from that everything is ai standard surface and some ai flats and ar car paints but apart from that it's just good old arnold shaders now let's go to the render settings and starting from common so you specify your image size and the renderable camera that you want to use you specify your image sequence and the extension i go with good old exr high dynamic range then you can really set some time aside and optimize your render if you're on deadline it is important not to just crank up the aaa sample otherwise your render time will triple the array depth really didn't change it because ray dept does add to the indirect illumination but i really didn't want to get any so i left it as default now to aovs where the magic happens really let's explore what passes we need for this particular example i'm just going to move that to the side and well we need z depth that's for sure and i'm going to scroll down although i'm using metal objects i still would like to have really good control over my diffuse direct and diffuse indirect so i'm going to bring both for the power button and the pupil and the heart prop inside the robot i've got emission value so if i go here go to this area and probably solo out just this bit you can see i've got um like the heart of the robot with emission value i also have the power button with emission value which i would like to incorporate and there's i think one tiny object in here that uses emission value so i definitely need a mission as a pass now um apart from that i can use shadow matte obviously we used shadow matte material so we can catch the shadow and that's how you bake it and catch it on a layer so shadow map needs to be here as well now one very important path to actually are specular direct and specular indirect for metal surface you definitely need that i've got few bits and pieces on the goggle that are transparent so i'm not gonna do transmission direct and indirect only one transmission value will suffice it's a bit of an overkill probably going to switch back to my render cam and then we have sub-surface scattering for the teeth these two guys are using subsurface scattering in arnold ai standard surface and i do need ao pass but you can see ao pass is not in the list and that's why we are going to simply create it so we click on the add custom you can name it whatever you want to name it ambient occlusion or ao and go create now if i go here you can actually specify a shader to it so i'm going to click on this go to arnold and ai ambient occlusion is what i need i tend to increase the sample to something like 8 12 or 16 go with good old 16 and reduce the spread to something like a point actually to yeah something like point 0.8 so it's not too wide and it's not too tight and that really should do it for me so i'm going to bring the passes window back now you can see that i'm going with exr all the way and really don't want to use low dynamic range in case if i want to color correct it in nuke i need that extra level of information and that should really do it that is it i'm going to close going to rendering menu set render and render out my passwords using render sequence if you use that always make sure that you have the right camera setup sometimes it's tricky all right i'm just gonna set some time aside render all the passes and see you all in nuke in no time now we know how to set up passes inside maya let's take our render passes into nuke and see how we can combine them back together and we place a back plate just to blend everything and get the final result so i needed a back plate instead of browsing on different platforms to find something i thought it would be good idea to just take my camera in the backyard and take a photo so i just took some props took my camera and took a simple photo like so so it's not the best photo admittedly there's a little bit of noise in here if not everything is focused which is sort of intentional i was hoping to use z depth but that was the process basically very simple nothing too special and i tend to do that rather than browsing on the internet to find an image i tend to make and curate that image myself just to make the job a lot easier now let's focus on individual passes and see how we can start and what paths we need to bring first now obviously with merge aovs it's very straightforward you have only one pass you bring it over and then you extract individual layers but if you have separate passes knowing what to use first is the first step so there is no right or wrong way really but i tend to use diffuse passes to begin with so i'm just going to select my direct diffuse and indirect diffuse and bring them in there's not much in there actually simply because most of my materials are conductive so if you have conductive material then chances are there's not much color information is available in your direct diffuse and indirect diffuse if you have dialectic objects then there's a good chance that your diffuse pass is the rich pass the past that you seed information the most but because i'm using conductive material then my specular pass is the rich pass now let's start with just a simple backdrop i am using nuke version 12.3 just in case if you're wondering i'm going to select both of these guys and move them to the side double click on the backdrop and call this primary passes probably i'm going to make the font a bit bigger it's going to be a big backdrop with every single color pass in it so this is my direct diffuse and this is my indirect so if i have any bounce lights and they hitting the color information that's what i'm getting now the first one is fairly simple we've got two diffuse passes i'm just going to select one of these guys and press m and whatever pass you select will pipe into a and then you can always switch if you want so if you want to switch to pipe a and b you select the merge tool and shift x will swap the pipes i'm holding down control to use a dot node so everything is neat and clean and for the merge operation i tend to use plus now that was fairly straightforward now if i look at here instead of having individual passes all of a sudden i get diffuse direct and if you look at these areas i get diffuse indirect as well so that was very simple next is to bring specular ones now specular passes are the main passes i'm just going to deselect because i don't want to connect them to any pipes bring them in now if you look at specular direct that's sort of a main pass for me now i'm going to do the same trick here i'm going to select the specular indirect press m on it it connects it to pipe a then bring this one over select pipe b into specular direct hold down control create a dot node and i connect both of them and now if you look at this closely you can see i've got specular direct and specular indirect can be added like so again all the colors that come from dome light and indirect lights and bounce lights will create those indirect passes now we have these two let's connect them together using another merge node so i know this is going to be pipe b main pipe b for me so i'm going to select this merge node by the way i need to switch that to plus we don't want to forget that so i'm going to select this merge node connect it to specular passes and press m and that plugs it to my a pipe bring it over select and connect pipe b to merge one hold down control and combine them all together now i have diffuse and specular passes combined so if i click on them and select merge 3 change the operation to plus and using d i can see i have diffuse and specular on the top diffuse specular on the top well that was really straightforward let's bring more passes we have another one subsurface scattering and it's just the teeth that i use sub surface scattering and we are going to do the same trick so with sss selected i'm going to press m to connect it to pipe a bring it over merge 4 to pipe b change the operation to plus hold down control create another dot node done i have another one which i think is quite important and that is my math pass now this matte pass is uh my alpha because so far i'm just going to connect my merch 4 into subsurface scattering right now none of these guys have alpha channel well they do the merge nodes do have alpha channel but the read nodes themselves don't have any alpha channel if i select read 3 which is my specular direct and look into the alpha channel using a on my keyboard there is no alpha channel so i need to kind of bring that alpha channel in and implement it into my primary passes so that goes into primary pass as well and i'm going to use the same trick but instead of using a merge node i hope you all remember this because we covered this in the rotor video i'm going to use a copy node now the shortcut for the copy node is letter k so i'm going to select my matte pass or alpha pass for lack of better word and press k connect it to pipe a bring it over pop b goes to the main stream holding ctrl create another dot node just to be organized obviously this is an optional step but i tend to do that so everything is nice and readable now again this is something what we've already discussed copy node by default puts an alpha from a into an alpha in b well although we do have alpha here we tend to use only simple color i'm just going to reduce my number of tabs from 10 which is way too many to one or two i'm gonna try one first now if i double click to bring copy attribute this default value sometimes not going to work because this alpha channel is a single color it doesn't matter if i go rgb red green blue and in my case alpha they're identical so while you can connect this and view this sometimes your alpha channel does not have the alpha itself in that case you go and select rgba red to alpha as a matter of fact that's what we're going to practice for this session because that's the most probable case where you bring an alpha it doesn't have an alpha so you select a channel and then plug that channel into your final result now if i look at the final result and press a on it i do have alpha channel coming from my matte pass so that's basically how you composite back all those typical color passes so let's see what else we can bring to make it more exciting so with this primary passes i'm just going to double click on it change its color a little so it's not just the default color like so i'm going to drop another backdrop and this one is called auxiliary now auxiliary is any pass other than your primary passes obviously all right within that auxiliary i have some additional passes so if you remember in maya we talked about having a mission pass so a mission pass is some sort of a a light pass so i have a mission and if i bring it over and have a look at it any material with emission the pupil the heart and the power button they all be given the emission value so it's just ai standard surface with emission values on it for the goggles i also have transmission values so if i have a look at transmission it's not too pronounced as you can see it's very very subtle but i'm hoping to intensify the effect a little bit if i can so these are all the passes that we can call them light passes we do have separate light passes as aovs but just to be more organized i'm just going to create another backdrop color this backdrop bring these guys down double click and call this light passes now let's see how we can make use of those and add that to our primary pass so first things first i'm just going to drop in a great node because i just want to kind of intensify the effect a little bit so probably i'm going to add more again it's got more gain and more color as a result i'm gonna probably do the same thing with multiply if you see fit but for now this just works for me if i go before and after you can either the pass is more pronounced for lack of a better word now that's my transmission that's more than enough now i'm going to go to my glow pass or emission pass now if i look at this guy i need a glow node now i tend to use two glow nodes one is sort of a tight glow node because it's just going to be very subtle and just around the object and the other one is just widespread sort of glow note now for this one we set the tolerance to zero probably reduce the brightness just a tad i'm just going to probably change the coloration a little bit so make it more of a orangey look just a tad and then reduce the size that's the main point for probably i'm going to use six so as you can see it's very tight around the object i'm not going to change the filter the intensity or there is no mask assigned to it i'm just going to simply copy and paste the glow node and in this one i'm just going to type a label here so i know it's a kind of widespread sort of glow note and as i talked about the only difference is the size so probably try something like 29 on this one yeah that's better and probably bring the brightness back to something like one you can give it a different color just simply to to differentiate so probably something around that yeah that that should really do the trick and the good thing about node base workflow is you can always go back and change these attributes back and forth until you're happy with it so we don't need to really lock anything down we're just experimenting at the moment and later on we can go back and change them now let's connect these two together and the method is going to be identical to what we discuss in the color passes i'm going to select glow 2 press m so it plugs it into pipe a and b goes to the b stream holding down control have another dot node and now it's time to plug that it's very simple it's going to be another merge node to connect the light pass into primary pass i'm going to select the light pass merge node and press another m bring it over plug this into here change the operation to plus and make sure to change the operation for my light pass to plus as well holding down control create another dot node just to be clean and if i look at the result now you can see we have the glow so if i go before and after you can clearly see that that's the same case for the chest and for the eyes before and after fantastic we also have transmission passes as well in here so before after you can see how it works and again at any point of time if you think for example um multiply 3 the value is not enough you can always intensify it there you go that's even better so i can do before and after and you guys can see the result that's great so let's continue with the passes next one is ambient occlusion i'm going to very quickly drop in another backdrop set the fund to 35 and bring over our ambient occlusion so that's our ao pass and a simple so there's not much to it really we already know what to do so that's another m merge node bring it over plug the this b b-pipe to the main stream now as you can see we don't want to have it as over and plus in this case is not going to give us any result although it looks kind of cool but that's not what we're looking for with ambient occlusion we tend to use multiply so i'm going to change the result to multiply now what i'm getting is just too much ambient occlusion not sure if you guys noticed that but we just killed so many details in here not to mention our glow as well now one way of doing this is to just play around with the mix and fine tune it here but it's recommended not to use that merge node and the mix attribute or on the merge node too much so um i'm just gonna hold down control create a clean dot node so instead what i usually do i just drop in a color correct note so pressing c to drop in a color correct node i'm just going to call label this ao so i don't confuse them and just play around with gamma of my master slider a little bit and that does exactly the same so if i increase the gamma to something like 3.5 before after before after you can see that does the trick for us and it's much more efficient and better practice if we do it through a color correct note to color correct our ambient occlusion that's done what's the next step that would be our depth pass so i'm just going to drop in another backdrop i'm going to change the label 35 and let's bring our z depth now if you look at it you're not going to see anything because you tend to bring the exposure down to see it so let's say if i just drop in a grade node and lower the multiply to a super low value there you go now you can see how depth pass works now unfortunately there's not much depth in this particular image so if you have a sphere in the near ground or probably another sphere in the background then this pass would have been more useful but right now we don't have a greedy depth in our 3d scene so i'm not too surprised if you don't even use the steps pass as much but again just for the sake of demonstration i thought i would just create one in maya so we know how to use this inside nuke now this goes again into the main pipe all i need to do is to select this guy and press k to create a copy node bring it in and again right off the bat we're getting an error and we talked about this already it says that well your input needs to be rgba well my input is not rgba it's just rgb so we know that we need to switch to just a red color so there's no missing channel but that's not going to do the trick because all it does is just it puts this into rgb alpha which we don't really need we need to put that into our z depth first things first i'm just gonna make it easier to read and now if i go and zoom in into my copy node i can say just put that into my z depth that's better now we can make use of zd focus later on and extract the information but now we know that at least this image has been implemented into the z depth so we do have the information now now what's next next is to bring our id map so id map is really really helpful in case if you would like to isolate few areas and color correct them and again we did talk about them in the previous videos so click on the top-up banner to have a look at how to use id maps in conjunction with grade notes and that's exactly what we're going to do but i'm going to show you a more efficient way a more advanced way of creating this so first things first you know what i'm about to do i'm just going to create a backdrop done now instead of plugging this into a grade node so i'm just going to actually create that grade node right now so making it ready to go now this grade node is going to be responsible for our id so i'm just going to label it now what we used to do is to plug in this id into the grade node mask channel and control that via mask r g b to target red green and blue now what i'm suggesting here is to actually take it to the next level instead of doing that on the grade node why don't we create three shuffle nodes one is going to be red another one is going to be blue and another one is going to be red now i'm going to reposition them so red and green and blue and let's plug them all in now all we need to do for the red channel is i'm just going to unplug everything and i'm going to say rgb red it goes to rgba alpha for the green shuffle node i'm just gonna get rid of all of these guys and all i'm gonna say is green goes to rgb alpha and for the blue we're going to say blue goes to rgba alpha now let's say hypothetically if i were to select green and plug that in to the mask like so ctrl a another dot node now i can control this image without changing mask set to rgb all i need to do is just to connect it to g r or b now if i go to my grade note here i'm going to zoom in and let's say i want to change the green channel i can easily go and for example increase the multiplication to 1.9 and instantly the green portion of my id map will react to this how cool is that you can even go and change the coloration of it as well so make it just a tad blue or green if you want i'm not going to do that so i'm going to undo now that should do it we have another path that i would like to bring so it's a backdrop and let's bring the shadow matte so shadow matte is an interesting one because we just can't get away with a normal merge node first things first if i look at the shadow map we see that all the useful information that we need is actually in white so we need to invert it pressing tab invert the color and we get something that is very similar to ambient occlusion now we just need this bit not the um actual character itself and that's why we do need to use multiply and multiply will create a hold out for us and that basically gets the job done in no time at all now the question is where do we need to connect this to because it should not be or cannot be at the main color path it needs to be in the background so what i can do i can actually go over here create another backdrop and call this background and now let's drop in my back plate now that shadow pass goes in there and eventually we merge this to our primary passes now if i look at my background the resolution i have is 6000 pixel the passes individual passes have a different resolution and that's what what i specified inside maya so all i need to do to make this same resolution as my passes is by dropping a simple reformat node now if you can't see that custom resolution in here you actually can see it in here where there is no label for it and there it is i select it now my back plate has got the same resolution as my passes which is something that i wanted now it makes it a lot easier for me to just merge that to the shadow pass so i'm going to all the way down create a merge node obviously a b goes into a reformat i can view the merge node and i can simply create a dot node and get the premolt here in here and then that pipe a can actually go in here now obviously the blending mode is incorrect over is not the right operation for it we usually use multiply and there we have it now that's exactly what i wanted now there are two things that i need to take care of one is the position of this little guy here which is a little bit off and the other one is the thickness or the opaqueness of the shadow again i can use the mix node to fix that but it's not really preferred and because of that i can just simply select the premolt and drop in a color correct node in here now color correct node is going to easily take care of that i can easily label it shadow that's an indication it takes care of the shadow and i'm looking at this shadow here and i'm looking at this shadow here and say all right i just want to reduce the gamma so it just matches the direction of the shadows i have then it's all um a matter of bringing a transform node to reposition this so i'm just going to press t for a transform drop it in here and change the scale to something like 1.2 and that's actually pretty good now i need to clone that transform node and assign it to my color pass as well because we have the same node and we kind of need to make sure that our shadow and our color paths are going to line up now to clone any node that you have in other words use the exact same node for something else we use alt k to clone and i just plug it to my color pass now if i look at my color pass and i'm looking at the transform node for my backdrop they're exactly on the same level now let's merge background and foreground so my foreground and i need to just press m background for b and if i look at it they match beautifully again i don't want to forget this dot node which i'm really obsessed about you may have noticed now i would like to color correct this a little bit so i think right after transform it would be a good place for me to just a tad of gamma into it so probably i would like to increase this gamma to something like 1.3 um to just reduce that level of saturation um i'm gonna reduce the gain to something like 0.6 because that's i feel that's how it how it looks and for my foreground i think just a tad of very very slight touch of red color i think it's something that i want so probably point zero zero three point zero zero three and for blue just gonna use point zero zero maybe zero eight something like that so it's very subtle but i think that kind of does the trick so it kind of blends more with what i have right now now if you want to use a z depth that would be the time to bring it over so i can just type in zd focus and i will use my z depth here you can see i'm getting an error but it's not an error that probably you would be getting all the computational process goes through tesla card graphic card that i have i just need to turn it off that's all and it does the trick now for arnold the math algorithm is depth and then you need to go and switch the output to focal plane setup and just fix your focal plane so you may want to bring this guy over here and then find that sweet spot basically depth of field you need to increase it all the green portion will be in focus like so the size will change the amount of depth of field in areas where it's defocused and then it's just a back and forth swap between results and local plane to see what value works for you remember that zip z depth or zd focus will make the process expensive i'm working on a 6k image so as you can see despite a powerful computer i have it really slowed down the scene but you can see the kind of effect that you're getting i'm going to disable it for now and we're almost towards the end all i need to do is to make sure that i'm using the same format so i'm going to reformat it to the format that i want and i was hoping to drop in a crop node as well the reason i'm saying this is because of this border here and this border will get calculated we talked about this in our transform video or animation video in nuke that we need to be mindful of this border because whether we see it or not it will get calculated so in cases like this all i do is just drop in a simple crop node and problem solved now you save a lot of computational time now for my almost final polish and touch up i need two nodes one good old a great note and this is just purely artistic decision that i'm making i would like to just blend these two guys together so i'm going to put in blend as hint now going back to grade note probably going to separate the channels and just ever so slightly change the coloration a little bit so as you can see before and after but i put a nice tent on top of both plates so they blend together nicely another note that i would like to use and i use it always at the end of my node is a gray node especially especially if i have grain or noise in my background which i do have it so um i tend to use a gt codec a lot and you can see now i have noise in the foreground as well as background so if i press d you can see before and after before and after so it goes really well with the noise the amount of noise i have in the background obviously if your back plate doesn't have any noise then you probably don't need the grain but for me this is something that i think i need to have and that's it that should do it for this tutorial obviously you can drop in a write note and write it out as a sequence but hopefully this covers all the possible scenarios that you may run into all different passes that you may have as individual sequences when you render something out of maya and you would like to comp it back inside nuke thank you very much everyone i hope you find this tutorial useful also a special thanks to tim parson who helped me to put this tutorial together see you all in the next video where i explain how to do the exact same thing using merged aovs see you guys soon
Info
Channel: SARKAMARI
Views: 13,740
Rating: undefined out of 5
Keywords: Multipass rendering, Multipass compositing, Single passes in Nuke, Maya Nuke workflow, Diffuse direct, diffuse indirect, Specular, direct, specular indirect, Shadow pass inside nuke, Zdepth, Zpass, ao in nuke, compositing maya nuke tutorial, Reza Sarkamari, Foundry Nuke multipass tutorial, merge node, premult
Id: 4A9kbUZpqIU
Channel Id: undefined
Length: 42min 3sec (2523 seconds)
Published: Sun Oct 11 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.