How to Animate Hair with Hair Dynamics in Blender 2.91

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hey welcome to blender tutor i'm tom and today we're going to be going over how to animate hair using hair dynamics in blender 2.91 i created this animation using a free 3d scanned model from scan the world which has a ton of high quality free models to download so check them out link is in the description by the way if you'd like you can download this finished scene on my patreon at the 5 a month tier that tier includes all of the finished project files for my tutorials as well as material packs and other perks link is in the description all right so here is our finished scene and it is pretty heavy on my computer so i cannot scrub through it very easily but you could basically see how it's going to look in our scene versus what it'll look like rendered i just wanted to say that this tutorial is going to focus on hair dynamics not setting up the hair itself but let me know in the comments if you'd like to see a separate tutorial that does cover that so let's create a new project and make sure to just save okay so let's start with a simple setup first just so you can kind of learn the basics of how the hair dynamics work in blender and then we're going to go ahead and create the finished animation so we can delete our default cube and let's just bring in a uv sphere so once you've created your sphere let's just add a particle system right away and we're going to switch that to hair and make sure to click advanced right under hair let's go ahead and lower the hair length to one let's bring the number of hair strands up to fifteen hundred now you could turn on hair dynamics and if you press play first hit the space bar you can see the hair start to move already now the basic setting you're going to need for the dynamics itself is just going to be this the segment number right here so if you have it lower let's say it's set to three you can see that the hair is a lot stiffer and then if i bring this up to ten for one it's a lot slower because that's basically how many points in the hair strand that it could bend at you could see it also it's a lot looser so it just falls a lot more so depending on the look of the hair you want you can change that here's a little example video i put together so from left to right you have one with three segments one with six segments and one with 12 segments and you can see the more segments you add the softer the hair looks the one other thing i would want to show you before we get into the final scene is that to avoid the hair from falling through your object itself i would go to the physics tab and add collision that should help the hair not completely fall through the object you can see the hair is staying on the outside of it instead of falling right through it now and if we were to add some movement to our uv sphere you'll see how the hair dynamics work while moving so if you bring out this side tab go to the y rotation if you type hashtag frame and then divided by 10 they'll add auto rotation each frame and you could see now as the object is spinning the hair dynamics are moving along with that object that is basically all you need to know to get started so let's delete that uv sphere and if you want to use the same model that i used in my final animation you could go to minifactory.com scan the world i'll have the link in the description you could download this file it is completely free now once you have that downloaded just go ahead and import that so if you go to file import stl go to the folder that you downloaded to and go ahead and import that and once it's in it's going to be pretty big so i'm going to scale that down to like 0.1 and then if i'm just going to go into edit mode since the origin point is in the center of our 3d world i'm just going to move the model over in edit mode i'll look from above and then i'm going to rotate that let's do 45 degrees so david is facing forward towards the camera and i'll actually just bring the camera in this isn't necessary i just would like to have a camera view pointed at our model i'm going to do 1080 by 1080 for the resolution and i'm gonna back this up a little bit and then i'll just apply the scale to our model so hit ctrl a to apply scale and now one more thing i'm going to do is go into edit mode and up here let's go into wireframe mode and just hit c on your keyboard and we're just going to paint over his hair and we're going to create a vertex group to add our hair particles to and you might need to do this from a few different views since my camera's only going to be from the front you don't really need to worry about the back of the head too much that looks good though so now still in edit mode let's go over to the object data properties tab and under vertex groups hit the plus sign to create a new group hit assign and now you can exit out of edit mode because that'll kind of slow down your computer and now i'm just going to rename that group to hair cool so just to save on time before we get into the actual hair dynamics we're going to animate our model really quickly so we need to do two things first let's bring in a empty and just make sure that comes in at the center of your scene which should be directly below our model of david now click on our model go to the modifier tab and we're going to add two simple deform modifiers it's going to stretch them out at first but that is fine so the first one we're going to do is select origin and we're going to choose our empty because that's where we want it to be twisting from and we want it to be twisting on the z so starting out it's going to be negative 30 and that should be on frame one and now you can hit i to add a keyframe over that now let's go forward 30 frames set that to 30 positive 30 hit i now go to 60 and change that back to negative 30 and add a keyframe and you could see he's already kind of turning back and forth we're going to do a little more work in the animation tab in a second but before we do that let's add a second simple deformed modifier we're going to do the same thing we're going to have origin set to the empty this time we're going to rotate on the y and we're going to do negative 30 again for the first frame this time go to frame 60 set that to positive 30 and now go all the way to frame 120 set that back to negative 30. that'll give us a little offset animation between the two movements and now once you've done that let's go to the animation tab up above and let's switch this window to the graph editor and before we do anything in here let's just grab all of our keyframes down here go to key interpolation mode and switch that to bezier it's just going to smooth out the movements between them and now we're just going to do one quick thing so you could grab the first one up here hit n go to the modifiers tab over here and just hit cycles and all that's going to do is it's going to loop our animation so we only have to do it once and it'll automatically repeat it forever and now we're going to do the same thing for our second animation so just add cycles and now we can make our timeline as long as we want and it'll always be animating and it will be looping when i made my original scene i might have had the scale a little bit different on our model so this looks a little intense he's kind of being warped a little bit so i might change the animation let's go back to our modifiers tab on frame one i'm going to do negative 20 and then i'm going to change that to positive 20 and then negative 20 and i'm going to do the same for our second modifier and now let's look at how that looks cool yeah it's not warping quite as bad anymore so that should be good all right with that done let's go ahead and add in our hair so add a particle system change it to hair and advanced and right off the bat let's just go down to vertex groups down here and under density let's change it to hair and now we should only have the hair growing out of the top of the head so we could go ahead and change the number of particles to 2500 for length i had that set to 8 and for segments i had that set to 10. so we could go ahead and turn on hair dynamics actually before we do that i just want to show you one thing that i did so let's go to the first frame so when you're working uh with hair if you go up to this tab up here this drop down you can actually go to particle edit and that's going to let us basically groom our hair i'm not going to go in depth over all the tools here but this does allow you to kind of comb the hair in a certain way so all i did was i painted the hair so it kind of parted down the middle just so his hair didn't start out standing up i'm just gonna fast forward through this because it is pretty slow and it's gonna be boring to watch but you can do this too but you don't need to if you don't want [Music] and just because i forgot to mention it the tool i'm using it should be selected by default when you go into particle edit mode but it is the comb tool and now that i've kind of combed all that down it's good enough the rest of the pairs that are standing up should drop once the simulation starts you could also cut the hair so i also did that basically i cut the hair to like just over his eyes i basically gave him bangs so i just kind of drew across and it'll automatically cut those hairs for us looking pretty good and then i also just kind of trimmed the length of the hairs on the side just kind of drew across none of this is very specific trust me you probably don't want me giving you a haircut but that is looking perfectly good for what we need it to do so we could go back into object mode now and that's basically going to be our starting frame for my final animation i ran the simulation for about eight to nine seconds but i didn't start the actual animation until about 30 seconds in so the hair was already in motion so you never actually see how ridiculous it looks the other thing we're going to want to do before we start getting into the dynamics of the hair is let's add a collision modifier in the physics tab and i should have mentioned this before we cut the hair but once you start editing the hair you cannot change the particle account or anything anymore and if you do want to update these numbers you're going to actually have to delete the edit and it'll all grow to the original length and it'll all be standing straight up again so that is something you might want to do until you run the simulation like right before you run the simulation but if you entered these numbers that should be about what i did so you should be fine another thing before we get into the animation details is let's go to the material tab real quick and let's add one and call it statue then let's add in a second material i'm going to call that hair and even from right here we could just change this to the principled hair bsdf and that basically is a default hair material and it looks really good out of the box you don't need to change much you can mess with the roughness and the color and everything but it looks really good automatically and one last thing i want to change is let's go to the render tab up here and under hair actually so i rendered my animation in cycles by default it's set to ev so i'm going to change that to cycles and then under hair i'm going to change it from rounded ribbons to 3d curves and now i'm going to go back to the particle system so let's go ahead and turn on hair dynamics i'll just keep the quality steps to 5 that is what i had in my final animation although if you find that your animation like the hair is not looking very good like it's intersecting through things or the bending is looking weird you might want to turn that up that will increase baking time for the simulation though i think i left everything under hair dynamics to the default setting so we don't have to worry about that for children i turned it on to interpolated for the display amount i left it at 10 but for a render amount we don't need a hundred i just put that to 15. it might depend on your scene if you want more hair obviously you could turn that up but 15 is good enough for this and we're also going to check long hair basically just when you have hair that's a bit longer like this it helps it it helps the children not look too weird under parting i set the min to 0.1 and the max to 0.9 this is basically just these different options are changing how the children particles are set up because every child particle so these numbers right here 10 and 15 for every single normal hair particle that we have which we had 25 just 2500 to start with there's going to be 10 children particles in the viewport display and render there will be 15 so it's basically just for every single normal hair particle there will be 15 rendered children particles to make it look like there's more hair using children particles just lowers the render time and the baking time under kink i change that to braid and i left those numbers alone and then under hair shape this is going to affect how our hair looks a lot we haven't actually looked at it yet in rendered view but i'm going to add in a hdri real quick and just so it's not really too hard to look at i'm going to go turn on transparent under film in the render settings that way we won't actually see the hdri in the background when we're rendering before we change anything else let's just go ahead and look at it in rendered view and right now you can see the hair is very fine so when we're messing around with hair shape that's basically going to adjust how the hair looks like how thick it looks mine i had it look a little thicker than the default setting which some people were saying it looked like spaghetti or twizzlers i think but since mine was not really going for realism it didn't really matter for me but if you do want to look more real obviously you could keep the hair thinner but for my render the diameter root was set to 0.4 and you you're not going to see these changes in the viewport this only changes when you're seeing it in a rendered view the tip was set to 0.35 and then diameter scale was set to 0.5 and now let's check that out in rendered view and you can see it looks actually way too thick so i think since the scale of this one is a bit different from my initial render this is too big so let's half everything so i'm going to set it to 0.2 and i'll set it to 0.17 and even that is looking a bit too thick so let's just go down to like point one and point five oops not 0.5 0.05 it's getting a little bit closer it still kind of looks just like a mop so we could also just change this diameter scale and lower that i'm gonna bring that down to like point three it's gonna basically this diameter scale affects the overall scale of everything so 0.15 that's looking better it'll it'll be easier to tell how we like this because we could change this at any point so let's actually turn on the hair dynamics and bake it and then we can see how it looks in motion but i do want to point out that you can see in a rendered view how everything looks a lot smoother but when you're looking at in viewport mode this all looks choppy and hard edges just keep in mind that you're not going to really know how it looks until you're seeing it in the rendered view one other thing though let's go to the render drop down in the hair settings and change the material from statue to hair and now look at that in rendered view and it does look like he's going bald right now but that's fine you can see the hair looks a lot better than that white did although obviously this looks insane on a statue that's why i did the kind of fun colors because i just wanted to look kind of cartoony this looks insane but we'll worry about that later first let's run the actual dynamics so you could go to the cache setting in the particles tab and let's just run it for like 120 frames so it doesn't take too long so all you should do is hit bake and we'll be back after that's done okay so that finished baking i would say took about 10 minutes i'm running a i'm gonna i'm gonna say i'm running about a five or six year old intel i7 processor in my computer so if you have something newer than that it'll hopefully go a little quicker so let's scrub through you're not going to be able to easily scrub through just because this is pretty intensive on the cpu but it'll go a bit slower but yeah we could go somewhere where you see an interesting movement and now let's look at it in rendered view and you could see there's a couple issues for one it is clipping through the model i think since this model is so there's so many protruding areas to it that it will have a hard time at the current setting of collision that it will still intersect with things but the main issue is the hair color is so much darker than the color of the statue that is just immediately obvious when it's clipping through so the two things you could do to fix this you could do the harder way which is turning up the collision quality and that will just increase the baking time by quite a bit or you could do it the lazy way like i did and you could just make sure that the hair color is not very noticeably different from the color of the statue so let's just create a quick let's go to the shading tab let's create a quick material for our statue um i'm gonna make it like blue kind of like a something like that and i'll turn on the scene world so we're getting the same lighting and now we could just i'm going to also turn down the specular to like 0.2 and i'll turn up the roughness 0.8 on my actual finished model i had a roughness map that just looked like it had a bunch of scratches and smudges all over it if you want access to that you can get it in my patreon at the five dollar a month tier and then let's just copy so if you hit ctrl c over the color here and then let's go to our hair color and we just paste it in here and i'll turn the roughness set that to like 0.35 now let's go to the layout view and check that out again definitely an improvement it's not immediately as noticeable that it's clipping through quite as much but you could still tell a bit so the other thing i would recommend doing is let's just go to our hair settings in the particle system and we could do this while in rendered view and i'm just going to bring up the thickness of these hair strands again because now i think they're a little too thin that it's it's kind of showing too much of the model underneath so i'm going to bring this up to 0.25 for the diameter scale and what i might also do is go back to the shading workspace and i'm going to just darken this hair a little bit and before we get into rendering just go go to the view layer properties tab over here let's turn on vector under data passes and one other thing is let's bring in a quick area lamp go to side view i'm gonna bring it up like this scale it up a bunch and i'm going to rotate it a little that way i just want like a back light i'm going to bring that up even bigger go to the light properties down here let's change it from a square to a disc and i'm going to probably bring this up to 2500 let's see how that's looking it's just gonna give us a little rim lighting back here and then let's go ahead and turn off transparent under film in the render properties tab now let's go to shading go to world and let's duplicate this background node and whatever color we select here will be the color of our new background i'm going to do kind of like a dark yellow orange color let's bring in a mix shader node plug those two in and let's bring in a camera or no we're gonna want a light path node and then grab this is camera array plug that into the fact value the mix node and now we render this we'll just have that yellow for the background color but it'll still be using the lighting from the hdri to actually light the scene and now let's just i'm going to scrub a little further forward and i'm going to render this real quick and then we're going to do a little light compositing so i'll be right back cool and once that is finished rendering let's go to the compositing tab i'm going to bring these down a little bit and i'll hit ctrl shift click on our render layers tab over here that'll bring in a viewer node and i'll bring this up a little bit you go to view you can actually shrink that down with this zoom up here just so it fits in our window a little easier and now i'm just going to bring in a filter vector blur node this is the reason we turned on the vector pass earlier so just plug in the depth into the z in this node vector into the vector click on curved and you can see we're getting i'm going to scale that back up actually you see we're getting some motion blur now in the hair and that adds a lot to the look of this animation i just kept it at the default one for blur but for the samples i brought that up to 64. and i think i rendered it at either 256 for samples or maybe like 400 but 256 probably will work fine for this once this is in motion you could still see a little bit of the head clipping through the hair here but once this is in motion you're not really going to notice it nearly as much but if it is bothering you i would increase the quality of the collisions on the hair or i would turn up the thickness so i'm actually going to turn up the thickness a little more and you could even turn up the amount of children particles if you want the hair to look even thicker i'm gonna bring this up to like .35 again which i believe i had it at earlier the other thing i'm going to do is just bring in the camera a little bit more i might even bring this down and have it kind of looking up at him and in that case i might bring up our lamp a little bit and i will do one final render and let's see how that looks all right and that is the render so i think that's looking pretty good actually i cannot wait to see all of the emo david's on instagram soon so make sure to tag me at thomaslappies3d if you create anything based on this tutorial and have some fun thanks guys take care [Music] you
Info
Channel: Blender Tutor
Views: 73,243
Rating: undefined out of 5
Keywords: blender, 3D, blendertutor, tutorial, animation, blender tutor, blender 2.8, cg, b3d, blender 2.9 tutorial, blender animation, blender physics tutorial, blender hair dynamics, hair dynamics tutorial, hair dynamics in blender 2.9, blender hair particle system, blender particle system, blender particles tutorial, hair dynamics blender, animated hair blender, blender hair animation, how to add hair in blender
Id: a-jTjFzox-s
Channel Id: undefined
Length: 24min 34sec (1474 seconds)
Published: Mon Jan 25 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.