507 Render Passes Custom EXR H264

after seeing what we can do in the compositor I want to talk about getting stuff out to let's say an external application and and sort of what your options are to do so if you're coming from like a full-on renderer you probably already know about render passes and that's kind of what we're gonna talk about but also about how we can get them out of blender maybe in a bit more optimized way for example so first of all let's have a quick look at the scene I've just set up a very similar scene to what we had before but we've got a little bit more going on and I'm just shows you what is and isn't available in the passes right now and how deep they go again if you want full crazy depths when it comes to passes you're probably better off using cycles but there are quite a bit of options in Eevee right now so we've got a glass torus here we've got a metallic Suzanne just a green plastic echo sphere and a cube with with some subsurface scattering as well as some emission in Suzanne's eyes now compared to the previous example I've turned on bloom again just to be able to talk about some of these passes and the easiest way to do so is just to turn all of them on there we go grab all this and just turn all of them on now I'm just gonna hit f12 render and it's gonna render all those passes now in a rendered view and let me zoom in a little bit we can actually see all these different passes so um let's run through them really quickly now depth is basically the actual depth of items in your scene so if we look down here down at the bottom right as I'm right-clicking you can kind of see the values go up and down so there's only one value which is called the Z value which is down here basically this is just the distance of the mesh to the camera so if we go back for example we know over here in this part of the scene this one's gonna be a little bit further away and maybe Suzanne here in the middle is a little bit closer so if we go back to that depth um if you look at our cube and we look at the Z value this is eight point nine if you look at Suzanne here this is gonna be seven point eight so it's really just grabbing the units of your scene and putting them in a depth map now this looks white because from zero to one is sort of from black to white on your screen and this is a very crude explanation but everything above white will actually just turn white and look like it might you know shine brighter or whatever but in our case it's just good to know that this is just the raw depth value if you want to do any kind of depth of field after the fact then normals are just going to give us our normals of our meshes which is fine and now we get down to the beaten potato so now this is going to give us our emission and as you can see if we look at these values so I know I'm emitting about you know five or I think ten units I think five units for this and you can see the raw values at the very bottom down here is gonna be five in the our channel so you know this is going to emit light now got AO which is just a nominee and occlusion pass got environment there's nothing in here because we can't actually see our environment so anything that would be in the world shader would show up in here he's got a shadow pass which is a little bit rough just due to the nature of shadows and Evi and also we could really crank up the settings and try and get a better shadow pass out of here but again it's just a little bit rough we've got a missed pass which if we go back out here we can actually set up a missed past in our render settings in the world settings and we can just set it up wherever we want so if you want to render like a landscape and you want to composite in some haze or something you'd always use a miss pass for that and you just set up this start and end then we get into some more sort of compositing direct territory rather so we've got the diffuse direct and the diffuse color again if we go to our passes we can see all of these in here maybe let's just leave this open for now so here you can see diffuse light in color so that's going to be diffuse direct and diffuse color and then lawsy direct and glossy color once now there's no glossiness in here because it emits so that's why that turns black and then we've got to bloom separately and we've got volume scatter as well but I didn't put any volume objects in here because you know it's just I want to keep it fairly fairly quick but again you could get the the volume stuff out separately as well and composite it back over now let's turn off what we don't need so I don't want any depth or missed normals might be interesting yeah let's see what else we don't need the volume we don't need in the environment we don't need the shadow I just want a couple of them to show you how we can set some of this stuff up so by default we go in here what I've done is if I go to my render settings I've set up already this be and open the XR multi layer so that means I've set it up to be RGB a and half float and that means we're gonna get our values even the values that go over white in the viewport or over red in this case we're gonna get all those values out because we're using an open D XR you don't know what an open e XR is basically if you're gonna do any sort of compositing it's gonna be the format to use because it retains a lot more information than say a JPEG or a PNG and I would suggest looking up on that kind of stuff before you get into into compositing in the first place this really is meant for people that already know kind of what's going on with this stuff so with that said I'm just gonna render the one frame and let's go to our library file manager here and let's see I'm gonna throw these two out because I was testing stuff earlier before but basically this is the exact that we get if I double click it I'm going to open it in an external application and we can see if we turn on our layers we'd actually see all these layers show up so we turned on an occlusion we turn on bloom we turn on combined diffuse color diffuse direct emission glossy color glossy direct and normal now let's say just for the sake of it we don't want to have to deal with these two separate passes we just want a glossy pass and same for the direct we just want a direct pass we don't want to have them in separate passes we want to composite them already together in blender and then output those as a pass to go to our other compositor and we can do that very simply by switching over to the compositor view I'm gonna turn on use nodes now by default stuff is gonna show up in here but because I already messing with the scene I'm gonna have to set it up myself and I want to set up a composite for the output and really what this is gonna do this is just your main output that you want to output instead of using this actually I'm gonna throw this out we're gonna use a file output instead now what this does is it gives you the option to output a separate file next to this output file so if we set this back to jpg I'm gonna go back to our file manager and delete the one that we've rendered so let's call this our custom exam there we go and we're gonna leave this set to multi-layer as well because we want everything that we plug into this node and we can add a whole bunch of inputs and we'll do that in just a second to be in one axr file the same way we did it over on the output here now I'm gonna plug in my let's see we want our normal this takes a little bit of setting up we want our you know then we want our diffuse we want our colossi pass this admission I think we of all of them except for the bloom I call this boom now if we just plug these in you'll see as I plug in the normal past the color of the of the slot will change so it knows it's a data layer and we'll save it accordingly AO diffuse and diffuse direct so we can't plug these in together and that's exactly what I wanted to talk about so I'm gonna turn on the backdrop here and just really quickly talk about compositing these together so let's grab a color node I grab a mix node and just put these two together so we've got the diffuse and the diffuse direct and if we multiply these we're actually going to get the correct diffuse pass and now what we could do is output that that result to the diffuse slot for our custom file we could do the same thing for our glossy passes to grab these there we go if we turn off the multiply this is the the first glossy pass and now we get what we need and we can plug this into the glossy and then all it's left is our emission and our bloom there we go turn off this viewer again and turn off the background and just do a little bit of a little bit of housekeeping we can move this up a little bit I'm going to do the same thing here we go this really is just to move stuff around and make it a little bit more clear so that when you open the file again wrong button when you open the file you can kind of see what's going on and it's not this big noodly mess there we go so all that's left to do is just to render this out and one thing to notice if you're using this this custom setup even when you're gonna render out is still normally by default blender doesn't save any stills that you render but in the case of this output it actually does so I just hit f12 and go back to my temporary directory that I'm rendering to you can see we've got custom 0 0 or 1 because it depends the the frame name if we double-click this now to open it open it up in our external application we turn on our layers you can see we actually have those layers that we set up with the compositor diffuse and the composited glossy and the other ones that we added in as well so this is a really nice way to control your ax RS and if you want to go even further and you want these passes out separately you can do that as well by setting this to EXR and now you can see for each set of these nodes and unfortunately it takes it keeps the names for the multi-layer but it uses different names for the EXR and you could even use a custom format for each single one if you wanted to and I'm gonna leave these set to open EXR and just hit f12 again and what you'll see in the file manager here now this custome XR is still the one that we use that we rendered before but now we get a little folder called custom and now we get all those separate passes in so this one let's have a quick look is the normals this one is our AO and so on and so forth now you're gonna have to obviously fix the naming a little bit by setting all this up again and making sure you append the frame number and that kind of thing but it's good to know that you can either output these as one one full-on XR or he XR s with different different settings different compressions that kind of thing depending on what you want for the different passes so yeah that's just a very quick overview of passes with Evie and and outputting to custom eyx Aras I wanted to throw this in anyway I know it's a bit more technical than some of the stuff we've talked about so far but um yeah you can really optimize your VX RS with this file output to only grab what you need and maybe save a little bit of disk space and that kind of thing so yeah with that said it's time to move on to the next section

Loading