Render Passes (And How To Use Them!)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello today's video is all about render passes in blender and how to use them just before i start i'm going to be putting both the blender files and the renders from this video on my patreon for a dollar so if anybody would like to get their hands on the scene and use the same project files that i'm using in this video there is a link in the description and you can get your hands on it there let's go for the example in this video i'm going to be using the scene that i made on the live stream at the weekend if you don't know this is for the discord render challenge that we do every month and this month's theme was magic so i made a cool table with a load of candles and stuff on it oh that's not what it's meant to look like there we go this is what it looks like so very brief bit of background information just in case you're not sure what render passes are if we take a look at blender's default output settings down here you can see we have a lot of options lots of people probably render to something like a png or a jpeg so if i set the file format to one of those it gives us a few options for the color i imagine most people aren't rendering to black and white so what most people will probably be rendering to is rgb or rgba these buttons are going to define what channels will be used in the render and all that means is that in rgb you have a red channel a green channel and a blue channel to display all the different colors in the shot and then rgba is the same except it also has an alpha channel which is used for defining transparency you can view all of these different channels in blender by going into the image editor opening up your render and then this box here allows you to look at the color or the red green or blue channel on its own so for example this is the red this is the green and this is the blue and it's probably most noticeable in these crystals which are actually multiple colors you can see if i look at the red channel the red crystal is very white and everything else is fairly black basically whatever channel you're looking at if something's fairly bright it means it contains a lot of that color so that's the basics of how channels work in standard formats like jpeg or png however when it comes to rendering for visual effects there is a more common file type that's used and this is known as the open exr multi layer if you've watched many of my blender videos you've probably seen me talk about this before exrs are kind of the industry standard for working in visual effects and the reason for this is that the exr format allows you to store lots of extra channels inside the image as well as the red green blue and alpha channels and this is when you can start to look at the view layer properties tab and in here you'll find a load of extra channels that you can turn on or off and this will be included in the exr render so for example when i rendered the book on its own these are all the different channels i included in my render we have the default red green blue and alpha channels which is what we're looking at now i also included the emission channel which gives you all of the elements of the shot that are essentially emitting light so i made the runes on the pages light up and i also gave the sparks an emission texture then we have a few variations of diffuse and glossy channels there's a direct indirect and color for each of these and if we take the diffuse direct which i'm looking at now this is now displaying all of the direct lighting on the object then we also have diffuse indirect the indirect channel means it's coming from the light source and then bouncing off something else in the scene and then hitting the object and then the color channel quite simply just displays all of the color information same for the glossy so we have glossy direct glossy indirect which has nothing in it and then glossy color there's not much in this because obviously the book isn't a reflective surface and then i've got a few other ones as well i have a missed pass which is essentially the depth information in the scene this is a gradient going from black to white across the entire scene and based on the color values it tells you how far away something is from the camera you can use a depth pass for a few cool tricks and compositing like adding proper defocusing so that the further away something is from the camera the more out of focus it appears then there's the uv pass this is essentially color information that tells the software how the object has been unwrapped i'm going to give some examples of all of this in nuke in a second and then lastly on the book i also have a normals channel you can do some really funky stuff with the normals past the main thing it does is just use color information to tell the software what direction the normals are facing on the 3d object i also have a separate render layer for the utilities and in this i render what's called a cryptomat i can't quite display how this works by just flicking through the channels but i'll show it properly in a second basically what a kryptomat does is assign a load of random colors to all of the objects in the scene you can see here we have a few tick boxes for object material and asset and what you can do with this in compositing is basically color pick an object that you want to get a mask for and it will give you a perfect alpha for that object a really good example of this was when i did the iron man video i used the kryptomat material to grade the red and the gold on the suit separately just to tweak the colors a little bit and the last one i'm going to mention before jumping into nuke to give some examples is the position pass the position pass is kind of similar to the missed pass in the sense that it's a gradient going across the entire shot but this time instead of just going from black to white it has color gradients going across the scene in x y and z so you have all of the three axes again this gives the compositing software an idea of where everything is in 3d space based on the color values and you can even use this to generate a point cloud of your 3d object so you can actually visualize it in 3d space even though this is a 2d render so now i'm going to jump into nuke and go through some examples of how to use these passes you can do all of this stuff in blender as well nuke is just my preferred compositor so i find it easy to use so this was my final composite for the render challenge shot first up we have the table render this is what it looks like straight out of blender and these are all the channels that are contained inside this exr so the first one i'm going to show is the missed pass it'll be fairly similar in all compositing softwares but in nuke you just add a zd focus node and then set the depth channel to be the missed pass and then it gives you this focal point and wherever you put this it's essentially going to add the focus into the shot so as you can see the focus now falls off as it goes further back on the table i can visualize this by changing output to focal plane setup and it gives you some options for kind of how shallow you want the depth of field to be something like that looks pretty cool the next channel that i utilized to make this look really cool was the emission pass for the book so what i can do is separate out the emission pass like this and this will just isolate all of the things in the shot that are emitting light and the reason most people do this is to add things like glow and bloom onto the things that are emitting light to make them bed into the scene a bit better so for example i can add a glow onto this and then what i can do is put this back on top of the book render and now i have a nice slider to control the amount of glow and it makes it look really cool the uv pass is something that's really fun as well so if i separate this out this is what the uvs for the book look like in color data and what you can do is actually apply textures to the book as if you were adding these to the uvs in blender so for example if i add a checkerboard i can then use an st map node in nuke which is just a node that allows you to use uvs to apply texture plug the source into the checkerboard and plug the st map into the uv and then i set the uv channels to rgb and now you can see this is applying that checkerboard texture onto the 3d geometry of the book this is really commonly used if you have something like a sign in your shot that's cg and you don't really know what you want to put on it yet you can render a uv pass for it and then in compositing you can put whatever you like on it and it means you don't have to re-render it you want to change the look i actually used this in my buying toilet paper in 2020 video and what i did is render a uv pass for this screen here and again that was because i didn't really know what was going to be there and so instead of deciding and baking it into the render i can just use the uvs to apply that text afterwards the normals in the uvs look fairly similar but they do different things like i said before this is just color data that displays the way the normals are facing on the geometry and once you have this information the computer can work out how light would interact with this object if you added a new light into the scene so for example i can add a pmat node this is a little bit of a hack there is actually a proper relighting setup in nuke but i'm just going to do it the cheap way and this gives me an alpha channel depending on where i'm color picking so if i wanted to add a highlight onto this side of the book for example i now have an alpha for that and i could use a grade node and plug the grade mask into that alpha channel i created and crank up the gain and you can see it now gives me a highlight on this side of the book so you can use the normals to add new lights into the scene that weren't there in the render which is really really handy another thing you can do with the normal pass is combine it with the position pass which is the color gradient thing that i showed earlier and in nuke there's a node called position to points i can take the first input from this node plug it into the render of the whole scene the second input goes into the position pass and then the third input goes into the normal for the whole scene and then if i look at this node and go into the 3d view you can see it generates a point cloud with colours for the entire scene and gives you actual depth information of where the candles are where the table is where the book is and this is really cool because i haven't exported any geometry from blender so all of this is entirely generated by the 2d images and last but not least is the kryptomats i rendered a utility pass that has all the cryptomats in them as you can see up here if you look at these channels on their own they're fairly useless and this isn't really what you want to look at to actually view all the color ids properly i'm going to add an actual cryptomat node and then if i look at this it will start to display the colors i'm currently in crypto asset mode but if i flick through these i also have those options for material and object like i did in blender and as you can see it's assigning a different color to all the different objects in the scene so anything that's a unique object will have its own unique color value and this allows you to color pick it and then separate it from everything else so i can grab the color picker in the cryptomat node and color pick some of these pages for example and then if i hit a to look at the alpha channel this gives me an alpha for just those pages and it's the same if i keep adding stuff it now gives me an alpha for the book cover and the right hand page and once you have an alpha for something you can use that to do pretty much whatever you want the main reason this is used in cg compositing is for isolating and grading certain parts of a render so for example here i've got everything in the scene rendered in one frame so i haven't got them separated out like i do for the book and the candles and stuff here this is all everything in one shot haven't got any masks or anything to separate them and if this was some live action footage what i'd have to do is go in and draw some masks and rotoscope all the stuff that i wanted to separate and grade but what the cryptomat allows me to do because it gives me a perfect alpha is i can use a grade node and then use that alpha as a mask and if i change the grade on this you can see it changes the grade of all of the things i selected in the crypto map this is really cool cause you can do whatever you want with it you can swing the colors around make it brighter or darker and it allows you to get really stuck in to find tweaking all of the colors in the shot which is really handy for compositing actually that wasn't the last thing i forgot to mention the direct and indirect light passes so like i was saying before in the book render i have a diffuse direct indirect in color and then also a glossy direct indirect in color and if i look at one like the glossy direct for example this is showing me all of the parts of the book that are shiny and have light on them and the cool thing about having all these lighting passes separately is you can go in and grade them to change the way the book actually looks so for example if i thought the pages were too shiny or needed to be shinier what i can do is shuffle out the glossy direct like this i can then minus this from the original and then add a second node and plus it back on top and if i flick between this and the original they now look exactly the same which is the idea essentially because i'm doing a minus then a plus i just cancel that out so it's doing nothing but the idea is now that if i add a grade node in between where i take it away and put it back on top i can change the way it looks before adding it back into the beauty image so here for example in the grade node i can turn the gain right down which will make the reflections a lot less bright and then when it gets plus back on top the reflections are much more muted so i flip back and forth between the original now that's how it looked before that's how it looks now so essentially what i've done is just graded the reflections without grading anything else in the shot so i'm not touching the diffuse i'm not touching any of the indirect lighting this is literally just the direct reflections from the light source and i can change the way they look i can also change the color and again this is done really commonly in cg compositing it gives the person compositing the shot lots of options and things to play with and it means you don't always have to go back to the render and re-render if you want to change something about the lighting so there we go that's how to use pretty much all the render passes from blender and some demos of what i do when i'm using them in compositing hope this video is useful if you have any questions about what i did feel free to leave a comment and i'll try and get back to you in a timely fashion thanks very much for watching and i'll see you very soon [Music] me
Info
Channel: Alfie Vaughan
Views: 10,524
Rating: undefined out of 5
Keywords: VFX, Blender, Nuke, Compositing, Visual, Effects, Alfie, Vaughan, render, passes, layers, channels, tutorial, how to, cgi, cryptomatte, animation, video, background, image, sequence, EXR, multilayer, open, settings
Id: mZkJl9BNZ4E
Channel Id: undefined
Length: 10min 29sec (629 seconds)
Published: Wed Apr 21 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.