Dynamic/Simulated Ponytail (Bone Chain) Tutorial - Unreal Engine 4

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey everybody this will be a quick tutorial in Unreal Engine 4 how to create a physically simulated ponytail that follows a character in this case characters head and the reason I'm doing this tutorial is because I didn't find anything useful in the internet about it I got the ponytail working I can get it simulated but my big problem was that once I simulated the ponytail and parented it to the head it didn't follow the character and I seriously couldn't figure out why but now I did and I want to show you how because this gave me lots of headaches so I hope you appreciate it now I take it you're not really a beginner in Unreal Engine or any other program so I'll leave the basics out and just show you how to do it so what I did is I created a simple ponytail this is the mesh that's just skin to some bones right here and you also need a route bone that goes to the origin of your scene and then after that the mesh is skinned to these joints and that's all you need you don't need to key anything and once you have that you'll export it to a FBX and this is what will import in unreal and I'm just using the third person template because it already has a character in it so you import your ponytail import a skeletal importance mesh skeleton yeah and click import now what you need is zip this first yeah doesn't matter now what you need is you need a physics asset let's open this up so ponytail right and in order to have it working to get a simulation working in either physics as it as you can see there in yellow physics as it's non so you right click on your skeletal mesh create physics asset just let's just leave everything how it is now we are here and now we can see that for every bone there is a capsule Collider and now if we click simulate it just falls down this is not what we want we just want the simulation to start at this bone so what we need to do is if we click the first bone that's also the reason you need a a bone that doesn't get simulated because this bone will follow the character and all the bones after it will be simulated so you click the first bone go to physics type kinematic and it stops it from being simulated and now it just get this it's a bit a little bit wobbly for my taste so let's grab all these joints here linear damping is better so let's just work with that click save now save again so now we have a character this is just a third person character and we need a blueprint for it for a person character B port you port and then we want to attach the ponytail to the add but first we need to create a socket for the set so let's go into the character folder go to third-person skeleton I'm sorry if I'm a bit rushing through it but this is stuff you can you can find in the Internet no problem that's all there are lots of tutorials about that so let's create you in a socket for the head now what we can do is we can add a preview Ezard let's use our long ponytail for it then we can already see how it is placed and it's also a little bit too small to soccer at the mesh but we'll fix that later just a tad around here okay so safe now we have to sock it now this is just preview this won't be visible in the game but we just needed this ponytail socket so let's close this now we can go into the blueprint of our character and it look here at component skeletal mesh now we want to add our ponytail call it long ponytail so now we have this long ponytail and we want to drag that to the mesh because it will follow the mesh and we will click on the ponytail select our skeletal mesh this will be our long ponytail that we created now you will see it's down here it's not on the socket yet so parent socket up here we choose or ponytail socket and now it's all over the place I'm not really sure why but there are a lot of values in here that we can tune up that you need to get rid of so just 0ds all out and it's where it should belong now let's stop these characters animations for a moment so we can place this bit a little bit better so we'll just will I ball it a huge ponytail huh this should be fine all right now if we click simulate compile simulate nothing happens let's make a move again so you see it will it'll follow the character for now but if we click simulate nothing happens yet and what we can do now is what you need to do is you have some collision on your ponytail this is a important step that took me ages to figure out so we'll just use overlap all for now if you click Submit nothing happens because we're not simulating physics now if we click here and simulate you'll see it works now the problem is you think well this follows the head right this is all we need to do we have simulation it follows the head is that all right everything should be fine in game right but if we save this now and go into the game and play where's all ponytail ponytail is nowhere to be seen because it's clipped to the floor or is somewhere else it just doesn't work now to demonstrate us that this is actually really following the body let's just uncheck simulate physics compiled again if we play you'll see it's there but somehow the simulate physics thing in the blueprint editing process this destroys a lot of stuff so you want to uncheck this this is important uncheck simulate physics and but you need to have a collision set else it won't work so you hit compile now what we need to do is we need to basically tell in a blueprint that we want to simulate this ponytail after the first but we can't do it in here baby you can I didn't find out how but I'll tell you how I did it so while we're in the blueprint of our character we'll go into the event graph so now we are here and what we need is a event let's say event begin play when we start the game we want to set the bones set all bodies below simulate physics and it already select a long ponytail here this is fine now what is no does is it's at all bodies below this bone that we will add in here every bone after this bone will simulate physics it's basically the same what we what we did in the viewport but for some reason it doesn't work there we have to do it here so event begin play once we start playing from long ponytail we need to bone name now we get the bone name simply if we type in get both name also from long ponytail twice that's connected so now we want to get the bone name from long ponytail and we need to get the second bone now it starts from 0 this is the root bone and the one after it will be the bone we want to have simulated and you want to get a return value right here and then we click new simulate and this is basically it this is how I got it working so let's see if it works let compile save and now we play and oh it works holy crap it's that easy guys now it took me four days to figure it this out got me a lot of headaches but I really hope this help someone that struggles with this and you can also create ponytails with dynamic hair hair effects physics and stuff but yeah this is pretty great because now you can create as much ponytails as you want for your character and it will work you can create order cloths that follows your character this is easy you can change your up the art the hairstyle for playing the game so it is pretty great so I have fun with this guys I hope this helps and see you
Info
Channel: Gemster
Views: 62,717
Rating: undefined out of 5
Keywords: Tutorial (Media Genre), Ponytail, Animation, 3D Modeling (Film Job), Unreal Engine (Video Game Engine Family), bones, cloth, simulation, ue4, Head, Hair, Animated, maya, physical simulation, unreal, ragdoll, physics, dynamic chain, dynamic, chain, joint, joints, dynamic bone chain, dynamic bone
Id: Jq0pB2Um_pA
Channel Id: undefined
Length: 11min 8sec (668 seconds)
Published: Sat Oct 24 2015
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.