Blender for Production - Blender to NUKE Workflow - 01 Set up a Blender to NUKE Pipeline

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi guys welcome back to my series blender for production my name is seger mouse from pixel train it has been a while that i published a tutorial i was really busy in working at my own projects and also teaching and now i come back with a new tutorial for this series because i found in my teaching for professional studios that we have now a software combination which is really really interesting more and more studios are adapting blended to their pipeline or thinking about that and they want to connect now blender to their existing pipeline and on the compositing side nearly all my clients use nuke and so one of the things i'm really often asked is how to connect these two worlds so i want to show in this tutorials some gotchas which you fall into if you are rendering directly from blender to nuke and i want to show you some easy solutions so in a professional pipeline most of the tools will then be scripted and i also understand that many indies out there are not wanting to script this solution so i want to show you ways how to manage the communication between blender and nuke and you also can adapt this know-how then maybe also for other compositing solutions like adobe after effects or fusion studio so it's not for the lazy people i will explain a lot i hope you find this useful if yes please subscribe give me a thumbs up and let's get started i've prepared a really easy scene here and the background for this scene here is that i wanted to show you nearly every light path we can generate inside of blender so that we can then analyze the output inside of nuke so we have here dielectric we have here conductors a metal we have glass here we have emission objects also some sort of scattering here and a volume so nothing to artistic here and what i now want to do is i want to show you the straight way of delivering an image first to nuke and then we want to analyze what's going on the normal way people go into blender and try to save out their rendering is that they find here these output properties and here is an output area and then they set here the path and they select yes here openings are multi-layers so that they can have more than one layer in this exr and then they press render and yeah it doesn't work the reason for this is that this output path here is only for animations so if you don't render animations only still this here isn't used at all so this is the first thing how to do that if you are rendering let's do that really fast and for this i bring down my resolution here to 25 so it's much much faster now and i also go here into the sampling and lower my sampling here for a test let's do 32 samples here in the rendering and then we go here to render image or you can press f12 and now it's rendering and normally you see a pop-up coming up with an image editor i've switched that off because i find this really annoying and this is a good point to understand now where your rendering lives so if you are rendering something inside of blender you normally have the random result inside of an image viewer if you don't have an image viewer you can see it how to prevent the image viewer from popping up for this i go to the blender preference by command comma or you go here to edit preferences same way and here on the interface there is a temporary editors section and here you can tell where the rendering should be normally this is new window and you can also say always send it to the open image editor or if you have your own layouts and you don't want to have somewhere an image editor suddenly in a panel which you have pre-selected you can tell the system okay keep my user interface don't change anything and that's exactly the setting i had so where's my image now two ways of getting it one would be render and then here view render so this would open the image editor but i don't allow that so i can go now here open a new panel in the header of my panel i can go here and open an image editor and if you don't see your render you can open up here the list of all images which are in memory for blender and here's always a random result and run result is your last image so this was rendering an image into an image editor if you now want to save this still you go here to image and here is a save as you go into your blender file save dialog and for this tutorial i made a tutorial blender and nuke here is a render subfolder if you don't see something on the right side press the n key on your keyboard for the end menu or here this little wheel and then you can select here multi-layer exr set your settings and you'll see here under color depth we can half load and have a full float so both are possible and then you can save this exr out so that's the first step how to get a still over like i've said if you render an animation you don't need to do that so blender saves directly but to do that right you have to go here into your output properties and if you now want to save somewhere you can select directly the path or there's a really convenient thing here if you make a double slash blender search always for the saved blend files so this is the position of your saved blend file double slash and then i use my subfolder render and if the subfolder which you type in here doesn't exist blender automatically generates this subfolder for you so and then we can say this is our animation and now you have to make sure that you use these pound signs here as placeholders for your frame numbering otherwise you get an overwritten file because here image sequence overwrite is on so blender is allowed to overwrite your file over and over again and after some hours of waiting you only have one file left so use these pound signs for telling blunder what file numbering system you want to use then i type exr here as my file extension and then you go here and tell the system openings are set your settings like before if you want to have a jpeg in the folder beside of the exr you can tick that here and then you have to render your animation so set your frame range here and instead of going to f12 or render render image you go here to render animation that's all and then you get your sequence to see then the sequence beside of you render here you also have you animation here so that's it for animations but in most cases if you now want to go to nuke you need passes in some render engines it's named aovs and other you maybe hear the word pass render element is also word it's all the same in blender you find these settings here in this section view layer properties so these are all the passes and if you now take a look here i close them down here you see there's a bunch of light passes which you use for composite your beauty back so these are the light passes then we have data passes here which you use for relighting purposes depth of field in the post and many more things and you also have the ability to generate cryptomats for your work so this is the normal work here of adding passes what i will do now for this tutorial i will give you everything i want to show you the gotchas so i do something like that here which i don't normally do i normally select exactly what i want to do yeah but this is a tutorial so we want to see everything also we want to have all the kryptomat ideas here and a little sidenote for the pros you also can have shader aovs so you can add here your own aovs from the shader but i think that's a topic for another tutorial we then do now we have to re-render let's do that this time i have an image editor open here and render result is on top so let's do the same thing again to have a fast render here okay looks really ugly but it's fast that's nice and if you are now in the image editor here you now see something new here you see here we have a drop down and here you see the word composite if you click here we have composite and view layer and the question is what is view layer blender has a render layer system and if you want to know more about that i made in my blender for production series a whole series about the blender compositor and in these i explained also what random layers are so if you want to learn more about randall layers inside of blender please refer to these videos but in short we are on a render layer with the name view layer you see it here and this is the name of my render layer so that's the thing here all our settings which we made here these passes here are part of this render layer you see view layer that's the same name so every render layer inside of blender can have its own passes so that's the connection here and if you now click here and say show me the view layer you get another drop down here now we are on the view layer of on the render layer with the name view layer and then we have here all the list of the passes which we generated you can now look through them and see them in all its glory and combined is the beauty pass here if you now save your image out again you see again the same settings like before and if you have made sure that you have openings are multi-layer you get exactly what you expect all the passes and this is something i now want to do to show you some problems with that so i say do that i name it lores only that you believe me that i know that is really low resolution for now so let's save that and switch over to nuke here we are and i press my r key for read note and i now read in my low res exa okay here it is first thing people are complaining now is look at that we see something blackish here so you don't see data in rgba which you normally expect so it seems nothing is here but you see here now all the layers and if you take now a layer contact sheet for example it's the fastest way to see everything and i show the layer names here let's press the spacebar to look into that you see everything is there the reason why you don't see it is that the beauty pass which you normally see under rgba is named composite underscore combined here and there's another beauty pass here view underscore layer underscore combined and you have read the word view layer before so this was the name of our render layer so blender has the tendency to always add the name of the render layer to the layer inside of the multi-channel exr and if you now as a 3d artist rename your render layer which i do normally you will break maybe your nuke script on the other side so this is something i don't want so we need predictable names later also you see it doesn't take the name really serious because now we have an underscore in blender we had a space so also two different things here what you now can do is if you remove the contact layer sheet here we can go here and say okay i know now how blender things here i take now for example the composite here and then we see our beauty but yeah this makes a big problem in production you see that if like i've said someone now renames layers or you have more than one render layer then you have a whole bunch of maybe empty layers here the names are not fitting many many problems another thing we also outputted cryptomats here so if i now take the kryptomat node here for example you will also see yeah it takes it here it seems to work somehow let's test that really fast we go here to kryptomat object i go here to my picker and i pick here something you see there is something going on here let's go to rgba yeah and then say matt only yeah it seems to work but yeah this name is a problem in some versions i found that also the kryptomat layers are not found so really big problem also on this point what i want to show you now is a really easy way of working with that without hassle and to predict which layer you get inside of your nuke script so let's switch over to blender again and for doing that i use the compositing interface and a side note for that blender is meant as a full studio solution the normal way a blender user would work so i reference back to my blender for production compositing tutorials is that you can render directly from the render process here into the node based compositor here and inside of the node based compositor if you tick here use nodes you get a render layers node you can add them by yourself because here you can select now our render layer which we want to work on at the moment view layer that's the same like here so here's the name again and then we can start compositing here in this environment at the end you directly output everything which goes here to the composite node if you press render blender will render first delivers the data here here you have for example in a lower resolution that's reason why i lowered here my percentage you go to your composite tree test everything and if you later render in your final resolution the whole animation this tree runs directly and the file which is saved out through this composite node here is then the final file so that's the idea how blender works and it also goes a step farther if you go here to the post processing it sends then the file to the sequencer the video editor inside of blender and you can have it directly in your edit in studio production we normally want to bring the files then out because i want to do for example something inside of new confusion or whatever so we use now this compositing environment here for delivering the right passes out and what i do here to control this a little bit better i split here my window and show here our friend the image editor again you can see here if i open now the image list you see here is the render result which we had okay i made sure that backdrop here is gone because i don't like it behind my notary and another thing which you now can see is that we have here a second note which is a viewer the viewer is a helper for me you get it if you have activated the node wrangler in your add-ons and you can then ctrl shift-click here on a port and this viewer is now showing that and you can see the viewer output by showing here the output of the viewer node you see here's render result here's the viewer node and if you do that you now see i can analyze every output here so these are the data which i want to use now in nuke how to get now this out we have learned that if this tick is on here and also use notes on here that every pass here is now delivered to the compositor and normally it would output it here what i now want to do is i want to go into this tree and now grab the data which i want and i deliver that to a node which has the name file output which you see on the output and this node first seems not very useful you see you only have a path and one slot which is an image slot so if you connect that here you can save out for example your beauty here which is named image here yeah but this note can be pimped up let's do that here i select the node and i press the n button on my keyboard to open the end menu and normally it opens something like that go to item you see here now the properties of this node and here you can open the properties again and now you see that this node has much more properties than you think the first thing here is that you have a path again you see i address here with the double slash the path where the blend file is then i go into the render and now i go in here and say i want to rename this thing here and i say i want to name this multipass and i don't want to render an animation so i don't think about any pound signs for image sequences i directly do it like that then i select him multi-layer rgba float full and now you see that this input here is also in this list here and now comes the cool thing you can add as many inputs as you like here and now you see you have more things here and if you have as a file format the multi-pass exr you can save now everything which you plug in here these parts here are neutral first you see all of them are yellow but if i now take for example here a normal pass which is a vector information and i plug it in here you will see that now blender changes the data type here of this path to vector and the same for all others here so that's the first thing you have to understand here second thing is if you select now here one of these parts and you want now for example that the normal pass here which comes in here is named normal inside of your xr you can rename them here so you select it here and rename it normal and this now is exactly the name which is delivered into the exr and which you get then inside of your nuke script so image for the beauty is not the name i want so i named this rgba for example yeah and so i have my rgba here and that's it so if you want to resort something you have here these up and down arrows you can also select here something and click here this little tick so to remove it and you also see later that empty ports here will not delivered into the exam so what i do in my studio production is now that i have decided which kind of passes i want normally and how i want to deliver them to nuke so to have a standard naming convention for my nuke scripts and if i do it here before i render the whole stuff out i don't have problems later in composite that's suddenly a pass is gone or something like that so see this area here as a render preparation now comes the point do i really want to have this file output every time i do a scene no and here comes the next cool feature inside of blender in blender you can reuse all your stuff for this you have to understand that the blend file if you save it out so this blend project file is in reality like a database and i have prepared in my system i now leave that here for a moment a special file so if i go here into my production files i go here to my blender note group folder you see it's under my blender projects here is a whole bunch of files which i only use for referencing and here's one of them which is named compositor turn nodes this is a blend file i open that for you the only thing i'm interested here you see there are two cubes nothing here which is interesting for me the only thing which i am bothering is here compositor you see that i have here now two nodes and these two nodes are groups so named note groups i make a copy of one of them shift d and i bring it over here and if you have a group inside of that you can go into the group by pressing the tab key now i'm inside of the group and what you have now inside of this group is i have here a file output node and you see i've pre-configured it you see i have here a standard file name i configured it here to float full i have here a full list of all the passes which are generated inside of a blender rendering so everything but i renamed some of them so that i like them a little bit more so like i've said for me it's important that i have a standard naming convention and that's it so i built this node once you also can see you can add colors and so on but this node is inside of the node group so i go up here again with the tab key or with this up the reason why this here lives in a note group by the way if you want to know how a note group is made let's add a note here only to demonstrate that i have rgb this is rgb node and you now want to pack it into a node group you have to select all the things you want to have in your node group ctrl g now you are inside of a group yeah and now you can go out now it's green so you see that's the way i've packed it into a group the group later is not important so you don't need to bother about these inputs here but the reason why i packed them as a group is that i only can reference groups so make groups out of them and i have this standard exr we looked into that the only thing i have in here is this file node which is pre-configured for all my standard layers which cycles generates here and the other node which you find here is named cryptoexr i go into that and you see it's another file node which i use for cryptomat there's one little gotcha inside of the way cycles renders cryptomats normally you get per cryptomat so for example if you take object here you get four layers so you get a layer which is named for example crypto object and then you have the zeros the one and the two funnily enough if you directly save out your open xr from blender it only generates these three so many kryptomat plugins are a little bit confused that this first layer is missing what i've done here is i added this layer here also to the system you see it's all about naming yeah so i have asset asset 0 0 0 1 and 0 2. okay and these two groups we have here now we want to see what's happening so i saved that out here they are placed inside of the compositing so they are safe with that you can set here fake user if you like to make sure that they are never deleted but yeah let's go back to our tutorial what i now do is i need now these output nodes so what i do is i go here to file append and now i can show this file where these nodes are living so i go to blender note groups and where it is compositor notes and instead of loading the whole blend file look at that if you go to a pen to link you can click on a blend file and if you make now a double click you dive into the blend file here and here are all the saved elements of your blender scene and here is the section for the node trees and if you go here you see there are three node groups here one is the standard xr and one is the cryptomat and i want to have for example both of them so i select both of them say append and now where are they people expect that they are now here no you only added them to your blend file to now place them you go into your add menu or shift a or here at go to group and now you see we have these two groups in our memory i take now standard exr and this is the group we saw before and i'm not interested in the group because the naming doesn't fit so i select the group right mouse button click and say ungroup and now i only have my file output node and you see all my names are there same thing let's do the same thing for kryptomat here we go i go here and ungroup it and now i have these two outputs and now the job is that i make the right connections and now comes the nice point like i've said all these here are available slots which i can deliver to the exr but if you don't connect one of these slots they are not exported so you don't need to add everything you don't get black layers it's really only for convenience here and i have in my production also a script which helps me to connecting these but i promised you i don't script in this tutorial so what i do now here is i check here if the name is okay render underscore aov version one and for animation i have here the pound signs it's okay i think that's nice and now i start hooking this stuff up you see here normally we get also an alpha i have an additional alpha here sometimes for me it's useful to do that you don't need that so i don't connect this here but depth something here i use missed pass and so on and now i think through the magic of yeah retiming we can do that now a little bit faster so i hook everything up i don't need the index here ctrl right mouse button click to have this scissor if i now see that something here is missing what i can do is i can now go here into the settings to see i haven't got environment here so i add that here to my list so that i also can use that here really easy and that's it yeah for cryptomat you can do your own node here with more inputs in my case i really often have it as a second node here so i take the image here to rgba so to see something and now comes the thing with the four layers instead of three if you take a look here you see like i've said crypto00 so 102 but not the crypto object without the numbers and what i do in my practices i take here this image and take it as the first layer and it works fine so i hook this up here for all three and then i go through them and hook them also up okay i hope i have made this now correctly like i've said really often a script will do that for me but i want to demonstrate it by hand and what i now do is i go now here into my rendering process and i increase now back here my render sample so that's a little bit nicer okay i don't do the noising because i want to show you a little bit of that in a moment i make sure that because i have volumes here the light path yeah we have volumes here i think everything is fine now let's render and after the render is done this tick here is set these two nodes will now save our exrs see you in a moment we can see here the random result while it's produced okay let's switch over to our nuke get rid of that here and read in again so now you see here are our two exrs i load them both and now you see it's much nicer now we have a nice image here let's start with the aob's here i hooked it up and now you see directly inside your viewport and image why because now we have rgba here is the alpha and here are now the passes which we generated i have here also a extra uv so that i can use that here later and yeah that's the setup i do here you see now you don't have distracting view layer names or something like that if you have more than one view layer which you render you can now have a second render layer node here so it's here in the stack so input render layers and this you now select here which view layer you want to have here then you have the outputs and take one of these nodes again change the name here so that it's clear that you have another view layer so i would go here say standard exr unpack this thing and then you make the second exr for the second render layer and so on so you see this system works for me here really fine and if we now also want to check here the cryptomats you see i have a beauty pass here on top and here are now the cryptos and so we can now take a cryptomat node here and you see it looks good you see everything here here's acid here's material here's object and now we also can directly work from here to generate our masks here let's go back to blender to finish now this lesson one thing which is also sometimes really really useful by intention i lowered here my sampling a lot to have it faster here for this tutorial but sometimes we also have the problem that we want to manipulate a pass here let's do an example with that i take this node and hide it so that we collapse it and if we take now a look here into these layers let's take here the viewer node so that we can see what we are picking here with our viewer let's do something like the shadow here so i ctrl shift click here at the part of the shadow and now you see that's the shadow path and you see for example a big problem here you see okay the shadow pass is too noisy everything else is absolutely okay but the shadow pass will be a problem what you can do is you can also use now here the compositing environment like it is wanted to used instead of blender for example you say okay inside of the composite of blender we have the intel ai denoiser and i generated here in the view layers denoising data so for the ai denoiser and i can directly use now this denoising data here inside of the capacitor before i save it out here into the path so that's the big advantage now here so i take from the filters shift a for the nodes filters a denoiser node here it is the noise that's the intel denoiser he wants to have a little bit more information so that it can work nice so here's the denoising normal we haven't output it to nuke because we don't have it there then we go here to the albedo which is the denoising albedo and this image here is normally the plate which you want to denoise and in our case we don't want to denoise the beauty here because we want to do something else so we take here the shadow path which we want to denoise and plug it in here and if we now look with ctrl shift click here into the denoising result you now see this is the noise shadow pass let's select the note here and press m like mute you see before and m again here after now the shadow pass is nice and so now i go in here and say instead of using the original shadow pass which we had here i plug in here now the denoised version of that and that's the way i work normally also with other things so i can manipulate passes before they are saved out like i said if you have watched my other tutorial series about the compositor here you will see many nodes and how also this workflow with the low resolution works so this is all render preparation and preparation for compositing if you are then finished you are happy with your results you know exactly what's going out then i normally go in here say i want to do this with a hundred percent and then i also can save out directly here animation and this here will be generated but it's not important for me this name yeah it's only helping i'm only interested in these outputs here so i unhide this here again and that's it let's render again this still image not the animation this will now take a while so i go here back to the rental result you now see we have now the full resolution maybe you have no more samples and yeah now you have your render pipeline for the whole project i hope this ideas were useful for you like i've said we can have it a little bit more automated but i think that's good without any coding learn how to set up your output nodes here save them as node groups in separate files append them directly and use them as often as you like if you have more questions please ask you can reach me through the comments under this video or also per email if you like if you want to support this channel please give me a like if you want to have this file here only for playing purposes you find them free on gumroad i put the link in the description and also on my patreon i hope this was fun for you have a great time and have fun and blender you helga mouse
Info
Channel: pixeltrain - 3D & VFX Trainings
Views: 21,465
Rating: undefined out of 5
Keywords: Blender, B3d, VFX, Compositing, Nuke, Nukex, Foundry, EXR, MultilayerEXR, Cryptomatte, Animation, Compositor, Save EXR, Blender for Production, Helge Maus, pixeltrain, Blender Training
Id: nUxRwOUw85Q
Channel Id: undefined
Length: 36min 32sec (2192 seconds)
Published: Fri Mar 05 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.