Attaching Hair with a Socket - Daz to Unreal

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
last time we've set up our playable Dash character and look at that we've made some fixes in blender look at the legs they look great there's no more pork through so yeah a little bit of patience and sculpting magic in blender makes that happen let's see how we can give Mira some hair now so she ball isn't really a good look for her so let's take a look we're gonna go and bring it in as a separate item and then attach it with a socket in Unreal Engine so I've used hair that's not actually made for the character that I'm using I'm using the Genesis 9 character called mirror and hair that's called the bubble gum hairstyle that is made for Genesis 8 so here I have it and make sure the hair is not parented to your character so it's a standalone item in your scene I've moved it in place just so that I can see does it work with my character but I'm sure it's not going to come in like this in Unreal Engine and we're going to have to make some manual adjustments for now select the hair head over to file sent to dash to Unreal and it is also a skeletal mesh and I'm going to call this one bubble gum hair there we go that should take not so long to import into Unreal Engine there we have it familiar dialog boxes come up this is all good as a result we now have a new folder here we now we have mirror and now we have the bubble gum here so separate item that we now it's our job to kind of attach that and one way to do this is in our third person blueprint for the playable character so much like we've attached a Das mesh to our Quinn mannequin I'm going to go and attach another one here that's also a skeletal mesh because that is what our hair was I'm going to call this one hair mesh and this will now be the bubble gum here here it is and if we pop it in we can see that it's not really in the correct position here at all and that's fine we need to go and fix that with a bit of blueprint cord first of all though we need to tell our skeleton where it can attach it and we can do this with a socket if you open up the content browser and go back to mirror you'll find that mirror has a skeleton so double click that and open the skeleton and then over here there is the skeleton Tree on the left hand side open that and this now shows you the whole hierarchy here we're going to attach a socket to the head so let's find that close left shoulder and there's the neck and there's the head so this is where I want to do that right click on the hit and choose add socket and we're going to go and rename that double click into that or hit F2 to do that and call it hair socket you could also use this for things like sunglasses and because we can't really so this is the position of the socket but there's nothing in it so in order for us to preview is the socket actually in the right position or does it need to be moved we can go and right click here and say add a preview asset and since we want to attach hair there let's go and put the let's search for it bubble gum here there we go and we can see hey it's kind of not here because it's a little bit too far up in the air so this is not where I want that to be but if we don't move the socket this is literally what it'll look like this probably happens because the socket is at head height and by default the hair had its Pivot Point at the very bottom of the figure so this is probably exactly that offset that we see but no worries we can go and change that so not with the preview asset selected but with the actual socket selected make sure you go and use your manipulator as good as you can and move this down to where it really needs to be so I find that you can either use the numeric values here on the details panel but they can be a little bit fast so that's not nothing not super fine control here that means you can now type in numbers or you can use a navigational trick that Unreal Engine has so here's how this works control left click will move your mesh along the x-axis and it looks like we have snapping enabled so we don't really want to have that on let me go and disable that snapping rotational snapping is probably okay but the the grid snapping we want to disable here so control left click will move your hair in the x-axis Ctrl right clicking we'll move it in the y-axis and Ctrl left and right Mouse button together will move the height so you might find that a little easier to position I still don't really find it all that easy I'm going to be really honest so sometimes you know if it's just like I wish they had something like the shift control there so we may have to just go in and hack numbers in so I think minus 163 for the height is good and then we need to have something along the lines for the for the x-axis which is maybe in the region of 2.5 I think that'll be that'll be just fine so that's the position of the hair obviously spend as much time as much or as little time as you like with this yeah there's a little bit of pull through so I think I'm going to go and move it down even further and if it doesn't perfectly fit you now know how to do this with blender as well there let's leave it for now so that's the socket in place let's go and save everything and then go and use some blueprint magic to attach this hair mesh to the socket that we've just put into the skeleton the easiest way I know how to do this is to use the construction script and there is a node that's called attach component to component and it is friendly enough that it picks the hair mesh already in the Target and that is kind of correct because the parent needs to be the Das mesh so let's grab that out and Pop That in here to parent and then all we need to do is name the socket name whatever we've called it in the skeleton so we've called it hair socket so it needs to match this exact name hair socket and then the moment we hit compile it should go and pop right into place and that's exactly what happened so this is perfect so the beauty of this is that I can now actually bring in several hair meshes or several hair colors and then just switch them out and call it that way so my character could have literally five different hair pieces and they would all work just fine and this doesn't work on our skeletal mesh in the scene that's walking around because that is just the skeletal mesh without anything attached but it will work for our blueprint character isn't that amazing very cool so if you wanted to have something like this also walking around like her here stand alone walking around or doing some other animation you can do that the easiest way by making a copy of your character of your playable character save first and then just hit Ctrl D to make a duplicate of that and then call that maybe BP Standalone and this one I'm gonna open and just remove the camera from the viewport because we don't need it but you'll see that this character also wears the hair now so that's that's perfect so instead of my previous character where I just dragged in the skeletal mesh I can now go and bring in the Standalone character here turn her around perhaps and if I wanted her to also have that animation that we had earlier then you can go over here and switch animation blueprint over to animation asset and then pick one of the retargeted animations that we've had there so in our case it was uh walk forward there we go and then if we go on play then we have a walking character with hair attached and this character here yeah I could delete it because sometimes Unreal Engine just you know makes this an unloaded characters one of those things but there we go that is how we do that now with attached hair and the concept will also work for sunglasses so go ahead and have fun and let me know how you get on
Info
Channel: The WP Guru
Views: 2,826
Rating: undefined out of 5
Keywords:
Id: dbLBc4SXU1M
Channel Id: undefined
Length: 8min 1sec (481 seconds)
Published: Mon Sep 25 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.