How to make 2D character animation in Blender

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello and welcome to another blender tutorial  my name is Raymond Gabriel and today we will   be learning how to create 2d game or character  animation like this one I will be making one of   you want follow along you can download it from a  link in the description below this character is   probably created for a game art but I will be  using it in blender so it will be hard to use   it in this state and I have to assemble all  these pieces into one image using [ __ ] so   first off let's open [ __ ] press file then you  make sure that the mm size is 1920 by 1080 then   press okay go to where the lair is and press  the eye icon to remove black color now go to   where you save the character drag and drop the  first piece to move this layer you can use the   Move tool from here we'll be able to move now  repeat the same step use all the other pieces   now press file then export as okay now we have  it on a single image now go to blender press a   to select everything X to delete push shaft a go  to image then reference go to where you save the   character as you can see the character has been  reported and the background is transparent as   we have removed the black color and only left  the Alpha Channel to reset the rotation of the   image press Alt + R then press R to the tape then  X for the x-axis then 90 then enter press R again   inject the 90 and press G to move isn't that move  it above the grid like that Presi the next to move   it backwards a little what we need to do now is  create a mesh for each piece of this character to   do that you have to be on the right orthographic  view and not perspective so to change that press 5   to go to the orthographic and to go to the right  view you can just press alt when you go to this   view it will snap to the right orthographic or  from view go to viewpoint and select right and   to switch without a numpad between perspective and  orthographic you can go from view then select this   option for the next part I will enable an add-on  from edit preference and go to add-ons and here   search for extra and make sure that you have this  pattern enabled add mesh extra objects then save   preference what will this do it will add new  meshes when you press shift a you will now have   this single word mesh that you can add for shift  and right click to change the location of the 3d   cursor this is where the new missions that will  be added to press shift a go to mesh then single   bird then add single word that will add a single  vertex which rules in can press e to extrude   and that will extrude another vertex from it will  repeat that until we have traced this whole piece when you get to the first vertex check to  select one of them then checked on left leg   the other one to select both of them then  press Alt + M to merge these two vertices   you can press add Center and they will both  be merged at the center or you can press F   to fill this gap with a segment now press a to  select all the vertices then press Alt + F to   fill it with a face make sure that you press  Alt + F not just F because that would create   a blank face out + F will create a face with  segments in between right click and select   subdivide that will add vertices in the middle  of these segments which is exactly what we want   because to be able to animate correctly you  have to get a lot more vertices so from the   subdivide menu go to the number of cuts and  change it to something like 10 press tab to   go to object mode I will repeat these steps  again for each piece I have for this character now I have a mesh for each part of this character  what I need to do now is put the image that I have   here as a texture on top of these meshes to  do that we first need to add the material so   go to the material tab from here and then press  new go to the corner of the viewport here until   you see the white crust press and drag to split  the viewport in the tool then from here select   shader editor this is where we can manipulate the  material of the mesh what you see but by default   is this principal V SDF node and in it there  is the base color of the of the material to   be able to see the material in the viewport you  have to go to the viewport shading from here so   let's go to viewport shading and as you can see  the scene is dark that's because we don't have   light in the scene so let's add it very quickly  just a thin light select Sun move it by G then   rotate towards D character like that maybe go to  de settings of the Sun and change the strength   to fight now let's return to the material and now  if I change the base color you will see that it's   changing in the viewport but I do not want it  as a basic color I want it to be this texture   so to do that I have to add the texture here as  a node press shift a then go to texture and add   image texture from here you can select previously  added images and we can select the character now   we can connect the color to the base color but  now we cannot see anything because blender do   not understand how to wrap this image on top of  the mesh and all we can see is a black color so   we need to unwrap this mesh and create a UV map  for it to do that you have to first split this   view into two parts again then go to here choose  UV editor to unwrap any mesh you'll have to go to   edit mode by pressing tab and select everything  by pressing a and press u that will give you the   unwrapping methods that you have if you press  unwrap from here you will see the UV map that   has been created but as you can see that UV is  not oriented correctly and it's in a different   scale so to unwrap this mesh exactly as it is in  the viewport you can press u and select project   from view that will project the mesh exactly as  you see it in the viewport now you can just move   it and press it where the chest piece is to be  able to do this method faster without having to   manipulate the UV here you can just create the  camera so press shift a then select camera press   alt R to remove any rotation on the camera then  press R the next 90 are dead 90 then G X and move   it backwards like that press 0 on your numpad to  go to the camera view or you can press view then   camera then active cover now go to the settings of  the camera and change the type from perspective to   also graphically now we need to fit the bounds of  the camera to the balance of the image move it by   pressing G make sure that you have it selected  and then from the orthographic scale you can   press and drag and press shift to slow down the  increments keep scaling until you have it then   press G again and try to fit it as much as you  can it doesn't really matter at this point as   long as more or less the same bounds now if we  press tap and go press you when we project from   view it will respect the borders of the camera and  that will create a UV at exactly this part of the   image so we can now just select all these pieces  by pressing shift and go to tab and then press you   then project from view but we still need to add  the material that we have created so go to the   material tab and from here select the material we  have created for the chess piece you'll see that   the corresponding part of the image will appear  on the mesh because it's unwrapped correctly in   the same position as it's in the image behind  it as you can see there is still a black border   around the pieces of the character that is the  Alpha Channel which is supposed to be transparent   and not black so what we have to do is connect  the Alpha output of the image from here to the   Alpha input of the material so connect the Alpha  to the Alpha now go down in the materials tab keep   going down until you see settings and then from  the settings change the blend mode to alpha clip   now the black border is transparent okay now we  don't eat the reference image you can now delete   it what we need to do now is assemble these  pieces we can just move these parts like that but the problem is now that the parts of the  character is overlapping on each other so we   need to move it on the x-axis any movement on  the x-axis will not be seen in the camera because   we are in orthographic view so we will not be  seeing any movement along the third dimension   we are creating a 2d character so any movement on  the third dimension will not be seen so select a   piece and then press G text try to move them as  far apart from each other as you can now we have   the character assembled and ready to be read  to wreck the character press shift and right   click on the torso piece you will see that the 3d  cursor is now snapped on top of this part of the   character when you press shift a anything you will  add will be added on top of this mesh so we need   to add the skeleton or armature so press shift  + select armature that will add a single bone   for this piece as you can see the bone is being  hidden from the layers in front of it so we see   it at all times so go to settings here and from  viewport display select in front what will that do   is now we see the bones all the time leaving it's  secured with the layers in front press s to scale   this bone press tab to go to edit mode now press  e to extrude another bone ok we need to create   more bones for the other parts to do that make  sure that you press Shift + right click so that   the 3d cursor is snapped to the other part now  press Shift + I and that will add the new bone   the location of this part now press R to rotate  this bone make sure that the big part is at the   base or at the shoulder and the narrower part of  the bone is looking downwards like that press E   again and another one for the hand okay press  shift and right click on this as you can see   I am I'm always changing the view with the  middle mouse button to see if the 3d cursor   has snapped on the right part now press shift  a another one for the head shift and drag click   shift a scale make sure that you respect the  knee of the leg so create the bones like this okay perfect now let's test the bonus so go to  pause mode by pressing ctrl + tab go to pause   mode or from here and go to pause mode now when  I select any bone and rotate it it will be moved   and as you can see all the bones that have been  extruded from this one is respecting the rotation   of the first bow because it's now parented to  this bone if I press and select this bone and   rotate it all the bones after it is now respecting  its rotation but now as you can see when I rotate   the chest bone like that the head and the two arms  supposedly should also be moving with it so what   we need to do is parent these two bones and the  hair bone to the chest bone so go to edit mode by   pressing tab select this bone this bone and this  bone pressing shift and left clicking now the last   bone that you'll select is the parent bone make  sure that the parent bone is the last one selected   now press ctrl P and keep offset as you can see  there is that dashed line appeared that indicates   that these bones are now children to this bone  when I go to pose mode and try to move it these   bones are respecting its rotation now okay let's  do the same thing with the leg bones but now   parented to this base bone ctrl P and keep offset  now because we don't need these two viewports   I can go to the middle and press protect join  areas and I'll join these two parts right click   join areas now what we need to do is attach the  character to the bones so when these bones move   in the pose mode the mesh will follow it as well  so select all the parts by left-clicking and shift   and left shaking on all the other pieces now the  last thing you want to select is the bones itself   now press ctrl P and you'll get the parent menu  now select with automatic weights this is the   easiest way to attach the mesh to the bones what  we want to do is when I rotate it you'll see that   the character is now rotating let's test old  pull the parts but there is a problem here when   I select the arm bone and move you will see that  the chest piece is also moving which is not quite   what we want we only want these bones to affect  only the arm bone that is why I was telling you   to move these parts away from each other as you  can so these bones should not influence any other   mesh now if I do the same step again and select  every part and go to the parent menu control P   and select with automatic weights and try it again  now that has fixed the problem and the this bone   is now only affecting the arm not the torso but  you might also want the torso piece to be moving   with these bones a little as the shoulder bone  is moving and also you might want to change how   this bone is influenced the the bottom part of  the torso because it's now influencing it too   much so to do that you have to customize the  weight paint so to do that select the piece   you want to edit then go here and select weight  paint you can also press ctrl + tab and select   weight paint on this menu now the mesh will be  changed to this blue color this is where you can   customize your weight paint as you can see now  from this tab you will see all the vertex groups   with all the bones each one of them have different  weights affecting this part of the mesh as you can   see the first two bones are this on this bone  it's good practice to change the names of the   bones so you will be able to know which one of  these are corresponding to which bones in the   viewport so we first need to do that so select  the armature and press tab to go to edit mode   select the bone and then from this tab you can  change the name from here I will do that quickly okay now I have named all the bones let's return  select the part you want to edit and then go to   wait paint now if you go here you'll see all  the bones now have the right names to it if I   select the baseball you will see the influence it  has on the mesh but first we need to understand   what the color means the red color means 100%  influence the green means 50% and the blue means   no influence so the upper torso is affected in  the top part of the torso at the most but it is   also affecting the lower part of the torso too  much as you can see there is a green color here   so it's affecting by 50% which is not what we  want what you can do is change the weight from   here and now you can paint this part with the  blue color if you change it to one again and   paint you will paint with the red color press F  to scale the brush now to test that go to pause   mode and try to move this bone you will see now  that this part is not being affected with from   this bone which is right what we want we also  want this bone to be affecting the shoulder a   little so to do that go again to the torso  and go to white paint now from here select   the corresponding bone which I named at our upper  arm dot L which is this bone you will see that now   it's not affecting it at all and it's at 0% so  let's give it a little influence like 0.2 maybe now let's test it to go to both  mode and move it I think it's okay   for now let's do it for the for the  other arm as well let's paint here okay now that we have the character set up OD  reg set up we need to make it a little more   animation friendly so we can animate it easily  to do that we want to make controllers for the   arm bones and the leg bones so to do that go to  edit mode select the bone put the hand and press   Shift + D to make a duplicate of this bone go  to this tab and change its name to I clay just   called controller tell the controller bones have  to be free and not parent it to any other bone   so to unparent it press alt P or you can go to  this tab here and from relations can remove the   parent by clicking this X now this bone is free  and not parent it to anything okay now go to   this bone you go to pose mode control tap select  pose mode go to this tab which is the constraint   tab and from here add inverse kinematics now go  here and change the target to the armature we do   that the new tab will appear with a bone name  in it now select our key controller that you   have created now you can see this yellow line  appeared which is how many bones that will be   influenced by this controller now everything  is moving with it which is not what we want so   to fix that you have to change how many bones  that will be affected from this controller so   right now you have a chain length of zero this  is how many bones will be affected so zero means   all of the bones so it will try to go back one  step the first bone that will be affected will   be this bone and then this bone and then will  go to its parent which is this bone and then   this bone so all the bones will be affected we  own on this bone and this bone to be affected   from the controller so just change the chain  lengths to two one two now we see the yellow   line has changed to this bone when we select  the controller and press G you'll see that now   only the hand is is being controlled from this  controller but now the problem is the hand bone   is not respecting this bone and when I rotate  the I key controller the hand controller is not   moving with it I'm trying to simplify the wreck  so I can have only one controller at each end so   to do that select the hand bone then go to the  constraint tab then add bone constraint select   copy rotation from here select the target armature  and then from the bone select the ITA control and   that will snap this bone to duplication of the  ika controller now if I move it and then if I   rotate it the hand bone will also move with it  I will repeat the same steps for these bones you to return to the original position of the bones  you can press out our and algae to reset any   movement or rotation that you have done on the  on the bones so to reset everything press a to   select everything and press out our algae to  return every bone to its original location okay now that I'm done with all the controllers  let's test everything oh I have a problem here   where the lake is is is protruding out  of the torso which is not something that   I want I want the what is whatever is  wearing to be moving with the leg so   to do that I have to change the weight paint  again so select the part you want to edit go   to object mode select this part go to white  paint from here select the bone you want to   change the weights for which is the upper leg  which is this one and then change the weights there is another method to apply weights to the  mesh which is by vertex vertex paint not by just   normal brush painting so select here vertex  selection now you have all the vertices that   is creating this mesh appearing now press alt a  to deselect everything now press B for box select   now if you go here you will see this slider  appeared if you go to 0 and press the sign all   these vertices will now have 0-0 percent weight  let's try to up redo this paint again maybe we   want this part to move along with this we are  now done with the ringing we are ready for the   animation down there you have the timeline if  you don't have it split the viewport here and   choose it from here timeline how animation works  is when you want to move this hand maybe from   here to here like that we just need to set up a  keyframe and this location and another keyframe   at this location so simply while in this position  press I and that will get you the insert keyframe   menu select from here location rotation scale  that will save the location and the rotation   and scale of this bone in this keyframe as you  can see we now have this yellow diamond this   is the frame that you have for this position  of this bone now if you move the marker to a   different time let's say 24 and then change the  bone location here and the rotation for example   now press I again to insert another keyframe  and select location rotation scale now you have   two keyframes when you move the marker between  them you will see that the bone is now moving   from this location to this location if you go  here and make it another viewport select here   dopesheet from here you can edit your keyframes  a little more better than the timeline each bone   you have can be animated so if I simply go to  this bone move is frame 2 1 and then press I   then location rotation scale as you can see now  I have another bone the other eye key controller   now maybe change the marker first the location  of the bone then I location rotation escape now   we have these two bones move at the same time if  you want to change the time where this animation   is occurring you can just select the frame the  two frames in front of this bone press G to move   these frames now you can move it on the timeline  if I change it here for example now when I press   play you'll see that this bone starts moving  first and then when we get to this frame the   other bone will start moving as you can see here  these two leg bones have controllers so when I   move the base bone the controllers do not move  all the controllers are are at their location   and they will not be influenced with this bone  so when I move it they they are fixed in their   position which will make animation a little more  easier so now I can go to the first frame here   make sure that you have the bone that you want to  animate selected press I location rotation scale   it's a very simple animation lets you get the  idea so right now what I need to do is create a   ball that will be able to move the whole character  right now I only have the base bone which doesn't   control the I K and the I can control the lips  so I will create another bone if I go into edit   mode shift AE to create another bone and this  will be my main controller let's move all the   bones that I will not be using in my animation  to another layer so I will be able to select my   controllers easier make sure you have the right  bone selected press em and that will get you the   change bone layers menu and you can select square  from here and it will change the layer of this   bone select all your I click controllers and move  them to this layer also select the main controller   base bone the upper body and the head and move  them here now if you go to this tab you will   see all the layers that you have for your bones  if you select this layer you will only see your   controllers now I can easily select the baseball  the controller bones in the main controller the   last bone is the main controller so I can pair  into it control peak and select keep offset now   when I go to pause mode and try to move this bone  the whole character is now moving I can move it   here for example and move this this I have full  control over my caps without all of G and that's   it now that I've done with my animation if you  want to export this one out all you have to do   is go to this tab here the render tab as this  is a 2d render so you can change the sampling   to something like 10 so to render this out go  to this tab change the output folder from here this except now the output of the render will  be stored in this location you can choose the   file format from here PNG or you can also  change it to a video file I like to store   it as a PNG file and then move to another  video editing software and use the sequence   image sequence and make the videos there but  you can also use these formats as well now go   to render from here and press render animation  now the render will start as you can see the   frames there is one more thing I've got to  mention press escape to stop the animation   stop the render from here you can change  how many frames you want to render so from   start one to end 250 you will render a total of  250 frames you can change that to the maximum   of the frame that you have which is 33 i only  animated 33 frames so I can change the end to   33 and render animation again in your folder you  will have all the frames that you rendered or if   you have chosen the file format for video you  will have the video file I hope that you found   the video in this book if you did don't forget  to Like share and subscribe for more tutorials   like this to check out my last videos from  distance thank you for watching and good bye
Info
Channel: RG3D - Animation studio
Views: 30,787
Rating: undefined out of 5
Keywords: 2D character, rg3d, 2D character animation blender, 2D blender, 2d animation software free, 2d animation programs, 2d animation movies, 2d animation for beginners, blender2.82, blender2.8, blender tutorial character modeling, blender animation tutorial character, 2d animation, animation channels, 2.5d animation, blender 2d animation, sprite animation unity, blender sprite animation, 2.5d animation blender, blender 2d unity, 2d game art animation, game character animation
Id: H2AKBEDzXuA
Channel Id: undefined
Length: 34min 34sec (2074 seconds)
Published: Thu Mar 26 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.