Quick toon shader effects, NPR - Blender tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
all right so on the main Channel I am already working on a video about tune shaders and things like that but uh just to go a little more in depth than making this one also so just make sure that you have a light in your scene I'm using 4.0 which means that screencast Keys is broken so you're just gonna have to try to follow along without that unfortunately and as always make sure that you're using node Wrangler because I you know I will be using that and pretty much everybody who is working in the Shader node editor is going to be using that all right so I'm just going to get rid of that camera for now and go to the shading tab right here I'll add in a Suzanne control 2 to add a subdivision surface modifier right here and I'll right click and shade smooth let's go to render view now over here and I'm just gonna set the world Shader right here to be a little lower maybe like point three something like that and the light that you use doesn't really matter to too much as long as you can actually see it influencing it right here I'm also going to make the background transparent just because I enjoy that more alright so uh let's add a new uh Shader right there a new material and uh don't worry about it looking different in in 4.0 um it's basically the same old principled Shader that you know all the options are just you know under these little drop downs now so don't worry about that basically the whole idea or the whole like workflow with tune shaders for the most part is gonna be using the Shader to RGB node right here and this only works in Eevee so make sure that you're using EV this doesn't work with cycles and then after this you can do anything you want to basically manipulate this color right here so commonly what you'll see is people use a color ramp like this and then you can just do whatever you want with these values you can turn it constant and it will immediately look kind of cell shaded where it's like solid colors like that you just have to move these around to get different results another thing you might have noticed is that it's a little it's supposed to be solid but we do still have some gradation right there there are a few things that you can do to try to fix that so and they're all gonna mostly have to do with your light so my light right now is an area light and if I go to the settings right here and just make the size zero it's gonna be a little better but another thing you can do is just turn off Shadow right here and it's not going to have as realistic like uh Shadows like like overhangs that would be casting Shadows like right here should be making the eye completely dark it's not going to do that when this is off but it will when it's on but when it's off it looks much cleaner so a lot of people like to do that I'm actually going to leave it on and I'm just going to change to a sun let's maybe make the strength five and I'll turn the angle all the way down the angle is is like the size of the light basically so if I turn it up a lot higher it's going to get softer like that so I'll just set it to zero and I'll pull it to the front a little just so we have a little more casting on the face but yeah so most of the tune shading things that you'll see in other videos are going to be using this method right here and you can change these to whatever colors you want so make it this a darker color and then we can push this way over here and maybe make another one in the middle that's a little lighter like this you turn the saturation down a little bit so now we have three colors right there it does in my opinion it looks pretty cool also even when you're not using constant just when you're like crunching the values a little more so you can you can get it pretty close and it's just like a little softer like that I still think that looks cool so yeah let's instead of using the color ramp you can also use a few other nodes so if you're just going for that hard cell shaded look you can use a math node and set that to greater than and that will basically be like the color ramp set to constant with only a black and white with you know two colors like that so you can do that also you could even use a few of these and add them together so the way that you would do that I haven't actually experimented with this but it should be pretty easy if you just get a mix color right here and just keep using these for the fact so if we have two of these you want to make sure that they're both using the um color like that into the value and I'll set this one to be a little higher so let's get two of these they're both going to be controlling the factor and then this one will be plugged into the second slot of the first one like that so now we can have three colors we'll make this one dark like that and I'll make this last one white this one would be like whatever middle color we want basically so we can do another thing let's make it blue this time just uh for some variety and then this one will do like dark blue like that so this is a way to make like basically uh if you were to turn this into a group you would be able to control all the colors from the outside whereas with the color ramp you don't have any inputs for the colors so you know we could group this up by selecting it all hitting Ctrl G and then you could you know take the group input use this for all the colors you know if you want probably makes sense to to name these instead of aab you could name them by pressing n or opening up this thing over here under group you could just change this to like color one two and three or whatever if you're planning on reusing it probably you know spend time making it a little cleaner and then we have uh these two thresholds so then from the outside you have three colors and you can change them all in here make it look them nicer like that there is a another way of doing this that gives you a little more control over like like if you don't want to be hard edged like that but you want it to be more like this you could instead use a map range and uh mostly you would just be using the from Min and the from Max so normally what I would do is just um crunch these numbers together this is basically gonna work just like the color ramp where these uh values are going to be like the position values right here that you're seeing so you know this one if we have it set to zero and one that would be like like this but if we set this to like 0.4 and 0.6 like that that would be the same as 0.4 oh that's 1.6 and this one would be 0.4 it's going to work the same exact way let's let's actually test it out because I'm curious so this should look exactly the same like that but you have the added benefit of being able to you know control all of these uh from a group just like this so just so that we can have one that's that's like hard Edge I'll do a hard Supply shade like that actually style shading is supposed to have one L I believe you could do the same thing where you have two like this except you can control how hard or soft they are basically what you want to do is just make sure that this first one right here you're just going to be looking at the from Max you want that to be the same as the from minimum for the next one so the way that I like to do this you could either use three value nodes like this it would be like the low the medium and the high so you would do this into the from minimum this into the from Maximum and then the next one they're gonna share this value like that and this is how you would control it and then you could do the same sort of setup with the mix color right here so this is going to be controlling the factor of this one this is going to be controlling the factor of the second one and then just like before we're just going to plug it into the second one right here if you wanted more you would basically just do the same thing like that just plug it into the second one and then you would have four colors but I'm not going to do that I think it's a little like this is fine we can we can just do this one I'll make this one green so that one I'll just copy paste this into each make this lighter and a little more desaturated and then this one completely like that so this one you have a little less control over like how close you want all the values so usually instead of setting it up with three values like this I'll use add I'll use add nodes so that's a math node just set to add like this so you can have basically you could add this in like that that would control the second one and this is for the second uh for the from minimum value also and then this you're adding it again so you would do it like this so everything is basically um relative to the first one and if you want you could even use the same value for both of these so uh let's just set this to point one just so it's quite a bit closer like that and then uh when we push this you can see all the colors are pretty close and we can kind of control the sharpness of it like how big the fall off is with this value right here so if we make it bigger you know it's going to get softer and if we make it smaller like point zero one then it's gonna look you know quite a bit uh sharper I think this would probably be better if we just set both of them like this so then we can have different values and we can actually see you know the middle value a little more like that set this to 0.01 so maybe the middle value is is soft like that you can come up some with you can come up with some pretty interesting results this way let's save this one and move on to a different one I can play around with with a half tone and Screen tone and stuff like that so this one I'll just call cell shading I'll just uh clear this out make a new one and I'll do the same thing where I bring a Shader to RGB everything is basically going to use that and we'll bring a math node set to greater than and this one I'll just do I'll do screen tone so it's going to be like little dots basically showing like the gradation instead of it being a hard line like this so for that you're going to want to use the voronoi texture that's going to be the easiest one to use and we can preview this with Ctrl shift left click like that and this is going to give us a bunch of little circles basically and if we turn it up you can see it's a little better looking and we can turn the randomness all the way down like that so it's more of like a grid of points if you want it to be more like kind of random stipply looking or a little messy then you can turn the randomness up and that would look good also so one of the challenges with creating a good screen tone Shader is um Can is figuring out which coordinates to use because right now you can see it's kind of stretched it's going to look kind of different well if we plug the distance in right here to the threshold and look at this we're kind of getting the effect but it it doesn't look very similar to how you would see in like a a normal like real comic book uh like screen tone or halftone effect so first of all one of the problems is the white uh circles normally it would be black circles obviously if you just like the look of this you can leave it that way but I'm going to bring in a mix node right here and plug this into the factor and basically instead of zero to one we want this to be one and zero and that's just going to flip the values around next I'm going to set this to a 2d because we're going to be treating it kind of like a 2d texture if we look at it from the top you can see it's already looking a little better but the coordinates that we're using I think by default these are the generated coordinates if you drag this out search for coordinate right here the generated one is the one that it uses by default so I would recommend using either camera window or there's a third one that's in a different node that we can use I think it's just called camera view or something like that but basically one of the main differences between well let's just talk about camera first and then I'll talk about window camera is going to kind of make it so so that it looks 2D from wherever you're looking as you can see it's kind of changing as I'm rotating it but if you focus on a single dot it's kind of staying in the same spot even when you move around like this but one difference is when you zoom in it actually gets bigger like that window is a little different because it's completely flat and when you zoom in it will not get bigger like no matter how far you zoom in the the texture is going to stay the same size but you can see it's kind of stretched out also that's because it's looking at the shape of the window right here and if we like push it you can see it stretches even more so I don't really like using window you could make it look good in renders basically by figuring out like the the ratio that you're rendering in so this is 16 by nine but you don't really need to know the actual ratio as long as you know the like the width and all that you could just I believe you could just uh multiply it so let's say you take a get a vector math node set to multiply let's set this to hold on and if you look through the camera this is what you're gonna see when you render so this is what you want to be like working working with basically let's see so you'd want this one to be a smaller number so you could do you could do 10 divided by 1920 and then they should be circles like that and not squashed anymore but there's actually a better instead of using this one and having to do the math you can look for the camera data node right here and use the view Vector so this is going to give us the flatness it's going to give us the flatness of the window where when you zoom in it's the you know the texture is not going to change size but it's going to always be well it's not going to stretch and distort based on the shape of the window so it's kind of like camera mixed with window I think in a lot of cases camera actually looks a little better like if we instead of using the voranoi texture if we use the wave texture right here this is gonna give us lines instead so let's just plug this up into here turn it up a little more okay so to get different values you can also just tweak these values right here but as you can see with the camera data no The View Vector you can't really tell like you can't judge depth at all which is kind of that that's like normal that's what you would actually see in like 2D screen tone for the most part but if we use the camera one from the texture coordinate you can actually see it so if you want it to if you want it to conform a little more to your object then you might want to use camera even though it's not as accurate as like like close to the 2D effect I think in a lot of cases it looks a little better so we'll just be using that one moving forward just the camera camera coordinate right here but yeah the whole idea behind the screen tone or you know the half tone or the the lines like that is just doing this right here and then dialing in the values that you want like that you can also rotate it if you want like if you want to not be straight up and down but maybe 45 degrees you can either use a vector rotate or a mapping node and just plug it in in here and you would want this to be adjusting the Z rotation and this already is adjusting the Z rotation like that or you can set this to Euler and do it on whatever axis you want right there so I think this looks pretty good let's see we can also use this to kind of just to adjust existing colors so basically you would instead of using this directly in right there you would be using this to control like a mix Shader node or not a mixed Shader but a mix RGB so we can get a mixed color in there and we can put this in the factor right there so it's basically just going to be well I guess you could set this up a few different ways but one way is instead of the factor putting this in the uh the second slot and maybe changing this to multiply so then it's always going to make it's always going to be darker wait a sec what's going on oh you know I forgot I gotta plug this in and now it should work okay so this is basically just going to be on top of you know whatever color you have going on there so you could just make this whole thing like blue or whatever like that or you could you know mix with the cell shaded look that I did before with like a color ramp like this and then you can uh you know crunch the values and use use whatever colors you want also so we could make this one a little lighter like that and then you know the factor is just going to control like how dark like that so if you just want it completely black then this is what you're looking for and this should work the same with the wave texture right here let's just reset this so one is on the bottom it's not going to make much of a difference but but you don't need to invert that one and this one is probably pretty cool looking when it's diagonal Also let's make this make this bigger though and let's mess with these values a little that okay so you can get you know some cool effects like this there are other ways also of treating this like if you don't want it to be if you don't want these lines to actually taper off and change size but you want them to be kind of like how do I say this well I'll just show you a different way name the screen tone one and I'll duplicate it so this one's screen tone too so this one is going to be they're all going to be like consistent width but in like different steps kind of like when you're using um a color ramp set to constant so let's just uh delete these for now and we'll start off with this one so so basically you want something to uh snap to values before it goes into the the grader then so if you want you could use this let's see yeah and so all of these are going to be the con like a consistent width like that you can see just kind of stops right there and this is going to let's see where would it be well this is just going to be zero and one so you would actually want this in here before you do this and now this this would be able to um like control where those are being placed but this is only going to give you you know two dot sizes so if you want more than that then that's when you would bring in a color ramp or something like that so let's just use a color ramp plug this into the threshold and set this to constant and basically you would just be using not this one my bad instead of the greater than that's what you want to do so we could uh bring in a mix right there but you don't really need this I guess because you can you can change the values in here also sorry I'm kind of all over the place okay so you would basically just add however many steps as you want in here and he would also want to flip this just so that we're dealing with a black black dots again okay so you can change the dot sizes and they're not going to have like Smooth transitions in the same way as with the other one you can see it kind of like has a hard Edge right there and again this is going to look a little better if we turn Shadow off it's going to be a little more clear the edges so yeah you can experiment with this experiment with this if that's actually what you want and this sorry this will also work just fine for the wave texture we can plug this up here also and just so you can see everything that I have in here here's what it looks like all right so this is going to work the same way as well let's see another way you can do kind of stepped let's do a cell shading and I'll duplicate this one so shading too so another way that you can do that let's I think I deleted the output material output okay another way you can do this is just with a map range and I already showed this but this one's a little different you can set this to um stepped linear and that will immediately give you multiple steps but you don't really have control or as much control as over their spacing you can't control how far apart or how big each band is you can only control like the steps right here and you can control I think basically all of them are going to be evenly spaced apart so it's a little hard harder to control them individually but it does look pretty cool right out of the box you can also change this to vector and that will basically take any colors in here and split those up into RG and B like this you can see we're getting a cool result it's basically just going to be changing the color of the model right here typically I think it works best when this is just set to white like we have it because if you have it too dark then everything's just gonna turn black so I think having it set to White works pretty well but just so that I can show you we can set this maybe to a noise texture and plug the color in here so this is what it's going to look like once it actually loads it's just going to be colorful like that but then we put it through here and it's going to split it up into multiple multiple bands like that and you know the more steps we give it the more accurate it's going to get the colors but if we have it pretty low then it will be mostly RGB right there which I think looks pretty cool if you're into that sort of thing if you want this is just like an alternate way of doing it you could use a vector math node let's see Vector math node that's a snap and that's not science snap and that's going to be doing um the same thing as the map range except you don't have the from minimum and stuff you only have the steps so the way this works is instead of saying how many steps you're saying like how many increments you want so if you wanted two steps that would be one divided by two or point five yeah so you want four you would do 0.25 like that and it should be the same result but without any of the other control which you don't have a whole lot of control over that anyway so maybe that's better for you let's see what else we have I guess another cool thing that you can do is um just like a fake outline it's not a solid width outline like you would get for uh from freestyle a freestyle in here or if you do the inverted hole method or if you use the what is it if you do the grease pencil line art but I'm going to show that in the main Channel video when I make it I'm not going to go into all that for this one so but anyway for the outline this one is is pretty simple it's again a Shader to RGB you can use math nodes that's a greater than and a for an L node you can use fresnel or you can use layer weight I'm going to use layer weight you actually don't really need the Shader to RGB in here but you will if you actually want to add it to one of your like you know the cell shaded things or any of the other effects that I have shown you can kind of add the outline just on top of it so for that you will need the shaders RGB but for this you can just plug a fresnel into a greater than and you're just going to get this this effect right here to invert this instead of the greater than you can use a less than if you want and it's just going to give you this black outline like that and it is going to change depending on the shape of your object so like I said it's not even width all the way around but um it's still a pretty cool effect facing should work just as well it's a little different but maybe uh maybe it's a little more consistent for your model so you might want to just play around with that both of these are basically just paying attention to like the viewing angle but yeah then you could add this on top just like I was showing before so let's let's do that really quick okay so we have the color ramp set up right here and and you can do this a few ways you could multiply it you could mix it I'm just going to use a mixed color just because I think that's probably the easiest to understand you just want to put this into the first the outline into the second and then you can multiply it like that to get the dark outline or if you want you can put this in the factor and then the outline is just going to be whatever the second color is if you have this that's a mix that is so a few different ways of doing it oh sorry this would actually be in the second one because I forgot we were using a less than for this but yeah this would be the first color now in this case so you could set this to whatever color you want okay so we got the outline the next is kind of like a watercolor or something like that just like painterly normals that's the idea just call this I'll call it painterly normals okay so the whole idea behind this is we're going to be changing the normal right here which is what's used to figure out like the like the shading and the lighting so if you set this to shade shade flat this is this is showing the actual like normals of the faces right here if you change this to shade smooth it's basically blending all of those flat values together so uh what we can do is take well we have a few options for the normal that we actually use but you can take the texture coordinate you can use the normal from here or you can use a geometry node and you can use the normal from here and it'll make more sense um the difference between these when I actually show you the other method we're going to use a voronoi texture and you just want to plug this into the vector and then instead of using the color you want to plug the position into the normal right here so immediately you can kind of tell what's going on let's actually actually turn the metallic up a little bit and maybe let's turn the roughness down when you have some Reflections it's a little easier to tell like what's going on it's basically making instead of it being smooth it's making it so like it's gonna make it so it looks like it's a shaded flat kind of except it's gonna be the same as this voronoi pattern right here which I think is pretty cool and uh yeah so the voronoi when you use it like this the position it's basically just pixelating the texture so if instead we're using a window so it's completely flat right here window looks like this by default it's just going to show you the same like it looks like a UV map basically but if we use a position and turn the randomness down it's basically just pixelating it and you would just change the pixel size with the scale right here but then when we randomize it it looks a little different so that's why we're getting this effect right here we're just pixelating the normals basically and then you can do whatever you want with this the main difference between the texture coordinate and the geometry geometry coordinate is that when you rotate this one you can see um you know the the texture is staying put it's not really it's not really moving but if you use the normal from the geometry it will uh change as you move it like that so it just kind of depends on on what you actually want but I think usually the texture coordinate one is the one that people are going to want to use you can also distort this a little bit so if you want it to not be as like flat but actually look more like paint swatches you can use a noise texture right here and there are a few ways of distorting with noise some people like to use a mix mix RGB set to linear light I believe it works the same way but I'm used to using geometry nodes so I always do it this way I'm going to use the object coordinate for them we're going to use a Vector math nodes set to subtract subtract 0.5 basically is taking all of these values from the color that go from zero to one and it's making them go from making them go from negative 0.5 to positive 0.5 so that the midpoint of all the values is zero and that just makes it so that when we distort it it's not pushing everything only in One Direction and then we can set this to multiply or scale and now we just want to add it to this not that we want to add it to this Vector right here like that and this will start to break it up and make it a little more random looking you can control the strength with strength with this uh scale right here so let's just set it to something really low and then let's maybe make the scale a little lower the detail a little higher maybe like five you want to get really um grungy you can turn the roughness up a little and like this turn it down I don't want it to splotchy but anyway you can get effects kind of like this so it looks a little more painterly now obviously if it's just very reflective it doesn't really look like paint exactly so you can use this in combination with all the methods that I was showing before okay so I think if you just want it to look kind of like watercolor or something like that like paint um then you can just use Shader to RGB with the color ramp but I think when you when you use the color ramp I think it looks a little better when it's not set to constant and when you're just kind of crunching these a little closer or instead of using linear you can use B spline and basically it's not going to be completely black where you put this stop right here it's gonna go a little past it so you can still crunch the values closer but it's a lot smoother looking so you can get results like this let's just set this to be something like that I think that looks pretty cool let's make another one at the end make it a little orange this one we'll do completely White okay so you can get some uh some cool results like this they are gonna have a hard Edge so if you want them to not have a hard Edge you can change the voranoi right here instead of F1 change it to smooth F1 and then you have the smoothness meter right here like that so I think just a little bit like maybe halfway looks pretty good and it will still interact with the light so let's just take a look at this move it around you can see that it will interact with the light which is pretty cool I think that's it if you want this file you can get it up on patreon that's where I put it this will probably come out after the main Channel video about the same topic but if you sign up for patreon then you'll get it earlier so so yeah do that I guess I don't know have a good one that's it bye
Info
Channel: Joey C-quel
Views: 57,655
Rating: undefined out of 5
Keywords:
Id: faz3oSuDivE
Channel Id: undefined
Length: 31min 22sec (1882 seconds)
Published: Mon Oct 30 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.