Toon Shaded Face Rig - Using Booleans in Blender 2.92 / EEVEE

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey everyone it's carl from lightning boys studio in the previous videos we showed you how we make our toon shaded characters for our project dinomencers today we're gonna look at how to make a 2d looking facial rig in blender you'll see that our method is quite unusual instead of modeling the facial features as part of the head itself the eyes and mouth are created separately using various modifiers like bullions this is not a method we recommend for realistic characters but it works great for stylized cell shaded characters and is very quick and easy to set up i'm gonna let david introduce how it works and then i'll come back to explain how to attach this setup with an armature let's get started hey guys david here uh carl is there regarding our team which is why i'll be the one explaining how to add bones and paint weight in the second part of the video but this first section will deal mostly with modifiers and materials so i'll be handling this part which you're looking at here is our irig it's the same we've been using on our final characters and we added this blender scene for free download on our grammar page that way you can use it on your own characters but we'll also show you how we made it that way it will be easier for you to make adjustments to the rig if you need so let's look at this blend file and see what you can do with it you see that we got these two spherical controllers here which lets you rotate and scale the entire rig or you can also just move a single eye if you want then you'll see there's a second set of spherical controllers inside which is scaled flat in the y direction to make the eye more 2d you also have these two big boxes here which are used to control the eye closing and opening you can use them to make different expressions and by the way if you see the controllers disappearing while i'm working it's simply because i'm hiding the overlays with shift alt z you can also do it by pressing this double sphere icon in the top right you also have these two empty objects which are nested under the i the form object one is called direction and the other is called spec you can move them around to change where the eye is looking at and these can even be rotated in scale to create different looks finally if you click on the eyeball and look at the material panel you see that you have many more options such as gradients you can add thin dark line around the iris change the specular color opacity and so on all right so now that you have a better idea of what you can do with the final rig let's look at how it was made we're not going to show you the entire process but we'll skip to the most useful and interesting parts basically the way we approach this rig is we started with a sphere and two cubes and to change the cubes into wireframe controllers like in our rig you can go in object properties and all the way down in viewport display change the display as from texture to wire let's do this for the other one as well and so now if you click on this eyeball we're going to go into modifiers panel and add two booleans each one is going to link to one of the cubes that we made so this one is going to link to the top and this one to the bottom one and make sure to set them to difference mode and set the solver to fast they'll be a much more responsive this way so now as you see we're cutting out parts of the sphere uh using these cubes but we're actually going to create a second layer of booleans because we want to get rid of these flattened shapes at the top and bottom and create eyelids instead so we're going to click on the eyeball and duplicate it using shift d and right click so it stays in place let's call it top lid and we're going to go to the modifiers and delete the bottom boolean so we only keep the top one and change it to intersect instead and now you're going to get the negative of the original boolean now you can repeat that step again for the bottom lid so duplicate it with shift d right click but this time we want to keep the bottom boolean instead of the top one so we can change it here and now you're back to your original sphere but since there are separate pieces of mesh now you can change the material for the eyelids and you'll always retain a perfect cut defined by these uh two boxes and i changed it to gray for now but you'll see that later we'll actually change it to a skin color when we apply the eyes on to a character now in reality the rig is a little more complex than this because we wanted to have an outline around the white part of the eyes and we had a lot of issues with it at first anytime we use the solidifier modifier to create an outline the meshes for the lids were intersecting with the outline as you can see so what we ended up doing is create a second hidden set of cubes which are used for the booleans of the top and bottom eyelets but are just a little shorter to make space for the outline mesh and since they are parented under the original cube they will always follow we also scaled up the mesh for the eyelids a little bit so that they still align with the rest of the eye so that means if you want to adjust the thickness of the eye outline you can but just remember to find a hidden set of booleans and move them a bit and then scale up each eyelid accordingly and once it's done you can hide the booleans that are a bit shorter and you see that the outline will uh work much better one of the coolest things we discovered making this is how to use a shrink wrap modifier to position the pupil of the eye the idea is quite simple you need an empty plane access object and you want to move it in front of your sphere now if you go to your constraints you can add the shrink wrap modifier and pick the sphere as a target you want to change the mode to project and i'm going to change the project axis to plus y but it could be different depending on the orientation of your scene but the end result is now that if i move this empty object it's going to be always constraint the surface of my sphere which means we can use its position in the material to create a procedural pupil to demonstrate this let's go to the shader editor and i'm going to create with shift a a gradient texture and i'm gonna change it to spherical and we're gonna need two other nodes we're gonna need a mapping node and a texture coordinate node now you can create these very quickly if you have the node wrangler add-on enabled in your preferences you just have to select the gradient texture and press ctrl t so what you want to do is use the object output from the texture coordinate into this vector and you want to pick in the object field the empty which is created so basically what it does is it says hey i want to create a gradient and i want to use the coordinate of this empty as the center of it and to see it we'll need the mix rgb node so let me press shift a again mix rgb and i'm going to connect the color output to the factor which means it's going to drive where the second color is appearing and to see it we just need to connect the mix rgb to the emission shader and now you see you have this gradient here now it's very soft but you can change this by creating a color ramp in between changes to constant that's going to be very sharp you might wonder what this mapping node is doing right now it's not doing much but if i were to create a simple value and put into the scale here i could use it to change the scaling inside the material now of course you can also do it by scaling this empty but the cool thing is when you start mixing these mixed rgb nodes together and stacking them up so let's say i were to take all of this and duplicate it with shift d i could duplicate this mix rgb node as well and uh take the output of the second color ramp into the second mix rgb node the factor and if i change this color now if i use a different scale value for this one i can start to make a more complex eye material just note that the empty object can react a bit weird if you use it directly on the eyeball if it's cut by a boolean especially as you come close to the edge for that reason in the file rig we made a copy of the eyeball without any modifiers applied to it so it's really just a simple sphere which is always hidden and that's the object we use as a target for the shrink wrap modifier all right so that was the quick overview of our process making this irig remember that the final rig is available for free on our government page so you can use it in your own projects all you have to do is append the irig collection in the scene with your character and you can use all the options we just saw to position the eyes and customize it however you like for your character to look good now that the eyes are placed i'm going to show you how the mouth was done what you're seeing here is just a simple line of geometry that we model for when the character is idle or smiling but if i hide the face you'll see we also modeled teeth and a tongue and we'll show you how you can easily switch to an open mouth without adding any kind of geometry on the face itself the way we did this is we use the boolean shape to carve out the mouth which is great because we're then able to easily toggle off the modifier whenever we want to go back to the simple line we proceeded much the same as when we did the eyes using a boolean shape and difference mode but instead of using a simple cube we added a little more resolution to it here's the shape that we use you don't have to do anything fancy the key is you just want enough resolution to be able to make different mouth shapes but not too much resolution so that you start complicating the waiting process unnecessarily here we have a subdivision surface applied to it to make it a bit rounder if you're using a subdivision surface and an outline on your model it's very important that you place the boolean modifier in between the two if you place the boolean first then the sub-div will mess up the edges when smoothing the mesh but if you place it after the solidify outline you won't get any outline where the mouth is so in between is what you're looking for now even if you do this it's possible that you still get a few glitches one of them being a strange looking shaded area around the mouth most likely this is because you're using your model in smooth shading and blender is trying to smooth the shading on the edge to fix this go in your object data properties normals and simply click on auto smooth this will tell bender that past a certain angle you want to keep the shading flat no matter what the other glitch that can happen is you might notice little bits of the solidify outline peeking out from inside the mouth now we could reduce the outline uniformly everywhere but in our case we like the thickness around the face so we'll use vertex group to paint the thickness locally instead as you see we're already using a vertex group called solidify this is because we didn't like how the outline looked under the nose so we painted out the outline in that region and modeled a permanent piece of geometry instead we'll do the same to fix the outlines around the mouth if you're not already using a vertex group you can go to your object data properties and create one using the plus button then if you go to your modifiers click on this field and assign it make sure to use a factor of zero and invert it by clicking on this arrow icon on the right to paint make sure to click on your vertex group then click on object mode and change it to weight paint we're going to change the brush to add use a weight of 1 and a pretty low strength now we can start slowly adding influence you don't want to add too much just enough for the glitches to disappear now you see if you switch to object mode the glitch is pretty much gone alright so that about covers the basic setup now pass this over to carl and in a few moments i'll show you how you can use shape keys to sculpt different mouth shapes and how to add bones and waiting for animation all right so now that we have our boolean we want to be able to animate it in all the different shapes that we want so to do this we're first going to need an armature with a basic bone system that can contain all of our setup so let's create it but before anything we'd like to give a huge shout out to pierre pico and his rigging tutorial series called the art of effective rigging that contains everything you need to know if you want to dive into the rigging world in blender some of the techniques i will show you today are definitely inspired by his way of approaching raking alright so to create the armature of your character first make sure your cursor is set at the world origin by hitting shift s then select cursor to origin then go to add and select armature in your outliner you can see an armature was now created as i said before this armature will contain all of our animatable bones so first let's rename it ballista armature our character's name then hit tree on your numpad or hit the x-axis on your navigation gizmo to enter side view with armature selected go to object properties then viewport display and make sure that the in front option is checked this will allow us to always have the armature in front of the geometry so we can see all the bones that we create from every angle so now to create the bones for the head setup press tab to enter edit mode select the root bone and hit shift d to duplicate it and move the new bone at the neck position we can rename it control neck and name the root bone root if you press control tab and select pose mode then hit r to rotate it we can see that bones rotate from the head and not from the middle of the bone so we need to make sure that its head is positioned where we want the neck to rotate now select the tail of the neck bone and move it at the head's rotation center with the bone selected hit e to create a new child bone for the head we'll also need a jaw bone to be able to open and close the mouth of our character so select the head bone and hit e again to make sure the jawbone follows the head as a child select it first then the head bone and hit ctrl p to parent them with keep offset so that the jawbone stays where it's at and doesn't jump at the tailbone of the head now if we enter in pose mode we can see that our parenting works perfectly we can now rename our head and jawbones accordingly so control head and control jaw the next thing we want to do is make these bones influence our geometry when we move them around in pose mode so we'll need to assign influence or weight to each vertex of the geometry to make sure we see perfectly what we're doing we'll go in the top right viewport options here and switch the shading mode to solid then click on the down arrow and select flat in object mode we can then select our face geometry go in object properties and check wireframe that way we can always see the vertices of the geometry we'll be working on okay next to clean up a little bit our interface go in the modifier panel and deactivate the boolean modifier we'll come back to that later lastly select the armature and only the face geometry and hit shift h to hide everything else in the scene now to attach the face geometry to the armature make sure you're in object mode and first select the geometry then any bone press ctrl p and select armature deform with automatic weight in the modifier panel make sure the armature deformer is on top of everything now with your geometry selected if we go inside the object data properties menu on the right we can see that four new vertex groups have been created all named after our bones press control tab and select wait paint so we can see what's going on here if you flip through the vertex groups you can see a color code that indicates how each bone affects our geometry blue means not affected at all and red means a hundred percent affected this approximation was made using the automatic weight option just a minute ago but to make sure our head deforms properly we'll need to paint and adjust the weight of each bone manually to do that a technique i like to use is to set animation keyframes go back in object mode select your armature and go in pose mode using control tab select all your bones and press ctrl r to change the rotation mode to x y z euler for all your bones at the same times which is a way easier rotation mode for animation than the base quaternion if you now select the head bone and hit n to open the item right menu we can now see that we are in xyz euler mode also make sure you rotate in local mode by selecting the option in this middle top menu now to set the first keyframe make sure you add frame 0 in the timeline hit i and select rotation now move to frame 10 rotate the add bone forward and x axis and hit i again to set a new keyframe now move to frame 20 rotate the head back and set another keyframe finally go to frame 30 reset the rotations by pressing alt r and set a new keyframe you can do this for all three different axes to ensure the influence works best in all directions now back in object mode select your geometry and with control tab enter in the wait paint mode in the vertex group menu on the right click on the control neck vertex group if we scrub through our timeline we can see that the head and jawbones both have influence on the upper body that we don't want before starting to paint anything we'll make sure auto normalize is checked in the upper right brush option menu this can also be found in the tool menu when you press n this option is very important because it will ensure that no vertex has more than 100 influence from all combined bones so say if i were to add influence on a vertex for a specific bone it will automatically remove it from other bones at the same time to keep the influence to 100 percent also if you have a symmetrical model like us another thing you want to turn on is the vertex groups x symmetry option and the symmetry tab in the tool menu this will mirror everything we paint on one side to the other now in the upper brush menu always set your weight to 1 and use the strength to set the strength of your weight paint brush in this case we'll use one and paint all the torso to make sure the head and jawbones don't influence this area you can set your brush to add and start painting the torso hit f to adjust the size of your brush then left click to confirm alright great now if we play through our timeline we can see the behavior of the torso is much better we can then switch between different vertex groups to refine our weight paint with the add brush or the subtract brush and do the same animation keys process to paint the neck and jawbones we will also need to create both the upper teeth and bottom teeth bones as well as the tongue bone chain and weight paint their influence on our geometry using the same techniques shown before just make sure the upper teeth bone is the child of the head bone but the bottom teeth and the tongue bones are parented under the jaw bone so they follow it when it moves okay now that all our bones are created and weighted let's attach both our left and right eye setups to our armature so that the eyes follow the head when it rotates press alt h to unhide everything and go back in rendered mode in the outliner select the ballista eye left master and go in object constraint properties on the right menu click on add object constraint and select child of the child of constraint is very versatile but in our case we use it to make parenting possible between object mode and pose mode rays so select ballista armature as target and then control it as bone the eye setup will now get moved somewhere very far in our scene because of parenting issues that can be resolved easily by pressing the set inverse option and that's it now if we go in pose mode we can see the irig follows the head properly and if we go back in object mode we can animate the different objects driving our eye setup easily as for the right eye we can redo these steps or we can simply copy the constraint we did from the left eye to the right eye to do so go in object mode select the ballista eye lift master then ballista i write master objects open the object menu on the top left of your viewport select constraints then copy constraints to selected objects if we now select the right eye we can see the constraint has been properly copied okay so now what we want to do is transfer the vertex weight we painted for the jawbone from the phase geometry onto the boolean object so that when we open the jawbone the boolean will follow and make the mouth open and close to do that first select the boolean object then the armature in object mode press ctrl p and select armature deform with empty groups then still in object mode select the face geometry then the boolean shape and with control tab enter in wait paint mode select weight in the upper left corner then transfer weight in the pop-up menu that appears make sure to switch the source layer selection from active layer to by name we can now reactivate the boolean modifier on the face geometry and go back in rendered shading mode the boolean now follows a jawbone when we open and close it in pose mode you can always refine the weight paint on the boolean object itself if the transfer weight didn't do its job properly if you'd like to make different mouse shapes to diversify your character's facial expression or be able to make them talk we'll need to create what's called shape keys in this case we'll create the o phoneme select the boolean object and in object data properties just under vertex groups you'll find shape keys now hit the plus button on the right to create the basis shape key this shape key will be our base shape so we won't modify it now click again on the plus button and this will create our first shape key we can rename it o and change its value to 1. now go in edit mode by pressing tab enable symmetry in the x-axis with this top right option and sculpt the desired o shape in either scope mode or edit mode in edit mode we can activate proportional editing by pressing o or clicking in this top menu now if we select the vertex and move it it will move adjacent vertices using a custom falloff that you can change by scrolling on your middle mouse button when we're happy with our o shape we can now play with a value from 0 to 1 and see how it changes our mouth in this tutorial we only show you how to make one shape but you can make as many of these as you want depending on your character's needs okay so now that our first shape is created let's see how we can easily animate its value from 0 to 1 by creating a simple facial panel with sliders so let's start by hitting 3 on our numpad to go inside view select our armature in object mode and go in edit mode by pressing tab then select any bone and hit e to create a new bone then select it and hit alt p and clear parent to unparent it now move the bone just in front of our character's face in side view then press 1 on the num pad to go in front view and move it just a bit on the right we'll call this bone control mouth o if we open the item menu basically what we want to do is when the location x of this bone moves to the value of 1 we want our o shape key to activate in pose mode select a bone go inside the bone constraint menu and add a limit location constraint change the owner space to local space make sure to check the effect transform then we'll set a minimum of zero in the x axis and a maximum of one we'll also check the y and z axis and leave them at zero in both minimum and maximum now if we move our bone around it's going to be limited to only move from 0 to 1 in the x axis great now all we have to do is to make this bone drive the o shape key value in pose mode select the bone right click on its location x value and select copy as new driver go back in object mode select our boolean mesh then in the shape key editor right click on the o value and select paste driver so now if we move your switcher bone in pose mode the shape key is activated next let's make a new bone that will make our mouse switch from the geometry line to our boolean open mouth in side view and in edit mode hit ctrl d to duplicate our first bone and z to lock the z axis then move it just a little higher we'll call this bone control mouth switch because this is a duplicate of our first bone the limit location constraint should already be there now just as we did before right click on its location x value and select copy as new driver then in object mode select the face geometry go in the modifier panel and right click on the display option of our mouth boolean modifier and select paste driver if we now move our switcher bone it activates and deactivates our boolean mouth modifier okay finally to make our geometry line mouth appear when the boolean is deactivated back in object mode select the mouth line geometry and object properties under visibility right click on the show in viewports option and select paste driver again we can now use these controllers to easily switch between a line and a boolean mouth and also activate our shape keys when the mouth is opened if you want to have more control over your mouse shapes and make them asymmetrical you can add simple bones around your mouth that will influence the boolean geometry in side view create a new bone and position it at the top of his mouth shape then rename it control mouth up duplicate it and move the next bone to the bottom of the mouth and name it control mouth down now in front view duplicate the bone again and position it on the left side of the mouth we can name it control mouth dot l now let's parent the upper bone under our head bone and the lower bone under our jaw bone so that when we open the jaw the upper bone stays in place and the lower bone follows the jaw for the side bone we want it to always stay right in the middle of our upper and lower bones and for that we'll need to make a simple constraint setup in edit mode make sure your transform pivot point option here and the top menu is set to individual origins then duplicate the side bone and scale it up a little and repeat this process once more the first one will be named setup mouth jaw follow dot l and the second one set up mouth head follow dot l parent the jaw follow bone under the control mouth down bone and the head follow bone under the control mouth up bone now we can go in pose mode select our initial left side bone and in the bone constraint menu add two copy transform constraints for the first one we will constrain our bone to the head follow bone leaving the influence to 1. now for the second constraint we want the target to be the cha follow bone but we'll change the influence to 0.5 now if you go in pose mode and play with the cha and the upper and lower bones we can see our side bone perfectly stays in the middle of our upper and lower mouth controls because our sideboard now has transformed constraints we just need to add a child bone under it so we can animate it and it's this child bone that will contain the influence that we'll paint later on so back in edit mode let's rename our initial side bone control mouth parent dot l then duplicate it and right click and rename the new bone control mouth dot l then let's parent the new bone under the parent bone and in pose mode delete all of its constraints for the right side of the mouth go in edit mode and simply select all of our four bones right click and select symmetrize this will automatically copy all our setup and constraints to the right side because we initially named our bones with the correct extension dot l which blender recognizes as left side we can now go in pose mode and hide all of the setup bones using h and just leave the controllers visible make sure to also go in the bone properties panel and uncheck deform for all these setup bones since we don't want them to have direct influence on our vertices lastly we need to make these four bones influence the boolean geometry in object mode we'll select our boolean geometry and change its display to textured we can also temporarily deactivate its subdivision modifier this will make the weight painting process much easier we will also need to manually add our four new mouth bones to the vertex groups of our boolean geometry since they were created after we attached the geometry to our character's armature select your boolean geometry then in vertex groups click the plus sign on the right 4 times this will create four new vertex groups we now just need to change their name with the exact same names as our mouth bones so blender understands we want to connect these new influence vertex groups with our already created bones now all we need to do is use the same animation keyframes technique shown before to properly paint on each mouth controllers but this time make sure auto normalize is turned off before painting anything that way you'll be able to keep the weight we originally painted between the head and the jawbones so our boolean shape still follows properly when we open the jaw but we'll also add this new weight on top of it so that in the end each vertex will have more than one hundred percent influence between all bones also to make sure we don't affect the painting we already finished on the other bones make sure to lock all their vertex groups with auto-normalize unchecked you can now really customize how you want your controllers to act for the animation process you can then repeat this process for the mouth line geometry for when the mouth is closed this time using only the left and right controllers to help create simple and asymmetrical 2d expressions if you'd like to change the appearance of your controllers you can do so by creating a custom mesh object or a curve object in that example that we convert to mesh by right clicking on it then in pose mode select your bone and in the bone properties panel under viewport display and custom shape select your newly created object as a target if the bone shape isn't in the desired angle and position go back to your source object and in edit mode press r then x then 90 scale it down a bit then offset its position a bit backwards now back to the bone you can see it is a bit in front of the geometry making it easier to select to change its color make sure you're in pose mode select the bone and in the object data properties menu under bone groups hit the plus sign on the right and choose its color using the different color sets already available or create your own using the custom color set then make sure to hit assign with the bone selected alright so that covers everything regarding our custom 2d looking facial rig we've worked really hard to come up with this so we're really glad to finally be able to share it with you again you can now get our eyes set up for free on our gumroad page by clicking in the link in the description below as always if you have any question or comment make sure to let us know in the comments section and don't forget to subscribe to stay tuned for our next tutorials to come until then see you next time
Info
Channel: Lightning Boy Studio
Views: 110,313
Rating: undefined out of 5
Keywords: Lightning Boy Studio, Dinomancers, Official Lighting Boy Studio, Lightning Boy Shader, Lightning Boy Shader 2.0, Complete character tutorial Blender, Character Tutorial Blender, Toon Shaded character blender tutorial, Beginner guide for modeling in Blender, Carl Lightning Boy Studio, Blender Face Rig Tutorial, Blender Facial Rig Tutorial, Lightning Boy Face Rig, cartoon face rig tutorial, cartoon face rig blender, boolean face rig, boolean face rig tutorianl
Id: C4jkUtfbbbE
Channel Id: undefined
Length: 34min 4sec (2044 seconds)
Published: Tue Mar 16 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.