 There we go. Okay, sorry for the delay. I'm not used to this in 1080p. It's a little small. All right, welcome everybody. I'm I came up with a technique for lighting tunes and first of first the tune shader only does two things basically it creates a Bright area and a dark area and that's about it So it doesn't seem to be too hard to light it But actually I came across quite a few problems But they only kind of unravel themselves if you try to do a little more complex stuff So let's have a look at what we'll be talking about the scene setup, which is Well kiss keep it simple and you'll be fine the tune shader settings. They are very just very briefly I mean it only has two sliders. So not many settings Toon lighting, that's the hard part some I'll just mention the freestyle and then the let's call it the trick I came up with to solve the lighting issue So this is Vincent. You can download it at the Blender cloud if you're a subscriber. It was designed by Andy Goralczyk and This is the shading that it has right now is basically the Despicable me it's very similar to that So ever since 3d came out a lot more different shading models for cartoons actually developed and if you remember back in the days the Mickey Mouse and Donald Duck and I didn't want to show any of those pictures because I Don't have any copyrighted images of let's say the Simpsons, but I guess you can imagine It's just outlines like freestyle and then shadeless areas. So This is where we are at today with Pixar Disney and so on and let's compare that to the glass half movie the glass half movie we have basically a very similar thing to This style this was what I want to be presenting. We don't have The flat surfaces like we have in the Simpsons. We have subtle gradients here But I want to focus on these areas You can see this is darker than the top part of the arm because it's at the downside and at the downside We usually assume shadow because light is usually coming from above unless you're the devil So this would be the start I'm not gonna show how to do that because this is just a mission shader is nothing else and Then I put some freestyle over it which makes it pretty decent already. This would be the Simpsons style only Only use Flat shaded no not flat shaded, but single colored surfaces no gradients and then this would be the final result after the compositing so The initial shade problems The tune shader does not look cartoony and the even lighting for that. I'm going to jump over to blender and Let's have a look at this. This is a sphere with a tune shader it kind of looks okay, but Not really too nice. It's I I don't know if there's a word for that, but the problem with this is It's interacting with its environment and usually tunes do not you don't have bounce light in the Simpsons You don't have Reflections in reflections in the Simpsons what we need is only one light source and then That's it for the lighting of the object right now. You can see there's a bound slide coming from the floor and Illuminating this area creating a very subtle Effect that I don't want actually I don't have the script in here. It doesn't matter the solution to that is To turn off bounce lighting, but sometimes we do actually want it So I usually what I usually do is go to the cycles Sorry, this is very very Big because I needed to change the resolution All we need to do is turn off the diffuse and the glossy and you can also turn those off for These Elements you can probably also set the bounce to zero, but then we Sometimes you do want the shadows or something like okay. This looks a lot more Cartooning that would be a sphere in a let's call it semi-lit cartoon by semi-lit I mean Sometimes in the Simpsons if they want to express something with lighting like a dark environment or like a threat or something They will use this type of shading one bright and one on one sir and one Dark area of the model and that would be The very simple lighting which is the effect that I want to go for okay We can ignore that for now Let's have a look at what the shader does by itself it's It has two colors One is the color that you see in the dark area and one is the one in the bright area and the one in the dark area is Effected only by the background brighter the background the brighter this color gets So If I let's open this up if I have a look at the lamp I Can increase the lamp strength? And you can see this area gets brighter, but this one is not affected at all So this is these are the two components basically that Outside of the shader that influence the tune objects the lamp Which has a size? You make it softer I usually use the size because because the smoothness of the tune shader bears some pitfalls and The brightness of the light as I said it only controls this area and this area is controlled by the background We can influence the size of this. This is a very important slider But the smoothness as I said I like this to be controlled by the lamps and there's the reason If these two values added are more than one are greater than one then this happens So I usually use leave the smoothness alone and Use the lamps to control the smoothness Okay, let's just do exactly that So lighting is fear is surprisingly easy But let's have a look at a monkey So actually same thing there should still be Turned off but this isn't okay, so let's start like that Now we only have the two areas that I was talking about there is Going to lower the Size Let's keep it like this. This should be good for demonstration. Okay, so now I have the tune Where there is a dark area over here, which I don't really want This would be for a tune situation. That would be pretty extreme lighting this part I can live with or even want but this part. I don't want illuminate I don't want to be in the shadows, so I'm going to duplicate the light and move it over here so now this is Lit, but now it's not lit evenly anymore Which is basically my main point. I want this to be evenly lit I only want two colors the darker one the brighter one what we have here now is We have very bright spots here. We have the same dark spots here and we have Something in between I'm going to move this further away to enhance to increase the effect Just so we can see it better All right, so now we have all sorts of gradients if I put this if I took down the lamp size It would be even worse, so I'm not going to do that if I if I made hard gradients here You can imagine that would not be good so So that's One of those initial problems. I was talking about it. There's tune shader does not look cartoony That's you can just turn off the gray visibility or turn on the bounces and the even lighting the even lighting problems still remains Now we have this weird line over there, so I could duplicate this light and Try to move it over in order to Get rid of that doesn't seem to be that easy So let's have a look at What we can do We can use the tune rendering as a mask and by that I mean I Want two colors only and right now I get the problem with all the gradients if I render this out let's let's delete this and Start over input render layers That's all we need at the moment. So No camera, I guess Okay, that was weird. Oh, it doesn't Oops Doesn't render if I don't have the output. I did not know that. Okay. I thought I could just use a viewer. Okay, never mind then We're just going to very sensitive let's just leave it at that and actually I Don't want a gradient on this thing Emission but I'll just hide it for Well, yeah, that wouldn't hide it for under let's move it to another layer 12 okay composition output is not connected. It doesn't matter the My mouse unfortunately is moving if I let it go for the shortcuts moves away and the backdrop Okay, this is a bit noisy. Sorry, let me change that yeah, the switching to the HD resolution really makes it hard to handle this So let's switch this to a hundred samples. That should be enough. That should look good enough All right the idea behind this is If I add up lights at some point it will get white So if I add up enough lights will only have white and the darker color. It doesn't matter what the darker color is at all but if I If I try to use the lights without the compositor if I try to use the colors of the tune shader We will get these weird gradients, but we can cut off the gradients by using constant if there was less noise this would be Let's just not use constant use ease linear instead and Move these closer together Okay, so what we have now is a mask We should probably make the background We are transparent so we can add it later. We can composite it over anything Okay, so what we can do now is use this shader use this Value as a mask so I'm going to combine it with a factor and then I'm going to choose my Background color here and my foreground color Yeah, let's just make this darker and let's actually do render this on So many cables let's do render this on transparent and Let's just use another mix node with a Totally different color. So that would be my tune object and actually This was Good thing is you can you can of course refine the way the mask however you want so That would be roughly my technique I will I will Show this in a more Less noisy and better prepared fashion But you can see if I were to add more lamps. I would not get more gradients I can cut off the gradients wherever I want them So if I move this over My dark area shrinks so if we use A big enough softness or a big enough size for the lights We can actually make the gradient very smooth and this way we can tweak it in in in the compositor In a way that we can set how Large the dark areas are going to be here. The gradient is not very wide so I can I Can not control that much but Yeah, let's let's head over to Vincent because there is there's more More prepared Vince or Vincent toon would be even better. That was Vincent toon exactly Okay So many windows Here you see the mask. I Actually distributed a lot of lights Sunlights are my favorite in this part because they allow very even lighting But they would cast a shadow on the arm part and So I just added lamps wherever I needed them and since you since we're overexposing the white part It doesn't matter how many lamps you add as soon as long as the Still rendering noise post post post processing I guess As long as we Managed to Over expose the play the parts that we that are white and Not light the parts that are supposed to be black at all We can do whatever we want if I move this lamp away. You can see that there's a That's not even it's not even strong enough. I Could probably leave this lamp out. It's probably there for a different pose You can see there's a it's developing there, but then it gets cancelled out by the very very bright sun Which is great for me because I'm not that great with lighting, but overexposing I can do that's fine So actually I think the lamp Was for the face. I don't know anyways. This is what my Vincent looks like in the end it's just white and dark and If I render this I already did And I get the composition that looks like that in case you're wondering how I did the lines. That's called freestyle All you need to do is go to the render settings find the option. That's called freestyle Oh, it's it's post processing. No There it is. Yeah, huge menu Okay, actually, isn't there isn't there in a dpi settings here somewhere? Yeah, exactly. So native And let's get this back to 72 Okay, that looks better. Okay, so So I should go higher right let's do this as a compromise Okay, so all you need to do is tick that tick that and then You can see more here, but those are just experiments just tick it and it will almost look like that so that's fairly simple What I do for the freestyle is actually composite it over at the end. I'm going kind of going backwards here But yeah, I just render it as a white material and then I do the freestyle On it and then I multiply it over my original image because this way I have full control over how What color it's supposed to be and how thick it's going to be and how prominent and so on so I I usually do the freestyle on a separate layer With a shadeless white material because that renders very fast and then I can use the multiply node to to Determine the strength or just do it to overlay it. Okay, so that would be the result before that Would be the colored layer. This is from a different scene I just have a I just have another scene where there's a copy of Vincent with just the shadeless material and here is an override material, which is the tune shader plug this into a color ramp and Use the mix node here In order to I can see those are actually not important So I use the color correction to make the Make the lower socket brighter and by doing so I'm feeding the Lower socket is the bright part here because wherever this is white to the lower socket gets used wherever this is black The upper socket gets used So I can also make the this Harder the the edge and as you can see here are some let's call them mistakes This shouldn't be this should not be in the shadow. This should be a lit So I can just crush the whites and That will fix that so you have actually you have a lot of control over this Imposed even and it also renders fairly fast that it might actually render faster and blender internal I haven't checked that because I'm cycles hooked on cycles now. So I didn't even give that a go So, let's have a look at the final again so Toon compositing as I'd call it now using the toon shader only as a mask and add the colors later and then composite the And the freestyle on top of it. You can go nuts with a freestyle by the way. I found so many options testing this. Wow Okay, so that would be that would be the basics of How I would approach to lighting Because as I said overexposure in this thing stuff is really easy Lighting it correctly is hard enough, but lighting a toon shader that is that is so sensitive that it only has basically two options To me that was next to impossible. Maybe there's a different method But I'm actually quite happy with this one because the render times are quite fine the results are very tweakable in post and I I like this style. I think that That worked out Imagine That's so there are some remaining problems Lighting during an animation if your character walks through those lights So there can be a ton actually in the end that might cause a problem But I guess you can cheat with parenting the lights to the armature or parenting them to Anything or maybe even hand tweaking them if you see there's a very problematic place You might just animate the lamp by hand as well or try to Make your cartoon character only jump very fast. So nobody notices the little mistakes during the animation You do might run into problems if you have a highly detailed topology that is because those little errors so like side of the face appearing Here the more detailed your topology is the more the harder it is to control Those areas and get rid of them. You might need more lamps or you might Find another way around it, but the good thing is usually cartoons. They are not highly detailed. So We'll just skip that The fine structures and hatching We'll have a look at that right now because I originally thought that this presentation would be 20 minutes long, but then I saw they booked me for the entire hour So the question if we handle the cross hatching kind of answered itself and let me show you what I mean by that there it is so that would be a couple of freestyle errors on top of each other and Some scribble stuff so It is the very same technique. I use the tune the tune shader as a mask to add the cross hatching here I think I use like ten freestyle layers on top and I did some additional thing I use the ambient occlusion and added it to the mask. You can see there's a cross hatching here Which is fairly coarse. This is supposed to be the very dark shaded areas of the tune character and here We have a much more. I Don't like this viewer Oh, there we go. This is a much more finer structure and This is I just additionally use the ambient occlusion as a mask You can of course use hard shadows as a mask and get them like a single hatching or something or this one time I did a Visualization for a presentation where we had a building and I just used this direction of cross hatching for the shadows and the other one for The this highlight so just two different directions and this I use two different hatching methods It it all works out I guess let's see the cross hatching should be this And see if the node tree is presentable No We need to use this there more a more simple tree, but I'm I'm afraid this is even worse Let's just render this So since it's getting late and we all want to go home. I'm just gonna rush through that basically Alright, let's have a look. This is the Alright, this now got very this is the shaded area of the cartoon a tune shader. That's actually very shaded There we go getting back some detail So this is how I I separate the non hatched from the hatched Then we have the ambient occlusion mask which I'm using right here So everything that is bright over here gets the smaller hatching then I'm using Which one is that that's the freestyle layer or at least one of them and Actually with this I ran into Some troubles with the teeth because they shouldn't be affected by the mask Because I don't I didn't want them to get affected by the ambient occlusion and I don't didn't want shaded areas in the teeth So I actually took them out and handled them separately So in the end this the setup for this was actually more extensive than I thought but I think The result looks fine and I did not go overboard it didn't take me weeks to come up with this or something and it wasn't like some of Some of the notaries I've seen in this convention. It was still manageable and So I thought okay. I'm gonna say I'm done with the technique. I like it. This is the way I'm going to use the tune shader from now on and That's it Questions. Yes That's not a shader. I tried the procedural but it's um, that's not a shader. That's a Very simple texture that I overlaid in Some of these I did in Krita some I downloaded from the blender cloud and This is after effect scribble input and you can animate that so you can even make it Nice and twitchy and jumpy So just I experimented I did this with Krita with a fill brush And I think this one and these are from the blender cloud. I experimented with a lot of them and actually if you recall I Said it's hard to handling the fine structure and hatching actually with you if you use the hatching those My they might be lines that are just one pixel thick So if you render this a lot bigger than you're actually going to use it or a lot smaller the hatching will break So keep that in mind you have to do your test render in the original size not small or not larger Because the fine structure of the hatching will easily break That's that's a very serious issue and here you can see actually the just the ambient occlusion mask And I really like this effect that you can make it more subtle But I really like the effect that you can use shadows use shaded areas and use the ambient occlusion either combine them with multiply or Use them however you want with different hatching Textures so as I said the hatching was just a single image texture over here very simple for me The hatching it's fairly hard because freestyle marks edges So what you need to do is create all the edges So you have to subdivide it a lot and then only the next problem would be if you'd have to use loop cuts in order to because otherwise you'll have the the squares and I tried that too, and I tried to use the displace modifier in order to get them a little more Not so evenly spaced and I tried some water fires on the on the Freestyle, but it did not look that great. It was hard to control and in the end. I thought hey, I do have after effects Let's just click scribble So that worked Yeah, um, yeah, that's I'm sorry say the last one part again, please. Yes First you mean you mean with it it happens with the diffuse shader, too I forgot how the phenomenon is called, but it's a problem and all ray and path crisis So I don't have a workaround with that. What yeah, what you need to do is change the lighting There's no way around that Well to my knowledge, yes, please It might work, but I think it's easier with a tune shader because If it will react differently to multiple light sources I think if you use multiple light sources on the diffuse shader you get a very subtle gradient and You'll have a hard time controlling that with the with the color ramp You may as well you may of course use it and there's another downside to the diffuse shader It clears up much slower than a tune shader tune shader it renders faster But it should be possible, but go ahead and try it out But I think those were would be the two problems that you would have with that technique That is possible. As I said just rebuild the scene in Blender internal. It shouldn't be a problem You have the tune preferences. They're just try it out and I actually do use the Blender render sometimes from ask and also for halos Whoever says they should die can go home. I like that Yes, of course, I'm if this is Might be you might have to turn it off. Could you please keep it down for just a minute I can hardly understand him. Okay. Go ahead. You have a lot of modifiers Let's just I'm going to switch to Blender because in Blender. We have the real-time preview of freestyle so One more reason we found it again. Is there is there I think some of that stuff changes It jumps around especially with the particle settings It might be me being haunted by something or it might be my impression, but I think stuff jumps around Let's use a shadeless scoop so we can see this better and If you go into the freestyle options, which are here You have a lot of features. You have a lot of options, but they are very complex I think and they are quite well hidden. For example, if we go to the Freestyle line style we can influence the stroke color alpha thickness geometry and texture I'm going to go to the thickness at a modifier a long stroke and Then I can choose a minimum Let's choose two and a maximum of five so we can see the difference and it's now fading Unfortunately, I don't know if if I had just haven't found it yet But I don't think you can influence the direction like I couldn't switch the direction the fade direction of this line I haven't found the option yet. It might be there, but I don't know. It looks nice. I like that So yeah, that's if you go to extreme values two two and ten are fairly extreme Let's make it more than a lot of the time you get this Picasso style. I like that a lot actually and You have to click yourself through the modifiers. They're pretty cool like this is No, it's always good and if you choose geometry there, the noise is even better But I also like his blueprint. I don't know how this is blueprint. I'd call it. I call it bubbles, but I still like it. So That also what I like is overshoot. Is that here back bone stretcher? I think Yeah, now you can see it's going it's going over the edge Here, that's nice, too So once once you start this you it'll take you a while to stop it Yeah, you'll be hooked for a while Especially with yeah, I like as I said, I like then then polygonization that even would enhance the effect and What's that guiding lines are even more like scribble stuff purlin noise Yeah Can of course change the order of the mod of the modifiers. Yeah, now we have the noisy stuff Now that would look like my sister age three Questions for me the cheeks. Oh, right, right, right. That's the original texture from Andy That's the painter texture he uses in Here I Just plug that in there and at some point I took it out. I forgot when here. Yep. I took it out So, yeah at some point I thought this would be too much detail for if I want to talk about the Would distract from this effect So if you download it that all the textures are there I just threw them out At some point. Mm-hmm. You can do both You can do big pixel. You can do relative to render size And I think you can even make it relative to the camera distance. Yes, please. That might work. I Might actually work. No, I haven't tried that But we can do it real quick. I hope cycles Compositing no drangler does not seem to be Active I think it's easier if you use the normal node, right? I mean this way, right? Oh, okay That might work. I actually use the normal pass in order to distort the hatching slightly This is a very annoying player. I should have used VLC if you look at the Rendering over here. I used I don't think I used it here I actually use the normal pass in order to try to wrap the hatching texture around the model to make it Follow the topology. It didn't look that great So I took it out again because some of the hatches get stretched, but I guess if you make it more subtle, it might work so Yeah, you could you could go ahead and try that actually I'm going to post this talk on Blender Diplom If you manage to do that, please send me an email and I'll post your solution under it as well That would be nice Good idea anyone else then I guess I almost took up the hour Okay