Blender 3.0 Beginner Compositing Tutorial (Donut part 14)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
now donut is looking acceptable but it could be improved with some compositing so compositing is sometimes called post-processing it's called like effects it's essentially after you have finished rendering something what what is happening to that image whether you're adding glow or um extra elements in the background like layering things on top of each other it's it's something that is done frequently for movies um even like commercials it photoshop is a post-processing effect so blender has a built-in compositor that can help you do all these effects so you don't have to export it to something else in order to do it so the way you access it is by going to the compositing tab at the top there and the way you access high quality assets is by going to polygon.com high quality textures high quality models look firewood stone amazing and of course hdrs sign up at polygon.com or by clicking the link in the description and this will take you to a surprisingly um blank looking screen first of all i don't want this dope sheet at the bottom don't know why that's included in the composer i'm just going to drag it down and then i'm going to click on use nodes and this means that now basically your composite is going to look for nodes to create your final image but anyways now that i've done this you should see you get two two nodes render layers and composite and similarly to all the other nodes that we've already worked with it works whoops left to right you've got your render layer over here which is what will be rendered then all this area here will be all the effects and things you want to add and then it will create your final output your composite over here now we've got backdrop enabled which means we should see our image in the background and we would see it if we had a viewer node so if you ctrl shift click on any node it will add in and it'll add in a viewer node and it'll link it to the object that you've got selected now if you don't see anything in the background like i've got that means you haven't done a full render yet so you haven't hit f12 so we need to hit f12 in order to send that to the compositor so that we can actually see um what we're doing so it'll use the last image that is rendered um but if yeah if you just opened up blender like i've you know reopened the file or something like that then it won't have that stored so you'll have to re-render it so now i've done that you can see that i've got it in the background there now using it like this this is one way to work um but i find it also it gets a little complicated and complex you've got nodes on top of it it's also hard to zoom in and out of that image in the background you know you have to sort of do this and it's okay but i've actually preferred to uh recently switch to this workflow which is to split the view and then over here change this to the image editor and then change from render result to viewer node and then it will do the exact same thing so now my viewer node here if i disconnected that you can see it's hooked up it's now going to display what is rendered over here okay cool so we want to do the very first thing we want to do to this is uh adjust my background because it's very dark and spacey and mysterious-y i want to make it pink so um i need to extract or basically yeah figure out like what what is my what are the actual objects in my scene versus the uh the the background there and currently the black image is baked into the image it hasn't rendered it uh transparently so the way you do that is going to your render properties over here and then underneath film you want to check transparent okay now when you do that you won't have seen anything change because this is a render property meaning you have to re-render it in order to see the result okay so um yeah you can see now we've got a checkerboard pattern there which means we're rendering on uh transparent and by the way we will cover in the next part of this series how to improve your render time so that hopefully this it will render faster for you but for now we're just doing composite okie dokie that's good cool so we've now got it on transparent good stuff so now we could change that color to be anything we want and the way we do that is by adding in the color and then merging them together so to add in a color a single solid color i'm going to hit shift a same hotkeys everywhere else for add and then go input rgb so now uh to combine i mean let's just yeah let's make it sort of a roughly pinkish color and then i'm going to add uh to combine it with another one the one we're looking for is underneath surprisingly color very odd alpha over okay so i'm going to drop this in alpha over node uh take the output put this into the bottom okay so they're now combined to two images being combined together and you can see that we've just got a solid pink output and that is because it hasn't used the alpha information from our render yet to use that i'm going to take my alpha and put that into the factor input there now you can see it's using the alpha but it's doing it the wrong direction so we need to flip these inputs around and now we've done it correctly so now the color of my background is you know whatever i want it to be but i'm actually going to take the same hue so using this little eyedropper and take the same hue from my uh my doughnut maybe about there and then i could uh you know increase the brightness a little bit or decrease it or make it a little bit more saturated you know just play with the visuals you don't have to get it right first time you can come back to it it's a good thing about working with 3d and working non-destructively is you can just set it come back to it later once you've got more elements and things so that's cool so let's talk about the power of composing let's do something that you couldn't do with uh it would be difficult in any other way right so we could have as i mentioned we could have baked the pink uh color into the world information by setting it here and then changing it in the shader if we did that though the pink color would then be baked into the image we couldn't change it we couldn't add any effects or anything to the background if we wanted to but now that we've done it like this we've got an advantage we could add in for example we've got light that's coming in the you know top left down direction it'd be nice if it wasn't a solid pink color but had a kind of a gradient right so it was kind of lighter up here and kind of went down um and you could do that a number of ways but the way i'm going to do it is with a by first of all adding in a white color like a white circle up here and then blurring that circle and then applying it over the top so to add in a white circle it's underneath matte you've got a whole bunch of little matte options here for adding a box or you know things and you can use it in really complicated ways people that know what they're doing with compositing can do all sorts of crazy things with this uh list here the one we're looking for is ellipse mask which ellipse is just circular basically now if i control shift left click on this you can see that i'm now just looking at that ellipse so ctrl shift click on anything else and you can just isolate that so i'm now just looking at my my little circle there so um you got a whole bunch of options here you just play with it you can kind of figure out how it works the width is like how you know does it match the width of your height etc you can do some fun stuff here um what i'm going to do is just make this yeah let's go 0.5 0.5 so it's a complete circle and then whoops okay that's really fast move i'm going to hold down shift so that i'm moving it just with small movements and then i'll move this at the top here okay that's pretty good so it's at the top corner and now i want to blur that to make it become a gradient so i'm going to add in a filter blur okay drop this in here so that i'm still looking at it through my viewer node and then i'm going to change my gaussian to fast gaussian which i mean look to be honest i haven't tried out most of these fast gaussian is the one that i've just always used and it's fast um it does a pretty good job and uh you could set this to like pixel amount and that's all well and good but i find relative is better so that it doesn't change depending on the size of your render because if you use this if you were to like suddenly double the size of your render this value would not change with it so i don't like that so i check relative so that it's relative to the size of the dimensions you've got so whatever you set this to it's always going to be the same amount of blur roughly so um aspect correction let's just say y either one i never really know it doesn't really matter but now you can see the effect that i'm doing if i crank this to like higher and higher amounts i'm getting a gradient effect right or a yeah roughly gradient desk effect something like that all right that's pretty good um so you know how big do you want your blur maybe i don't want it that big all right now let's uh combine this with my alpha over with my the rest of my image over here so we used alpha over and alpha over is good when you're combining things with a hard alpha at least that's the way i sort of think of it in this case we want to add in just like a white effect so taking because this is a black and white image i just want to take the white values and apply it over the top of this and that's really easy to do now if i did it after this then it would be combined on top of the sprinkles and over our donut so i don't want that i want to put it in between here and here so i'll put this down here and then here i'm going to use not an alpha over but a mix node so just like we covered in the shader the mix node is very similar to just like adding in a new layer in photoshop you get this list of blend types here and then you've got your opacity slider here right so if i now take my blur and i put this into my bottom input and if i want to take just the white values what do i use i use add hahaha look at that so now with this now being combined so i've got my blur my yeah my gradient effect to combine with my pink and it's now going into the uh that the donut is now appearing over the top of it and now i can change the add value and this is now my opacity for that gradient effect so you go really subtle or not so subtle it's up to you i think i went for something subtle but yeah you can do some fun stuff you could make a gradient of like different colors if you wanted to you could do some uh some cool stuff it's kind of the joy of compositing is like you can kind of play around in real time without have to waiting without have to without having to wait all right trying to speak today it's an issue okay so another thing we could do with our compositor is add in some glow like some of these highlights here um they seem hot enough that in if it was a real photo you would kind of have like a bleed effect where like this area here would start to like bleed into this direction right and it would do the same from here and here so it kind of like wrap around everything when it's like really hot so there's a couple of ways you could do it in blender you could use a glare node kind of easy but i don't really like the glare node i'll show you why but the way i'm going to show you is we're going to blur parts of this and then apply the blur over the top and it should look like glare so first of all yeah let's just add in we've got a blur node so i'm just going to duplicate my blur node shift d okay and then take my output of my donut because that's the one i'm going to be applying the glare to and then let's shift ctrl shift left click on that and you can see what we've got um we've got something that's way too hot way too blurry so let's just dial this way way way back okay something like this okay now this is all right but we've got a whole bunch of color information here that i don't want i've got blue i've got all this other stuff i've even got shadows and there's no reason you would have glare in a shadowy area we only want it to show in the areas where it's reflecting so i want to find those reflective areas and only apply it to that so how could i do it well be very difficult to do but we're using 3d software computer software and it should know what that information is we just need to extract it so we can do that with passes render passes so you can enable this for a render by going to your layer properties view layer properties and you've got passes right here so passes render passes are a very common thing in 3d for productions you'll typically see crazy elaborate setups that's got all sorts of craziness and kryptomats and maps and all sorts it'll have a whole bunch of stuff going on some people's post-processing steps are huge they export all the passes they bring into photoshop and they tweak each one i like to do it all in 3d as much as i can but in this case it's a perfect example of something i want to do i want to extract my glare and i want to do it over here the way i would do this is underneath your passes down here you've got a whole bunch of passes for diffuse that is sort of like the natural color of your material like pink blue green that kind of stuff you've got glossy that is reflective light that's what we're going to use transmission that is through glass and things that are like semi transparent-ish volume that's for like smoke and fog and things like that and then you got an emission shadow blah blah blah so the one we're looking for is underneath glossy and you can see for mostly you get three direct indirect color direct is the actual direct light indirect is a bounced light and then color is just the color of the gloss which in this case should be completely white because it's not metal so there's no color to the gloss information um so we're not we don't need indirect and we don't need color we just need direct so when i check that little box you'll see something's happening on the left hand side we are getting an extra pass a little extra input there so if i control shift click on this a number of times i should eventually be able to see just from that through my viewer node which is all the way over there the glossy direct pass which is empty the reason for that is we have not rendered so once you add because we didn't add in this pass at the time we did the render it hasn't been generated yet so we need to do another render i actually think blender would do best if it actually let users know that that was the case one of those usability things but it should probably instead of it being blank show you know needs to render or something like that as a blend has made some huge changes recently to improve its usability but there's always more room for improvement in my opinion that's one of them anyways look at that we've now got a uh pretty cool looking render i mean some people i've seen like artists on art station or whatnot you know render a character or something you get this kind of like glossy sweaty looking face that's like purely black and it looks so cool you end up using it as your final render but anyways we've got the information we want now so now if i take that that glossy direct pass and put that into my blur node have a look now we've got what could be used as glare if we combine it over the top of this original image so we've already got an add node so if i just shift d to duplicate that and drop this in here so my alpha my my donut pass all my donut information is going here and then i take my blur and i put that in the bottom everything that goes in the bottom input that is what is going to be added on top so that's what is going to use this and be controlled by this slider here basically but yeah you can see with the effect we've got right so i mentioned that it should be bleeding over right so if i turn that up you can see it's bleeding over now it's pretty severe bleeding it's coming over uh it's a very big blur so i'm going to turn that back let's go let's try two two might be even too low i don't know let's try one all right there we go so that is a really small amount okay now one thing you note is that sometimes it just other parts some parts look great and then other parts don't and that can just be the fact that the lights that we've got for the rim light for example are way too hot so that's fine you can do things out of order you don't have to i don't actually like the fact having two rim lights i you don't have to do it in water right so i might now just go you know what these lights are too hot because it's now blowing out my glare so i'm going to play with that there's all sorts i mean like you know compositing nerds we'll just call them that people that are like full-time compositors they will do things like add a mask just around this one area so that we remove the rim light i don't want to get that advanced i'll keep it fairly logical something that other renderers do that i'm sort of jealous of is they do the post effects like glare bloom all that stuff it does it in the render like corona does that for example i actually re i really like that i wish that blender did that because you wouldn't have to mess around in the compositor and it would do glare and everything a lot better than the way uh the way we're doing it now but it's okay it's all right so i've got less coming through with the rim light it's all right i might just have to make this bigger let's go like what was it like three let's go three percent and then i'll turn this way down so that it's just a subtle amount so all right so this is what it looks like before is what it looks like after all right so we still it's a little too hot on the sides there it's a little bit too big but it's all right okay so it's it's a very subtle amount which is honestly it's probably the way to approach this you don't want to you know make it look too shiny like it's like i don't know you're looking at like a diamond donut or something um but yeah we've got something that looks looks okay all right so something else that we could do with our donut is um we could do some compo like some some color grading right because you can do color grading here your color management i mean this is a whole other topic of like when to do color grading what sort of color space you're working with transforms linear space you know scene referred it's all very complicated you could do it here with your you know use curves as i've mentioned before you can do it in the compositor so that's the way i'm going to do it here i'm going to add in um because we've got high contrast but i want it to be just a slightly smidge more contrasty but not as much as high contrast so we'll go we'll keep it high contrast and i'm going to add in a color balance node i'll drop this in at the end and let's connect this now by the way the viewer is only going to be just what's viewed over here if you actually want to save it into your final image it has to go into the composite node as well all right so this now gives us three wheels we've got a highlight wheel we've got a midtone wheel and we've got a dark tone wheel did i get did i do it in the wrong order i did okay wrong order this is the mid the dark tone reel this is for just like the really dark shadow areas will will be that one um this one is your mid tones okay so i could you know play with them it looks terrible if you go all the way to one extreme but you could play with the mid tones there and then you've got your highlights over here so you could change the colors for just the highlights now the correction format the the one that you should be using is offset power slope it just means that this middle one for whatever reason is inverted don't like it don't understand why that is i'm sure there is a reason but it is but it will handle the color a lot better it will preserve the details it'll do the transforms in the right manner so i have heard somebody more experienced than me has told me that so i'll trust them now if i add in if i make this basically if i want it to be pink i have to go into the green area if i wanted it to be blue i would put my thing over here so it's the opposite side it's just yeah it's a little annoying all right so this is my mid tones and i'm trying to make this side look a little bit pink pinkishy purpley and i also want it to be a little bit more exaggerated like a little darker in the mid tones so i'm going to increase this which will darken it slightly very weird way of working something else i'll probably do because i can just see the the lighting on this this underside here i'm not entirely happy with it so i'm going back to my render here and let's just move this over a little bit whoa i feel very disorientated let's move this over underneath it a little bit better let's have a look now all right that's good and i'll just increase the size of that just so that it wraps around this side of the donut a little bit better and you know what i'm going to give it a little bit of a pink hue and maybe i'll just remove the color from here so that's the thing it's like you know do you do it in the compositor or do you do it in your actual scene and everybody has a preference some people are used to certain workflows i like to do it all in scene as best you can because compositing is kind of like it's fakery and fakery only the illusion only stands up so well after a while it starts to break down a little bit so um yeah that's i mean look i i'm not gonna make this a color grading tutorial that's its own thing um this is just uh keeping it fairly basic something else you could do with the compositor um is you could add in where is it i'm almost like nervous to show this because it just gets so much hate lens distortion okay if we drop this in here you've got distort and you've got dispersion dispersion is your chromatic aberration if you're familiar with that term if i set this to a really high amount you'll see what it's doing okay it's doing that cheap camera effect like cheap lenses and you know if you take a photo of the trees with your smartphone for example you probably see it but you get kind of like a separation of the the cyan the red the greens depending on which side it's on but it's kind of it's it's doing that effect for you and look the thing is it looks cool um so people end up overusing it but it should be used at a tiny tiny amount like point zero zero five so that you would just barely see it on your sprinkles it doesn't really affect the middle of your screen that's how chromatic aberration works it's on the edge of the lens but it's a it's a subtle effect and you know it might even not be appropriate for something like a stylized doughnut uh but anyways the other thing it's got is distortion which if i you know let's set this to a little bit higher oh that's ridiculous okay .05 maybe you can see it's got it's like sort of bending the edges of the frame which wouldn't look good until you check fit fit and then it will expand it to fill and that is to emulate what all lenses have in the real world barrel distortion you will never get if you took a photo of a building um you would see that it's not a perfectly straight wall it would have a slight bow to it and you'll always get that you'll get it more extreme with like you know fisheye lenses and things like that but every lens will have it there's no way around it unless you use like a pinhole camera so distortion will do that it's not really not like necessary for something like a stylized donut but i wanted to show it anyway just use it for a tiny tiny amount so i'm using it at .005 and i'll say fit okay the other thing you can do is add in a tiny little bit of sharpening which is like a really easy way to just improve any image so filter filter i don't know all right i i assume that this filter node because it can do like lots of weird things it was probably one of the first nodes the compositor came with and it just ended up being called filter it's it's it's just sort of a mixed bag i never really use any of the ones in here except for sharpen it doesn't it's not look i'm not gonna try and sell it it's nowhere near as uh detailed as like the unsharpened filter in photoshop where you've got radius and threshold and everything it's just got an amount um which is crazy they should really really add something to improve it but it's just going to add some a little bit of quick sharpening to something you don't need much of it right so like that is too much it just looks like like it's like screaming out at you or something um with great power comes great responsibility all right don't go too hard on your sharpen amount yes it looks cool but people should not know that you have used a sharpened filter all right so this is what it looks without it and that is what it looks with it very very little change but it's just enough that it'll like put you above the riff raff who don't know about the sharpened filter i don't know all right so this is what we've done in the compositor working left to right we started with our image then we combined it with a background and the background is made up of a single color an ellipse mask that has been blurred and then combined over the top of the single color and combined with the donut then we blurred the highlights which we got by extracting the glossy direct pass then we combine that over the top with a 0.1 amount of opacity a small amount of glare then we did a slight color correction to just darken the mid-tones a little bit which i did just by raising the value because the midtone works the opposite when you're using ast asc cdl and then lens distortion a little bit of lens bow to it in fact that's even is it too much i don't know and then i sharpen on top and that's it so that is how we do it uh that's the compositor and as i mentioned you know people can do crazy things with the compositor so this was just a basics you know getting you familiar with what you can do for you know as a single artist just working on a project by yourself you don't want to have to export to photoshop and after effects and everything you just want to do it all in one software blender's got the features the compositor is outdated a lot of users do complain about it but it's you know fine for basic stuff i use it and um it's it's fine for basic stuff so just quickly because i have just remembered one final step that happens right after this right before this blur is that it's currently putting blur on everything all of the the specular highlights whereas with a real lens and a real effect you would only see it on the really hot areas so we want to basically drop a threshold so we're only seeing just these really bright areas and a few ways you could do that but an easy way is with a uh a basically an s curve when you call it um it's underneath rgb curves so if i drop this in here this is a really common node um to do like just simple adjustments to you know brightness and contrast and things so i'll drop this in here let's just quickly visualize this if i drag this down that is going to be uh just like increasing the contrast essentially so i'm now seeing less and less of the areas that i don't want and i'm seeing yeah it's basically gotten rid of all these like little mid-tones and things and it's just left the like the hard specular highlights to really um to really pop out and then i will uh let's just increase the brightness of that as well so that we've got a little bit more coming up on the uh on the donut so this is yeah it's the it's the rgb curve it's the s curve if you don't know about it you should learn about it it's uh this is the contrast end and then this is the highlight end and then this is the mid tone end essentially so this is you use the s it's called the s curve because it becomes an s it's very common contrast highlights or is it dark tones highlights anyways that's how i sort of imagine it anyway now if we have a look at this well let's i guess have a look through the blur with the add node we should see that it'll appear in less areas which means i should be able to increase the amount of it and it should look a little bit nicer so let's try 0.3 yeah that looks a little bit better so this is with it turned off with absolutely nothing so you can see it looks a little bit just a little bit boring and then when you've got it in there with a 0.3 0.3 might be a little bit too much it does look a little odd at the end there maybe a 0.24 but yeah just adds a little little pop a little something there to uh to show you how it works so that's going to do it for our compositing effects uh go ahead and join me in the next part we are going to be learning render settings to improve your render before that improve your render times before you do that final animation and render your 300 frames so we can get those render times down so go ahead click here and i will see you in that video
Info
Channel: Blender Guru
Views: 39,043
Rating: undefined out of 5
Keywords: blender, tutorial, andrew price, blender guru, blender tutorial, compositor, compositing, glare, color grading, specular glare, chromatic aberration, lens distortion, change background color
Id: wlmq6EXzzzw
Channel Id: undefined
Length: 29min 9sec (1749 seconds)
Published: Tue Dec 14 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.