Snake ground matching rig and animation in Blender

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hi everyone this is eric from p2 design a few weeks ago i've shown you a breakdown of noira's latest trailer featuring the queen kalinga and earth and tackle animation sliding on the ground in this video we will reproduce the same effect using a snake together we will rig it animate it and make it stick to the ground let's scroll in [Music] this model was taken from sketchfad and i totally removed the existing rig and adapted the model for this demonstration you will find the link in the description the mesh is now almost perfectly straight before i start trigging it i will make sure that all the transforms are applied by pressing ctrl a and selecting all transform with our mesh ready we will add an armature so i will press shift a and add a single bone in the armature properties i will make sure that i display the name of the bones but also that the bones are shown in front of everything and i can see their axis and i will go to the object properties and i will display them as wires so that we can see through them with the armature selected i will press the tab key to enter edit mode then f2 with the bone selected to rename it root i will select the tip of the bone press shift s to snap it to the cursor and then pull it along the y axis then i will switch to side view i will duplicate this bone and make it the head bone i will roughly place it on the base of the head and then move its tip on the nose of the snake i will press f2 and rename it def underscore head i use the prefix def for deformation modes from there i will select the head of the bone press e and y to extrude the new bone along the y axis i will make it as long as the snake to get smoother transformation we will convert this bone into a subdivided b bone in the armature properties i will switch the display mode from octahedral to b board then in the 3d viewport i will press ctrl alt s to make the bone a little thinner it's just for visual comfort it doesn't affect the way the bone works from there in the bone properties i will go to bendy bones and i will increase the number of segments to six we can see our bone subdivided but this is still a single bone in the armature properties i will switch back to octahedral and then in the 3d viewport with the bone selected i will right click on it and subdivide it seven times so that i get eight bone in total the way you display the board whether it's octahedral wire or b-bone doesn't affect the way they work now i will rename all those bones calling them death tail and give them a number you can batch rename bones using ctrl f2 i will enable my bone with the prefix d e f and then give them a number from 0 1 to 0 8. then i will parent the head bone and the first tail bone to the root bone all those newly created bones are also subdivided b bones since we have subdivided an existing b-bone i just inherited its properties if i now rotate the chain in pose mode we can see we get a nice curvy shape but that you can't use deformation b-bones for game rigs our rig is finished let's skin our model to keep the process quick and easy i will select the root bone in pose mode go to the bone properties and uncheck deform this will prevent the mesh from being skinned to the root bone i will then press ctrl tab to get back into object mode select first our mesh the snake and then the rig and press ctrl p with automatic weight i can now press ctrl tab to get back into pose mode rotate and test some of the bone to see if the mesh is deforming properly to be honest the result is satisfying enough to go ahead with this presentation a little tip i generally use individual origin whenever i'm manipulating my rigs this way all the bones can be individually rotated at once if we have a closer look to the head we can see that its z axis is pointing to the right fix this i will press shift n in edit mode and recalculate the role of the bone using global z-axis also it will be more convenient if the head rotation was influencing the tail rotation to fix this i will simply parent dev taylor 1 to the depth head one last thing i'd like to fix before we dive into the animation is the rotation mode of the birds by default they are using quaternions but since we are going to rotate only around the z-axis using euler rotation is going to be way simplier in post mode select all the bones and press ctrl r and choose the first euler order if you want more information about bonus rotation check out this tutorial if you want to learn character creation rigging and animation and take your skill to a professional level you will find extensive and top rated blender courses on p2design.com hundreds of professionally edited video shipped with all the models rig and blender files use the code p2 design to get 10 off on any of the courses in pose mode i have opened the graph editor i have my head bone selected and on frame 0 i will insert a keyframe for the rotation of the head since i want to create a 80 frame cycle i will set the end of the animation on frame 79 because frame 0 and frame 80 will be the same and i will insert another keyframe on the rotation channels of the head i will go back on frame 0 and i will try rotating the head by 45 degrees on the z axis for this first key i will enter a value of minus 45 and insert a key then i will duplicate the key on frame 80 since the first and the last keys must be the same and then right in the middle on frame 40 i will insert a value of 45 degrees and insert a new keyframe in the graph editor i will select hold the curve and press shift e and add a cyclic modifier from there to quickly animate the entire snake i will select all the key and press ctrl c to copy them then i will go back on frame 0 select all the tailbone and insert a keyframe on the rotation channel and we then select the head bone go back into the graph editor and select all the curve with the a key then copy all the curve with ctrl c select the first tailbone and press ctrl v in the graph editor now i will again select all the curve and press shift e to add a cyclic modifier from there i will simply press g and x to offset the curve in time until i'm satisfied with the offset between the head motion and the first tailbone in my case it seems that an offset of 21 frame is pretty good now i can copy my curves select all the other tail bones go back on to frame 0 and press ctrl v to paste the curve on all the tailbones now we can see the whole chain kind of rolling on itself but now we will be able to offset each curve one by one in time along the x axis to get our snake motion in my case my first tailbone was offset to frame 22 so i know i have to offset all the other tailbones from frame 22 so i will select them all select all the curve and offset them around frame 28 then i will unselect the first bone in the chain and offset all the curves of the remaining boats and i will go ahead like that along the whole chain of the snake basically the trick is to offset more or less the timing of each bone compared to the previous one then you can experiment by scaling all the curve in the graph editor along the y-axis to increase the amplitude of the snake motion you can also scale them along the x-axis to increase or decrease the speed of the motion this method needs a little bit of practice but once you'll be comfortable with it's a good way to get different results with ease and without building any complex trick to get a more believable motion we need our snake to be able to move forward but also left to right in the graph editor is open you can press ctrl tab to switch to the dupe sheet and then choose the action editor and name your first action from there you can switch to the nla editor and push down the action onto a new strip since we are using a cyclic modifier we can go down into the action clip option and increase the end value to whatever fits you so that our animation lasts longer i've arbitrarily chosen a value of 800 frames the animation is repeating thanks to the cycling modifier i will now switch back to the dope sheet and i will create a new action that will allow us to move our character forward to do so i will input motion in the root bone once i've created this new action i will simply key the location of the root bone my previous cycle was 80 frame long so this new action will also be 80 frame long so to get started i can duplicate my keys and move them on frame 80. what i want to achieve now is the left or right motion of the snake while it's moving forward adding this motion to the swinging animation we already did will bring better results so i will go on frame 40 and i will offset the x value the right value to 0.5 meter and then on frame 0 and frame id i will go for minus 0.5 meter when i now play the animation we can see that this left right motion doesn't fit that's not a problem i will switch back to the graph editor i will select the root bone select the x location curve press shift e and add the cyclic modifier this way i will be able to offset the curve and try to match the left to right rotation of the head one trick is to copy the curve of the z rotation of the head and paste it on this x location motion that the curve variation should match and you should get a better result a little faster in this case i just tweaked my value by hand it's also a good practice to manipulate the curve in the graph editor so that you get a bit of training now that our cycle is completing we need our snake to move forward so we'll use the y location i will set the end of the timeline to frame height and red i will make sure that i only have a starting and ending keyframe on the y-axis from there i will push down my curve on frame 800. i will press t and make the interpolation to be linear so that our snake is moving at a constant speed now i just need to tweak the value of the y location channel until the motion feels right as before there is no given value you need to try and see if the motion of your snake feels right i can now open the nla editor and push down this newly created action by default this new action is replacing the previous one but since it's only affecting the root bone and we didn't animated it on the first action you should see both action combined i quickly created the ground and my snake is going through the ground while i like it to slide on it we are going to store the motion of our snake into empties and then modify the motion and rebake it onto our rig so we'll create a new empty in object mode for each joint of our snake one for the head and one empty pair joint in the tail once done we will add a copy transform constraint to each empty at the target we'll use the armature and as a subtarget we will use the corresponding bone the head mt will be constrained by the deformation head bone the empty tail 1 by the deformation tail 1 etc in the end each empty will be following the corresponding bone whereas of use i advise you to move all your empties into a dedicated collection then select them all press f3 and search for bake click on bake action choose only selected bone visual canes and clear constraints let blender calculate and in the meantime if you're entering my content don't hesitate to give it a like and subscribe this will be of great support and will help me growing the channel after a little while all the empties have lost their constraints and have a dedicating action when playing the animation it still feels like the empties are following the snake now we want our empties to slide on the ground so i will select the first empty and i will add a shrink wrap constraint as a target i will choose the ground which is currently called plane so i will rename it grounds that it's less confusing for the wrapping mode we will choose project and we will check the project opposite option this way we are sure that the empty will be projected onto the surface of the ground even though its original position is upon or bottom the surface and i will then repeat the process for each of the empties add a shrink wrap constraint targeting the ground use the mode project and check opposite project once done all the empties will be sliding on the ground while our snack will still be clipping in the ground let's fix this to make the bones of the snake following the empties we simply need to add a copy transform to each bone targeting the corresponding empty i'm done if i move the empty we can see that the bone is following i will repeat the process with the tailbone select tailbone number one in the bone constraint menu i will add the copy transform constraint i will target the empty tail one and now tail one is following dmt called tail one but i want it to stick to the ground and point at tail two to do so i will just add another constraint that is going to be a stretch 2 constraint and i will target tail 2. with this method the bone called tail 1 is following the empty tail 1 and is pointing at dmt tail tube i will repeat the process along the bone chain now we can finally see our snake crawling on the ground the head is clipping a bit with the ground and i like to fix this little detail do so i will select the head empty and i will slightly increase the distance but the head is going below the surface to fix this i will simply choose above surface in the snap mode a head will pop above the surface and i can fine tweak the distance to have the head sliding on the ground i will repeat the process with the first tail empty to get a smoother transition between the head and the tail when we're done our snake animation is finally done if you are happy with the animation you can go back into pose mode select all the bones and bake the action make sure you click visual keying and clear constraint and press ok blender will process remove all the constraint on our bones and it will create for us a brand new action a couple of weeks ago i shown you how to create an advanced tentacle rig the benefit of this trick was the tweaker bolts because you can directly add the shrink wrap constraint on them without using all the empties it did clearly requires more advanced rigging skill and this is how we polished the animation of the tentacles in nora's trailer you can see that the same principle can be achieved with a simple forward kinematic chain as for our snake rig this is the end of this video i hope you enjoyed it and i will see you in the next one [Music] you
Info
Channel: Pierrick Picaut
Views: 64,389
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, rig, animate, stylised, best, Blender, art, digital art
Id: SXjDOSdk0jo
Channel Id: undefined
Length: 16min 43sec (1003 seconds)
Published: Tue May 31 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.