Clean Toon Face Shading with Object Normals in Blender

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey so i've been working on something pretty cool i've got my anime girl head here and she's looking pretty good at least until we move the light and see the shading and ooh it is not good we've got these terrible wiggly toon shading shadow terminators that just ruin everything now this is a really common issue because it's a universal issue with toon shading in 3d and you'll see it in like anime and manga and games and comics and stuff where they're trying to use 3d and it's part of the reason that 3d is still not catching on more in production because it just doesn't look right so we really need a solution now there are some options out there to deal with this issue there's like normal editing or normal transfer with data transfer there's like customizing your topology to force certain shapes and there's a bunch of really funky like fake light and texture things that we've seen in some games but all of these solutions are a huge amount of work and really tedious and they just don't actually work that well on the end they don't get the results clean enough considering how difficult they are and how much work i wanted a cleaner and easier solution so i did a bunch of experiments like a year and a half ago in my reimu project and got a basic proof of concept but now i've come back to it and completed the setup so we can do this clean shading from the material itself and not just clean here it is clean all the way around and also up and down what's more this tune shading is completely topology independent we can turn off our subserve and even crank up a bunch of decimate and it doesn't affect the shading at all until the model totally falls apart so what wizardry is behind all of this well i figured the problem all came from our mesh normals but the solution is to throw those in the trash and build entirely new clean normals out of object coordinates this video will be a full explanation of how this setup works and how to do a basic version of it for yourself we will start by covering some basic information about normals and object coordinates and how they relate to each other then we'll run through our node graph here and understand each of these groups and what it's doing and we'll also cover the limitations of the setup and how to use it for yourself i'll be releasing these nodes and you should be able to just chuck them onto your own character's face as long as it is similar enough some of the really complex stuff like what exactly is going on in these node groups and the nose normals will be left for a later video i'm still figuring out a bunch of this stuff and i expect i'll be finding some better techniques than what i've done here but i wanted to make sure i got the basic information out for everybody here's the test setup that we'll be using to look at this and this is also the file i will be releasing so check the description for a link to that we've got our head mesh we've got a sun lamp we have the top bit of my rigify rig we're moving the head and the neck and this is to test opening the jaw and dealing with that deform issue we've got some eyes and we have the all-important empty object the first thing we have to do before i can explain all these nodes is look at some normals so i've got nodewrangler and with ctrl shift left click i can quickly preview the outputs of these nodes now it's pretty hard to tell what we're even looking at here so let's make our lives easier by doing some things to help visualize it all normals are three different colors indicating three directions if we separate x y z we can look at them one at a time those are x y and a z but they're half black and it's a gradient so it's kind of difficult to make out what's happening so i put together a node to help us visualize everything normals and lots of other vectors by default aren't particularly human readable and that's because their range is not zero to one what we're looking at is black to white but there's a lot of data here that is actually in the negatives so this actually goes from minus one to one but everything below zero is just pure black so we can't see it so the first thing we want to do is make it so that we can we can do this with the map range node map range you specify what the input numbers are and what you want them to be changed to so we want to view in zero to one but as i just said normals are minus one to one so when we remap it now we can see that we have a gradient from the bottom to the top starting at black or the furthest down and white at the top but it can be even easier to see what's going on let's change this to step linear and give it a bunch of steps and now this is starting to look a lot like our tune shading so i've made this group that's just a bunch of these stepped map range nodes in different configurations to make it easy to quickly preview thing so the first well the second zero to one this is just taking what we're looking at for and stepping it then this is taking the whole thing minus one to one the whole range then minus one to zero is also useful for viewing some things but the first one is absolute absolute math node gives you the absolute value of something so zero uh minus one to zero also becomes one to zero and this makes it easy to view this this is our x pass and what these colors mean is black means that it has no value in x and one means it has full value and since normals express rotation that means faces that are pure black have no facing on the x-axis which is horizontal they're facing this way they're facing down y and ones that are white are facing fully in the x-direction and since we've mapped with absolute if it's facing down the x-axis at all it will be white so minus x has also turned white if we view the minus one to one on x we can see you know black is facing in this direction white is facing in this direction and gray point five is not facing down the x-axis so now we can reveal the secrets hiding in our normals let's take a look at our y where we've got minus one to one with black in the middle and check out these wiggly contours as i said these wiggly shapes look really familiar they're looking a lot like our bad toon shading shapes and here's z again and x again and these look like our bad tune shading shapes because this is literally what defines them let's grab our y again and we'll view it in minus one to zero so just viewing the front of the head for some more resolution and we've got a toon shader let's plug that in mix so we can compare the two now as we move our sun lamp you can see that the shapes created by the tune shading almost exactly line up with the shapes from the normals so this stepping method is great for understanding what sort of shading your normals are going to give you at any given area now of course it's not perfect like it's not lining up up here but that's because the top of the head has a lot of curvature on x and z as well whereas the cheeks have less we can check out the x contribution maybe remat that way and now we can see side to side that the shading is lining up with the areas where x is dominant really well too and those areas have less y and z curvature so it's basically all of the x controlling it so this is great for any sort of normals work so now we can get into the setup itself and the core of the setup is this empty object and this empty object i've said it to be viewed as a square it's size to fit the bounds of the head in each direction both on x y and z and down here it looks like it's going to bounce to the neck but it's actually the bounds of the jaw that matters but its size to fit the jaw when it's fully open at the full angle the empty object is accessed through the texture coordinate node with the object selected and the object output so that's feeding into our node group we're working in and it's a vector it's coordinates so we can take a look at that and that looks familiar it's a bunch of colors like we saw in the normals but i'm not really seeing any details in it so let's look at just the x and through our viewer and well this certainly looks interesting and it's incredibly clean let's check out the other axes click the right thing hmm that's looking good so is z so what we're looking at is a linear gradient from 0 in the center at the empty's origin point to 1 at this bounding box and it's giving us that in each direction and since we scaled the empty to match the side of the head it ends right at the sides of the head our x goes right to the edge here everything past this is just pure white and you know below one minus what is pure black so this is nice clean linear gradients so what happens if we just plug this straight into our shader that's already some really nice shading we're looking at and what we're actually seeing here is spherical shading this is behaving just like a sphere would and to confirm that let's hide our head and check out this sphere i've got the same material on it let's look at its texture coordinates looks pretty familiar should hide the eyes too and you know we can look it through the viewer and hmm completely clean in each direction in fact we can even grab a difference node and plug this in if i write socket and it's not really finding much of a difference there's a tiny bit but that's because the bounds of the empty don't quite match the existing normals and we'll notice more of a difference on z and that's because the empty isn't matched to the spheres there you go if it did match then it lines up so if you plug object coordinates into an object it gives you sphere shading and that is the core of our whole setup back on our real head we can observe some interesting things about this shading we get just from plugging object coordinates in first of all it is super clean and it totally ignores stuff like that ear at least in this axis whereas if we look at it from here we can see it is going on the ear and if we turn off our eyes we can see that we do get a bit of a shading notch here from this angle you know from this angle we don't if we look at it at 45 degrees but from these side angles we do so the mesh does still matter a little bit the topology doesn't but the depth and the overall shape does to understand what's going on we need to understand something conceptual about what a normal is and what object coordinates are let's view our normals again and remember what a normal represents it represents the basing of a face it represents rotation on an axis black represents zero rotation on that axis and white represents full rotation on that axis however object coordinates don't mean this object coordinates represent distance from the origin point of the object in object space so affected by scale and rotation of the object so in this case a black on x means that it doesn't have any translation on x it's not rotation it is translation so black is at zero and white is at the edge so these are actually two totally different things one is rotation one is translation it but it just so happens that serendipitously it's giving us the right thing visually and our shader nodes don't know the difference they treat whatever we feed to them as a normal even if it's not so this is why we had those visible shading notches in the eyes if we look at our y-axis we can clearly see that while it's a smooth gradient in this direction what color is actually on any point of the mesh is based on that depth so an inset area like the eyes or a outset area like the nose is going to pick up different values and thus have different depths on that axis we can see it pretty clearly on x and on z as well so this depth issue is the first major drawback of this style that you should know about but luckily it's just not a very big drawback you know we've got those eye notches but they're only really that bad because of this 90 degree angle into an empty eye socket and when we turn the eyes back on and fill them it's barely noticeable the other place you can see it though is on the nose at this angle because the nose sticks forward a bunch so you can see we're getting kind of a notch instead of smooth shading and it does disappear after a bit but it's definitely there and the reason we're getting that is actually in this angle it's not there it's totally clean but that looks you know different from different angles these incorrect vapes can also be compensated for as we add definition and make this more than just spear shading but ultimately the main reason this isn't a big deal is because this is an anime character and they have super round faces but fair warning if you're trying to use this style on some other sort of tuned character like a caricature or western styles that have like very exaggerated features like if you had a huge nose and you know big jaw and stuff then you're gonna have problems speaking of adding shape beyond just a sphere it's time to get into what our nodes are actually doing with those object coordinates first of all let's take another look at our mesh's real y basically we can see that this is giving us our shape and it's wiggly and we want to recreate basically this shape but not wiggly so it's broad at the top and then this chin curve it all comes together and most of the area in the front of the nose and all this stuff is facing mostly forward because remember black is minus one y in this current view looking again at our existing object y we can see that it's already doing most of what we need the top is actually exactly what we want we just need to somehow bend up this bottom bit to the chin to make that curve for the jaw and the cheek and that is exactly what our first node group does i have called this bend on x because it's bending around the x-axis that's the one we're looking down right now we put our object coordinates in and let's check out what it does at first it looks no different but then as we play with these rotations it bends it and we can bend both the top and the bottom although in this case we don't want to bend the top and we also have controls for the scale at the top and bottom to compress this and for the location at the top and bottom to move it forward and back as i said we're not going to fully cover these groups but the basic idea is that the first half of this group is a vector rotate node that is masking what's going into it so that you can rotate the bottom and top separately and the second half is a mapping node that is masking what areas scale effects here's the actual one used in the setup and we'll look at it here so we can see here that a change from black to white 0 to 1 is full curvature so the top of the forehead it curves over this whole area whereas on the chin it curves from white to black to white which is you know appropriate for a chin curve let's look at what happens when we combine this with just the spherical x and z and plug that into our tune shader and let's see what we've got already well that looks pretty good from that angle and we can do the rotate around test the shape is a bit off here it's kind of going back towards the top a bit earlier you know maybe it could come up to there but it's totally clean and it's generally the right thing so just that this is like 80 of the setup we're like most of the way there i've got some other stuff in here on x but this is most of it that's how simple this is to do if you can get that y shape right for your cheeks and your you know your if your character is basically an anime girl then it's that easy so that x group i've called it scale x also i put gfn for generated face normals all these groups so if you import this into your own file you can find things easily the x group is for adjusting the scale of x at various different points so we can adjust the middle and make it thicker there and we've got the upper middle and we have the very top of the head and of course the lower around the mouth and the bottom and we also have these controls which adjust the scale of x up to its origin point in the middle turn that back on so one is for above and one is four below so for example this bottom is mostly affecting like the neck if i want to use this to say shrink to the chin then if i adjust this it's going to move up the point at which that's scaling to the point below this the scale will be zero it's a little hard to see there you know you wouldn't want to do something like this but you know you eliminate the neck with that and then up here if we were scaling the top a bunch then we can move that point this again looking at the version i'm actually using the x is looking like this but more helpfully let's plug back in the full setup and look at it and watch what happens when i actually change things the scale middle is adjusting quite a bit there and the scale upper and top are being used to counteract this curve that we mentioned before when we were looking at just y so that's thickening things up a bit which is closer to the shape we'd actually want this to be and a quick look at the group this is basically just some mixes this is the option of getting the z and then a bunch of mixes for what values get used for scaling it on x and where it's basically masking different values of different areas and that's going into a mapping node so it's a mix group or mapping node and of course we can't forget about z down here which isn't getting any changes at all because it already works great and this has been enough z would normally be used like on our real normals to define things like under the chin and we don't really need to do that because i'm just masking things back here back to the regular body normals anyway the top of the head is already round so the regular spherical z is handling this area just fine and we don't have some of this other detail like the eye ridges or the nose stuff yet so we don't really need it there it does show up in the cheeks but we're getting enough curvature from the x and y to satisfy what we need in the cheeks the curvature of any point is you know kind of all three axes contribute to it so if you put enough in one axis it doesn't really matter if you don't have much in another next we come to the nose which if we're just looking at the normals from here you may notice that the nose doesn't exist there is no nose shading and that's because these normals we've made so far don't have it we haven't defined it this is the next big limitation of this method every detail feature we want in the face we have to define normals for for the cheeks and all that's really easy because we started with a sphere and it's basically just a sphere that's then to bid on this axis so great easy but other shapes like the nose and the lips and like the ridges aren't going to be as simple and then there's also weirder things you'll see in some styles like you know shading triangles under the eyes or you know brow furrows all of those things we have to define normals for manipulating the object coordinates with math isn't the only way to define these shapes though that's the way i've chosen for this main shape because that's convenient to distribute and for another reason we'll get into it a minute but you can also have it be texture based using either uv or object projected textures any method of getting color onto a model is fine as long as you can get your three linear gradients x y z or you know maybe you'll only need two for a specific shape we can conveniently use the bump map node because it has a normal input so if we run our object based normals through it and then have it a mask made in whatever way as the height you can use bump maps on them however bump maps kind of suck they tend to have artifacts even in the best of bases so this would be the easiest way to you know like bump out the nose or something but i'm not using it because it just doesn't work very well the solution i'd really like to use that's generally better than a bump map would be a normal map they're like a bump map but without as many issues and can operate in more directions but the problem is to do that we need the normal mapping node and it has no normal input it always operates on the mesh's real normals you cannot run just any old vector through it i'm looking into seeing if there's some way to use a normal map and then use other math to do the same thing a normal map does but on any old vector but i haven't figured it out yet i'm still exploring all of our options to make different shapes and that's part of why i've only defined the nose so far so we'll get to that stuff in future videos but for now let's look through what i did do for the nose inside our nose group we have a similar setup to before we take the object coordinates we bend them into the right shape we have to do some remapping this time and then we make a mask and that mask is used to mix between the nose normals and the other object normals so it's not a bump map or a displace or normal or anything it's just telling it in this area use these normals let's check out what it looks like on its own though just in this nodes area our x is very narrow because we're only defining this small area and as you can see it starts out as black pointing forward of course and then pointing sideways it gets to about 0.5 so that's an exaggerated shape before it's masked out and similarly the y is only going in a small area look at that there so the front of our nose and the z is actually doing the weirdest stuff here because it's very compressed under the nose because remember curvature is black to white his cur is a like 90 degree curve so it's going black to about again 0.5 by the time it gets masked out and up here it's doing that over a much wider area so that's giving us this triangle shape and then if we look at it on the whole thing you're right you can see the differences in z in the nose area you know the differences in each axis in the nose area and the shapes that's making flip through these views so we can get a better idea of some of these some views are good for one and not for others so part of the reason we're not going to go into detail on all of this is that this node setup just isn't the greatest in my opinion it's not doing everything i want and it's not very intuitive so that's why we're saving that for later and one of the issues it has if we check it out you know we kind of want to get some shading under the nose as the light gets to it and we can see you know it's staying lit even though the light is at this angle but it should be getting some shading by now as we pass over it it's not quite the right angle and you know it looks okay from the front you probably didn't notice like hey that's really wrong in the earlier previews but when you're actually looking at it really closely you can see that it's kind of doing the right thing but not necessarily at the right time so i need to adjust the shapes and it's like it's crossing over the curve a bit too soon but i didn't want to delay this video more by fighting with it i am pretty happy with it uh at this angle it's here you can't really see the issue so from this angle is doing basically what i want i can make it come up a little bit more maybe but yeah so we'll save that for a later video moving on to the next item our shape is now fully defined but let's go ahead and give this thing a whirl i mean literally let's move it with the rig and when we do that something weird is happening no matter how we move it the shading is stuck to the mesh it responds to the light of course but we can do all sorts of weird things and it doesn't help if we move the normal itself then the shading changes which is actually pretty handy because it lets us make tweaks to it you know this empty is parented to our head bone and we can set up another bone to give us more control in the future because you know you can like scale to adjust the thickness of the shading in different directions so that's pretty cool but we do need it to behave properly there's a couple things for us to observe here let's take a look at the mesh laurels themselves when we rotate the head using the rig they seem to be sliding across the surface and remember that's because these colors indicate different directions that green means that way on y whereas red means that way on x and you know blue means up on z so those colors don't change but the normals is changing color which gives us this effect of them kind of sliding across so that's how things should behave if we look at our object rejected normals and move the rig then they're stuck to the head they don't change and that's why the shading is stuck to the head now let's observe how the normals behave if we rotate the head object instead of using the rig to rotate the vertices inside if we do this it behaves correctly the normals are moving across the surface instead of staying stuck to it and that's because what really controls the normals is the object the object is parented to the head bone so it follows the rig but it's not parented to the mesh itself so the problem is being caused by the object following the head to verify that let's disable this childhood constraint that attaches the empty to the head bone and now when we rotate using the rig it's behaving correctly but it won't for long right now i'm rotating around the center of the head but if we actually rotate the bones themselves well they're just moving away from the empty and then the projection is in the wrong place so we need the empty to stick to the head bone and to not be stuck to the mesh technically the reason this is happening is that the object coordinates contain all of the transform information about this empty it they respond to lock rod and scale changes now normally when we think log dragon scale that's three separate vectors with three channels each whereas object chords is a single vector of three channels so it's not lock and rot in scale but the numbers we're getting do convey that information so to speak so the reason that our shading gets stuck to the head is because when the empty rotates with the head and rotates what it's projecting it's always staying lined up in the same way and since these values are being used as normals but they don't respond to direction changes then even when you turn the head all the way around it thinks this face is pointing that way because that's the color we're feeding it and the shader node doesn't know any better the solution to this problem is contained in our next node group which could plug in that output and now we can just look at that directly now it's behaving correctly and what's happening inside this node group is we're taking our normals and we're using the vector rotate node and inputting the rotation of the empty object to basically cancel out that rotation and counteract it so this is really the vital core of what makes this all possible without this we could make some nice fake normals with these object coordinates but this is what makes it so we can actually use them as normals and have them be attached to the head properly and i want to give a special shout out and thank you to kalupsi from the blender npr community for helping me figure out this solution in the past i'd known that i needed to get the mt's information and modify the normals by that but i was doing it in a really convoluted and roundabout way which looks like this that is a full matrix multiplication bringing in every channel of the matrix one at a time with drivers which is a massive hassle and a pain to set up so luckily he realized that i only needed the rotation and that's going to save all of us a bunch of work and we actually have a second reason to be grateful to kalopsy because he has made an add-on that helps with the rest of this setup this empty face normals rotation is being brought in via an attribute node and if you're not familiar with these because they're still pretty new they let you access things about your object data or your geometry based on the name you enter here so we want object or instance here it doesn't really matter and this rotation is a custom property that is using drivers to get the three rotations from the big empty that we're using so the normal way you set this up is you hit add to make a new property you go to edit we need it to be a vector so you do this and now it knows to have it be three channels and then the vector socket will actually have data in it over here and then to set up the drivers we can go to our empty and copy each of the rotation transforms uh copy his new driver go back here paste as driver and you know we do that three times and we'll have this thing set up so that's a bunch of clicking is kind of annoying or we can save time with collapses prop driver add-on we select your empty copy reference set your object paste properties i'll uncheck rocks we have it we can name in them all like that and there's our properties all filled in with drivers and there's another feature we can click this button and it just spawns in the node into our node tree it doesn't put it in groups so we gotta copy and paste it to get it into the group and this is a custom node that's part of the add-on it's doing the same thing as the attribute node but it saves us having to enter the name and everything and the reason i don't use this is i want this file to be compatible for people who don't have the add-on but you should get the add-on there'll be a link in the description being able to set these properties up quickly is especially useful when you have multiple objects like i've got the eye objects and back in the main setup i showed earlier i also have this group on the eyebrows and eyelashes and all of them need to have that property with rotation setup on them onward to our final node group now i've kept both versions of these normals the base object normals and the rotation fixed world space normals now and i'm feeding those both into this new group and that is because this group is building a mask or our generated normals back to the original mesh normals the mask has been created by mapping both the y to get the back of the head and neck and z to get the lower head and combining that together to leave just the back of the jaw and the neck that we can get the original normals on and then the ear mask has been brought in through vertex colors which is being input here with another geometry node and the reason that i wanted those object normals instead of the world is i actually do want this to stick to the head whatever angle i want that same area to be masked whereas if we use the fixed world normals then it's gonna change the mask based on our rotation and stuff so that's not what we're after and then it's just a mixed node between the world normals and the original normals and that's it we've covered the whole setup and all the nodes now so let's talk a bit about the limitations of doing things this way we've already covered the depth issue and touched on the complexity issue we have to build normals for every shape we want or we have to you know mask an area back to the vertex normals which causes holy problems so if you have a very complicated base then it is going to get weird another big limitation is that similar to the complexity issue is we need to define normals for any major deforms the mesh is going to do if we open the mouth it doesn't know it does not adjust that shading because it's just an empty object projecting things based on distance so it has no idea that this mouth has been opened now i call this limitation but a lot of the time it's more of a blessing than a curse because there's lots of issues that get caused by deforms where we're glad that it doesn't influence our shading you know in your regular normals when we deform this area it's like adding new shapes under the mouth because the mess changes shape and so it's going to shade differently and if we're like repositioning the eyes you get all sorts of shading around that you know when you follow the brows so we do have to do the work of defining any shading changes we want but at least that means we can get rid of stuff and often it's easier to add new elements than to get rid of ones we don't want and if you're trying to solve these problems with like normal editing it's a total pain in the ass to deal with these deforms anyway now in this case this jaw deform issue isn't that big a deal because i plan for it from the start we need a separate shape of the normals for the jaw and that's actually going to be really easy for us to get let's head back to our bend x node you may remember i mentioned that part of the reason i made my shape this way is for things to be dynamic so here is our y normal and we can use this to bend it which is what we need to do i'll bring back this node that's been hiding out down here so let's open the mouth and we just bend that line up in about the same place which is about 25 degrees and coming in here is this driver which is the jaw bone which is limited to 16 degrees of rotation by the way and we bring that in as the mix factor between this for the lower angle and now it is automatic and still totally clean and dynamic really easy so how you handle any individual deform is going to depend what it is and how you've set it up in this case i built this group specifically to make it easy to solve this problem but if you had like some complicated deform like you know cheeks puffing or stuff like that then i'm not sure off the top of my head how you'll address that and if you created your normals through like images then you would also have to deform them in a different way as i mentioned you could just draw your normals on textures you can you know get the boundaries of the head and take this into photoshop and you know use some gradient tools because remember we're viewing this as steps but it actually looks like this from -1 to 1 and then from minus 1 to 0 and then from zero to one so you could draw a linear gradient you know of just zero to one and then remap it and you'd have to draw one for each direction x y z but you can fit that into one rgb texture and then you just uh object map the texture and it will do the same depth-based projection so you don't have to do a bunch of complicated math nodes in order to get the shapes you want and if you are creating your normal shapes with images you can still bend them by manipulating their vectors in a similar way whether uv or object projected you can use a similar node to this to adjust their coordinates to bend them into the right shapes you need for any given deform or you could mix between two different textures for different forms or whatever there's actually quite a lot of options and using textures in general might not be a bad idea once you get to some of these more complicated shapes it'll be pretty tough to figure out exactly how you go about drawing the right shapes but i'm planning on trying to figure that out and talk about it and that can definitely help deal with node compile times like on this scalex group this is a bunch of nodes that's going to add up if we end up with like six of these for different shapes so once they're all done everything that doesn't need to deform can just be rendered to an image texture from each side and that will make things much more optimized speaking of image textures one of the top questions i've been getting asked about this setup as i was posting about it is if it's possible to bake it to a normal map or use in game entrance and stuff and the answer is absolutely here we are looking at a tangent normal map it's from an earlier version of the setup but as you can see it's still nice and clean it's no trouble to bake because your generated normals end up plugged into your diffuse anyway here's what that actually looks like now there are implications of having this be a tangent map we're back to our setup ultimately being based on our real vertex normals that means deforms are back or better and for worse but it also means we don't need to rotate the setup based on the empty because the empty is you know not involved at all anymore and this also gives us back the problem of our jaw not having a separate state properly it's not too bad because the map is stretching with the texture but it's not as good as before to solve that we could bake out a second version of the normal map that is in this position and then mix between i'm planning to look more into baking and doing image stuff overall in another video there's also object space normal maps so those will be mesh dependent but they also will you know be pointing your normals in absolute space but i think they would need the empty rotation or you know the head bone rotation to work right but we'll see overall i don't really know how far you can go with this method in game engines you can do the tangent maps and i assume you can get object coordinates and like the rotation of something to correct a object space map but i doubt you can do all of this other math and like actually be making shapes procedurally out of your vector components and all that stuff so if anybody who does have more game knowledge wants to let me know that i will mention it later or leave a comment or something okay the lecture and explanation is finished and we're pretty much done but i'm going to do a quick recap of how to set this up on your own model all the information has been said but it's fragmented first of all you need your head match and it should be an anime style or something similar in shape otherwise this may not work all that well second you need the empty object its origin point should be in the middle of the head as much as possible especially horizontally and it should be scaled so that it matches the maximum bounds of your head including the forms although you don't really need to worry about it like in the back of the head because that'll be covered by hair and stuff or you can mask that out i'll note that you can do the scale change in the nodes if you want instead of scaling the object you can leave it alone and do any scale changes with a mapping node or a vector map node or map range or whatever but that's adding extra nodes which means extra compile time so i prefer to do it in the object itself speaking of you might notice that actually i don't have any scale on my object but i do it's just hiding in the delta transforms this is the actual dimensions i've got and the reason for this is that i want to be able to scale the object and reset it to zero without wiping out all of my scales so that's what delta transforms are for you do a control a apply as delta and then they live here the third thing we need is the custom property on the mesh with the drivers pointing to the three rotation channels on the empty which you can set up easily with the prop driver add-on fourth is of course the nodes you can bring in mine or you can get your own object coordinate nodes you know put it in a group for convenient and remember you mostly only need to make changes on y so i guess we'll say that uh your custom y is the fifth element you need because x and z you can basically just use the raw object coordinates depending on your head shape of course so you need your y you can use this you can make this shape any way you want you know it's not too hard to do with like a gradient texture set to sphere and then move it out here so you get a big sphere around here or something the important thing to remember when making your vectors is the space has to be right they're going to start minus one to one then you remap it to something else to look at it but then any changes you make either have to be done to the original or you have to map back to minus one to one if you bring in like an image texture or something that is looks like this visually that is you know white to black then you have to remap it with an app range node so you combine x y z you can mess around with x scaling if you want but the next thing you absolutely need is the object space rotation fix so the whole setup doesn't work without it and then i guess it makes the seventh element a mask back to the mesh i have that uh vertex color mask of the ear i skip the nose because it's not essential but of course you are welcome to play around with that but you know your mileage may vary all right we have reached the end check out these renders i did because they look cool and as a note the setup i've shown here is only one way to do this method i've shown a certain way of doing the math and making the shapes but it's not the only way and some other people i've been chatting with this past week while working on this have been experimenting with their own methods so thank you to kalupsi and also josie from the bnpr community and i suggest people check out their twitter as they have examples of this in their own work and are trying their own experiments if you go to my twitter you'll be able to find retweets of them the project file we've been looking at in this video is available it's on my gumroad for free there's a link in the description so check that out and enjoy the full character that this head is from is also available through the blendernpr.org beer fundraiser it only costs a few bucks and you get in the pack with a couple other cool projects to check out and that goes to supporting the blender extended expressive renderer which is a new render engine for blender designed specifically for doing stylized rendering that's also linked below if you've enjoyed this content and you want to help me spend more time working on 3d and doing videos instead of doing unrelated contract work to pay the bills then please consider supporting me by buying something on gumroad or signing up for my patreon and if you are thinking of picking up that bnpr fundraiser pack with the cyber girl in it there is a nice big discount code for it or anybody who signs up to my patreon at any level and of course leave any questions or comments like and subscribe follow me on twitter because that's where all the regular updates are and i will see you next video you
Info
Channel: aVersionOfReality
Views: 40,095
Rating: undefined out of 5
Keywords: anime, manga, toon, cartoon, toonshader, 3dtoon, 3dcomic, 3dart
Id: sQW2wqltB0A
Channel Id: undefined
Length: 48min 12sec (2892 seconds)
Published: Sun Sep 05 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.