Simplified cartoon eye rig in Blender

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi everyone eric from p2 design in this video i will show you a method to rig non-spherical eyes so that you can use them for cartoon characters for example [Music] most of the time we will have to rig spherical eyes and this is not really a problem but when it comes to cartoonish character or anime character you will probably have to distort those eyes using a lattice for example the problem is that it will also deform the iris unless you go into very complicated rigging solutions in this video i will show you a different solution and two ways to achieve it let's get started we will start with a procedural eye texture using gradient in the second example i will use picture based texture whatever you choose doesn't really matter as the main focus will be to manipulate the texture coordinates we will start simple using a simple plane by default it's already uv unwrapped since the solution is shader based i will create a first material with my principal shader selected i will press ctrl t to add a texture setup i will get rid of the image texture node and i will add a texture gradient texture by default it is set to linear i will switch to quadratic sphere so that we have a rounded gradient note that i'm using ev here and i've set my viewport to material preview to be able to control the gradient i will use a map range node it's more convenient than using the classical gradient node if i increase the from minimum value it will shrink the gradient in the mapping node when using the point method for mapping the coordinate seems inverted as to move from left to right for example you have to dial the x value into the minimum we can switch to texture type and then it will behave more intuitively now that we have a proper mapping method we can go ahead and add a gradient just after the map range that will allow us to input a bit of color i will go for a simple blue eye with a black pupil and then i will offset the coordinates so that it's right in the middle of our plane we now have our base eye texture let's go ahead and build the mechanism to rig the eye i will be using an armature i will create a first bone that will be our root eye since naming and axis will be quite important i will display them in the viewport but first in edit mode i want to align the bone with the wall space so i will go into init bone snap the tail to the head and move it on the y-axis it's a personal preference this way the bone is aligned with the wall space so it make its animation curve easier to read i will then create a second bone by simply duplicating it that will be our control iris since we won't be deforming the mesh i will simply go into object mode and select the armature and parent the object directly to the root bone now i will create a couple of drivers that will allow us to modify the coordinates using the ctrl i so i will select my eye object and pin the shader so that whatever we are selecting it will be displayed into the shader edit on the x location of the map pin node i will right click and add the driver i will keep it on script expression we will get rid of the expression and only keep the variable the variable will be the amateur and the bone x location in local space i will select control i x location local space since the controller hasn't moved the eye is snapped to zero let's edit the variable and add plus 0.5 and now it's back to the middle off if i now move the controller from left to right we can see the iris moving too but there is a clear offset between the controller movement and the iris movement because the values that are used are the local space of the bone and this is because we are using relative movement the movement of the bone in space to control absolute coordinates the uv coordinates that whatever the size of the object or its shape will go from zero to one to make those two matching we simply need to re-edit the driver and add a factor onto the variable so i will simply add a 0.35 multiply variable plus 0.5 we don't need to add parenthesis because the multiplication always occur before the addition or subtraction so you will just have to find the right factor by trial and error now i just need to repeat the process on the y-axis so i will simply copy the driver and pass it and then instead of the x-location of the bone i will be using the z-location of the bone to scale the iris we will simply source the x scale of the bone and the z scale of the bone for the y axis you can use whether average value or simply tip the script expression and remove anything from the variable but its name just repeat the process for the y scale of the mapping node using the z scale of the bone we will go a little further now by allowing us to control the iris and the pill separately i will just add a couple of custom shape to the rig to make it more readable then we will duplicate our gradient shape from the mapping node and we will get rid of the black color in the first gradient and use only the black in the second gradient we can simply mix those two color using a mixed rgb set to multiply we will multiply the peel onto our base blue color to make things simple instead of using a new mapping node i will simply play with the map wrench node we've seen before that playing with the from minimum value will increase or decrease the scale of our gradient so i can simply create a new driver on this input i will create a new bone to control the iris and then i will drive this value using this new control bone the higher the map range from minimum value the smaller the ppl so it doesn't make this controller super intuitive but if we modify the driver by using one minus variable then the higher will be the variable the smaller will be the result and so we will have a more intuitive behavior and we've just achieved our first irig if you now want to use this kind of thing on a non-planar shape you simply have to go into edit mode and unwrap your shape using project from view then in the uv image editor just scale the object so that it fills the uv space as wanted this way the iris is projected onto the uneven sphere without distortion you will get distortion only if you reach the outer edges of your object but it should be covered by the eyelid of your character for the next example i will be using a pixel texture so it's gonna be an iris and a peel drawn onto a transparent background so i will create a new shader and get rid of everything and load this picture this time to manipulate the uv coordinates of our texture we will be using the uv warp modifier i will start fresh with a new ring creating a root i bone i will parent the object to this bone and then into edit mode we need to create a first bone that is going to be our reference bone this bone won't be manipulated but it will serve as a reference for the origin of the uv wire i will create a second bone that is going to be our iris controller and blender will compare the eye reference with the control iris to drive the uvs we can edit the modifier in the from input add our i reference and in the 2 input add our control iris from there it's pretty straightforward as soon as i remove the control iris the texture will be moving but we can see that it's repeating you won't have this problem with procedural texture but since it's an image texture we can go into the shader and switch from repeat to clip we still have the same problem as in our previous rig to saw the texture is not perfectly following the controller ball note that my bones are aligned with the uv space meaning that the y-axis is pointing up and their x-axis is pointing to the right to make our texture following properly the control bone what i will do is create an intermediate bone that i will call mch iris and we will use this bone to drive the modifier from there this mch iris bone will be controlling the warp in edit mode i will parent all of those three bones to the root bone so that they will follow it and then i will add a driver to the mch iris x location and y location the idea is to then use a driver from the iris controller with a factor to manipulate those locations until we reach a movement that is perfectly following the bone as usual it's a matter of trial and error to find the proper value to multiply the variable i will use the 0.35 we have used before and it should match properly now the mch bone move less than the controller but the texture fits the movement of the controller and so it feels more natural to manipulate this rig i just have to replicate the process on the y-axis and i'm good then a simple copy scale and copier rotation constraint will do the job regarding the scaling and the rotation of the texture the control bone is constraining the mch in this case we can also go a little further by separating the iris the pupil and maybe the reflection on the eyes using different image texture i will mix them together and then if i want to manipulate them using the uv warp modifier i simply need to duplicate the uv's data so i will create a new uv map and it will duplicate by default the previous one from there in the shader we can input those different uvs using an input uvs and we can source them in the list so i will use the secondary uv maps to drive the pupil then we can go into the modifier stack duplicate the modifier and set the different uv map as a source for each uv warp modifier then i will create a new bone that will allow us to drive this modifier this is going to be the control p and we will need also an mch ppl so the mchp will be the bone that will be input in the modifier to change its location we will simply copy and paste the driver from the iris so that the ppl movement will follow the iris movement and then i will add a copy scale from the control p pill onto the mchp l using driver and constraint allow us to input an information into the uv warp modifier if we were using parenting this wouldn't work because whenever you're moving a parent to child follow but it's local location or whatever transformation doesn't change and so there is no information input in your modifier if you want to go further then you just need to create a tracking mechanism for example so that you can create a target bone and the eye will follow the only thing to think of is to offset the center of rotation so that it more or less slide onto your deformed eye you can learn how to create eye trackers in the art of effective rigging course from there you can work to improve the shader and if you want to have real geometry you can use true displacement for example in cycles while this method has its limitation i think it's a cool solution to make cartoon irig the easy way i hope you've enjoyed this video and i will see you very very soon you
Info
Channel: Pierrick Picaut
Views: 47,804
Rating: undefined out of 5
Keywords: blender3D, modeling, shading, rigging, B3D, p2design, sculpting, digital, animation, cartooning, rendering, CYCLES, tutorial, Pierrick, Picaut, Pieriko, 3D, Computer, Graphic, blender, eevee, VIDEO GAME
Id: hHDkD9UVYVE
Channel Id: undefined
Length: 14min 26sec (866 seconds)
Published: Tue Jun 23 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.