Unreal Engine Puppet Style Movement

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
good morning people Titus here for another Unreal Engine tutorial and in this video I'll show you how to create realistic puppet movement for your player character this effect can be achieved by using a function that simulates physics below a certain bone socket from your skeletal mesh let's not waste any time and jump right into it all right so starting off we're going to create a quick folder going call it materials and then uh to demonstrate the effect we're going to be doing let's go ahead and head into the characters folder we'll choose mannequins meshes and then we have the skore mannequin which is the skeletal rig for both Manny and Quinn so open that up here uh if you look on the left hand side you'll see a list of all the different bone sockets basically what we're doing is we're we're telling the engine to simulate physics uh on the mesh um at a certain bone level and Below um so basically if you've ever done you know if you ever set a mesh to simulate physics you probably notice you get like a ragd doll effect where the body just basically collapses on the ground and you know kind of lands in funny positions and stuff um what we can do though is we can actually keep some of the bones intact or not simulating physics so they'll still like be up in the air and then the the bones below those levels will kind of like drop down and kind of look like a it kind of gives this puppet effect uh and I'll kind of demonstrate that here in a second so uh let's go ahead and jump back in and let's find our third person character under blueprints there's bpor third person let's open that up here and uh to make this work uh we have to add a um just one component uh the component is basically a physical animation and then you can rename it or lock it in there um and then that's pretty much the the Crux of the uh of the setup really but uh some other things we'll want to do is there are two different uh Collision items on this uh this default Pond uh one is the capsule component so if we search for Collision you want to make sure it's set to pawn um which it should be U but in case it's not make sure it's Pawn uh if you go to the mesh component however uh that one needs to be set to ragd doll and it probably isn't so change that from whatever it is to ragd doll at the bottom here and we can clear that here uh and that's the majority of just the setup so now we can actually go to the event graph and begin the code um I think we're going to be triggering this on the event begin play um but you could theoretically trigger it off a key press or a trigger or you know like a collusion event you know however you want to do it but just to make it simple here uh I'm going to drag in my physical animation reference and then I'm also going to drag in my skeletal mesh cuz we'll need both of these I can drag off either one and do a search for set skeletal mesh component and then I can hook up this execution pin here and then the mesh of course is going to go in the bottom uh section there for the component now the next thing we'll do is we'll drag off the physical animation again just cuz it's easier to search for nodes that way and then if you do apply physical animation settings and the one we want is the one that says below click here and hook up those pins going to add a reroute node drag it down shift select my other node and press Q to line them up now for the um the body name that's going to be the bone uh type that we set um because I need to do this reference twice I'm just going to right click and just simply promote it to a variable and I'm going to name this bone and then you can see our variable is right here and then last thing we need to do with this node is just drag off the physical animation data Run a search for make and you'll get a reference for physical animation data and you don't have to worry about changing anything with the orientation strength just yet uh we're going to leave the defaults uh make sure the include self is is checked on this one uh just for now and then on the mesh we can drag off here and Run a search for set all bodies below simulate [Music] physics then we'll hook up those pins here double click in the line to add a route node drag it down and then for the settings I'm going to tell it to do a new simulate and I am going to disable include self and I'll talk about that in a second now uh looks like we got a compile error and that is because I have not hooked up the bone reference so now if I double click add reroute node there and just kind of make this a little bit neater so that should be uh kind of what you have set here now we haven't set the bone yet so so if we compile and save and try to play nothing's going to happen right looks the same um and that makes sense too so we have to pick a actual bone slot so we can come to our mannequin and uh starting off I'm going to try the pelvis uh just to demonstrate It Whatever bone you choose though um case matters so if it's uppercase lower case what have you make sure it matches the name exactly so it's pelvis all lowercase so we'll do right here pelvis and compile and now you'll notice that when we uh hit play Quinn is going to look a little more relaxed than normal and that's because the um the pelvis bone is still solid and rigid but everything after it is uh basically simulating the ragd doll physics so you kind of get what is kind of like a puppet but a very very uh loose puppet I guess now there's three settings you can adjust well there's actually more than that but I find there's three main settings that you can adjust to change the uh rigidity of your your puppet animation uh the orientation strength is a big one so if we set this to like 100 and then compile and play you can notice you get a little bit of walk animation now not much but it's there um um the other one is the physical animation component you can actually select that increase the strength multiplier say you did something like 10 compile and save and now you have a uh much more rigid or this is maybe the kind of the at least in my opinion this is kind of more puppet um so if I was going I'd probably go with something like this and then the other one of course let's go ahead and switch these back so we'll set this to one and we'll set this one to zero uh the other one is the bone location so simply changing which socket you decide to apply physics to will change your your your result quite a bit uh so like if instead of the pelvis uh bone maybe we do the spine number five so we'll go select bone change this to spinecor 05 and remember the orientation strength I set back to zero with no multiplier so it should be very loose but you'll notice it's actually very rigid and you get some weird kind of banking with the uh the arms and the head and the neck um and then you can change that too if you just move down the line like say we went to three compile and play you get a little bit uh with the top of the uh chest is kind of leaning now so you can get one of these if that's what you're going for uh good settings that I found I actually do like to leave it on the uh pelvis bone and then I like to bump this to crazy high amount uh thousand compile and save and then I get the result that I am pretty happy with uh the reason you don't include the self bone uh if we compile and save is because it's going to tip over your rig so you're going to get one of these and that's also why you don't include the root bone uh so just as an example if I go to this and I set this to spine 03 I shouldn't tip over even though I have include selfon right so you get one of these and that's because I need like the pelvis is the first bone of the actual mesh even though there is a root bone the root bone isn't actually connected to the mesh right it's just a kind of like a I guess a Placer um typically like when you're in blender doing rigs you'll have a root bone you'll normally call it a control bone and it's just an easier point to grab so you can move the entire mesh around but it doesn't actually you usually don't use it to like rotate um but essentially if you were applying physics on every bone after the root bone then this thing's just going to fall the ground right that's the same thing with the pelvis if I tell it to apply physics to everything after the pelvis including the pelvis it's just going to fall down so you basically need if you're going to check that box basically you need at least one of the bones um not being uh touched by the the physics engine otherwise it's just going to tip over so uh but I'll set this back to pelvis I will uncheck include self compile and save and make sure this still works yeah it does all right Perfect all right so now if I wanted to expand on this a bit um let's make it more of look like a puppet I guess uh puppets usually have a control paddle so we can go add we'll just add a cube and then I guess I'll rename this control and we'll just call it paddle why not and then I can press R go into scale scale it down I am going to turn off snapping and I'm looking to make just like a little wooden plank something like that maybe nothing too crazy press W so I go and transform or bring this up a bit and I'm going to add a wood material maybe I'll do Walnut worn and it looks pretty good looks like a piece of wood and then I can just right click on it duplicate it it as paddle one but I will press e and rotate that 90° and now if I compile and save I got the control paddle set up so now we just need some strings um and this is kind of the fun part so what you can do for Strings is oops um we have a uh a cable option Unreal Engine but uh the cable option allows you to attach to Bone sockets which is really helpful but I can't Nest it in the uh the main component tree I have to Nest it underneath the skeletal mesh uh to be able to make use of the actual parent sockets otherwise it won't work so make sure your skeletal mesh um you know you may not be using the same one as me but whatever you're using choose that and then hit add and search for cable and then you'll see an option for a cable I'm going to pick that and I'm going to call this um string underscore H for head and then for the parent socket if I hit the folder I have access to my skeleton so I can search for the head goes in there looks pretty good the width is a little bit thick so I go back to Cable width change it from 10 to a one so it looks more stringy and then there is a uh cable start and cable end uh place here if you expand this out it'll actually let you select a component uh on the endpoint uh so I can just simply search uh paddle and you'll notice attaches to the paddle uh it's offset that's because in the end location there is a 100 offset in the I assume that's the X um although it looks like the Y so I don't know why it's like that but anyways if I zero that out it'll go Center um I kind of want it further back though I want it uh attached to the back of the paddle so maybe I'll do negative 100 maybe 50-40 and I think that looks pretty good on the top uh the bottom part of it is a bit off though I kind of want it at the top of the head so for the location uh that looks like the normally World transform would be blue it' be the Zed but this is uh local transform uh so red is up so I'm going to try maybe 20 oh maybe 13 how does that look yeah it looks pretty good all right so now if I compile and save this I have a string I got one string attached but that is very much the effect I am looking for so let's continue that and we'll create some more here so I'm going to right click duplicate and going to change this to um maybe left arm it's probably not a good naming convention but I'm going with it and I'm going to do lower arm left and I'm going to zero this out and then I need to go what 40 notive 200 yeah maybe negative 150 that looks good and that is attached on the lower arm I could also do the hand the hand would probably be a better spot but I'm going to go with that for now um I don't need this offset anymore this was for the head so I'm going to zero that out and yeah I think I'm happy with that so we will right click and duplicate that and now we're going to change this to right arm and what's nice about this is um we'll go ahead and socket this to uh lower arm right and the uh the value whatever you set for your value or whatever you're happy with just change it to the uh um the inverse so this was negative 150 so I'll do 150 and it should line up just right for you and then I'm going to try attaching some strings to either the knees or the feet uh maybe for this time I'll do the feet and I'm going to put them should I do further out yeah I guess I'll do it further out all right let's go ahead and duplicate and then we'll do LF for left foot and then the bone I can search for foot got foot R and foot L uh this one is left all right so I want that to be yeah why not um feel like I don't have anything in the front I'm going to move that one in the maybe I'll make them both in the front I should probably look at a reference so I have a better idea but let's do this over there and let's go 50 40 why not all right and then we can duplicate that [Music] one and then this one will be the right foot now where to put it though maybe do 20 oh that cuts in the chest a little bit [Music] so that's probably going to look a little weird but let's see what it looks like so we'll hit play yeah I think there's too many strings on the front so I think I will place those on the side so I'm going to zero that out and then let's try 20 what was the uh let's do do 100 yeah I think that looks okay and then for this one I'm going to go a little bit further out so maybe I'll do 180 and this will be netive 180 and then this one isga 100 was it yeah I think we'll go with that compile [Music] save yeah that looks a little bit better I think and then what you could do if um if you wanted to accuate uh or accent the strings a little bit um come to our materials folder right click create a material mcore ebase create any mission base double click switch the blend mode to translucent click three and and or hold three and click in the graph gives you a vector 3 constant hold s click in the graph gives you a scalar parameter call this one brightness set it to 100 uh right click on this convert to a parameter we'll call it color and then we'll hold M click on the graph gives us a multiply node hook these two pins up here hook this into the emissive color and save you're good with that then you can right click on the ebase create a material instance we'll do miore red right click material instance miore white right click material instance miore maybe blue and then it's just as simple as check in a box this one was blue I'll do that type of blue this one was [Music] red we'll do that as a red and then a white bump that up there click okay save and then we can go back to our strings you just select one shift select the bottom one highlights them all under materials click that miore maybe you try white starting off and then you got a different effect on your strings here and then another thing you can do is we can mess with the lighting in your scene select the directional light click into Pi Control Alt L drag the sun down a bit so you get a little Ambiance go go to your environmental light mixture scroll down you can bump the fog density to a 0. five and then volumetric fog actually let's try it without it let's see what this looks like you get this sort of look I think I like the volumetric fog a little better so let's check that yeah I think this fog just works better and you have some horror show of this going on maybe you're making a horror game uh let's try miore blue compile play kind of looks like the white probably should have used the darker shade of [Music] blue it looks pretty good for the movement what's nice about this too is you you know you um you don't have to do a whole lot of animation data it just kind of lets the physics engine get you set up here so it's very easy to to implement uh we try a red compile save and there's the red yeah it looks pretty good all right people we'll cut it here I was trying to keep this video short but I think it got a little bit long but I hope you found the information um informative maybe you can take it uh into your own projects but as always thanks for watching consider subscribing and see you on the next [Music] one
Info
Channel: Titus Bray
Views: 4,148
Rating: undefined out of 5
Keywords: unreal engine, unreal engine 4, unreal engine 5, unreal engine 5 demo, unreal engine tutorial, unreal engine physics, physics, unreal engine 5 tutorial, unreal, unreal engine 5 tutorial basic, unreal engine 5 games, unreal engine 5 gameplay, unreal engine 5 beginner tutorial, unreal engine 5 tutorial blueprint, unreal engine 5 tutorial animation, unreal engine 5 tutorial for beginners, game engine, unreal engine character physics, puppet movement, puppet
Id: 1X42bSOQKi4
Channel Id: undefined
Length: 23min 44sec (1424 seconds)
Published: Thu Jan 04 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.