How can i change my characters hair styles and clothing and keep it rigged?

Lets say i want my character to have a choice of multiple hair styles that players can choose, but how do i actually keep the location of the hair that is set in 3ds max and also keep it rigged to the head bone? I have tried adding them as both static and skeletal meshes inside the characters blueprint and hiding/unhiding but both attach to and just manually placing it does not seem to work as it’s either offset and follows the animation or its in the right place but does not follow the animation. I really don’t want to do offsets for every possible style of hair/clothing for my character. There must be a better way of doing it. Thanks in advance.

Ok, so i basically got it working just by adding each hairstyle ect separately in my characters BP, i had to place them manually first on his head (for some reason only worked when he was in his idle anim and not T-pose, odd) then on begin play i would attach whichever one i wanted to a head socket and keep world position.
I can make do with this method, but i need some higher up or anyone with more experience than myself to tell me if this method is viable performance wise as i plan on adding up to 20 hairstyles / facial hair ect and i will have visible set to false on all of those i am not using.
The only other way i can think of is to spawn them when needed but this way seems a little more fiddly than i would want.
Any help or guidance on this matter would be appreciated as i couldn’t seem to find any other posts regarding this situation anywhere and i am sure people will ask the same in the future.
Thanks.

I think that you should refer to what people do to multiple weapons and such. Usually you spawn and attach to a socket, I think for hair/cloth/armor should be the same.
if your hair has rig on them(like long woman hair), you probably need a set of custom animations that matches each character’s moves.(or make them physics cloth?)

Yep, you’ll want to make sockets on your skeleton, this will be the hardest part, since each hairstyle might be differently made, but if you kept everything pretty generic to your character it should be easy to take a single hairstyle or whatever and add it on to the hairstyle or whatever socket in the skeleton window and move the socket to make it look good.

(NOTE: IF YOU EXPORT EACH HAIRSTYLE AT 0,0,0 IN MAX OR WHAT EVER PROGRAM YOU USE, DOING ABOVE WORKS SO MUCH BETTER THAN EXPORTING THEM AT WHATEVER_X, WHATEVER_Y, WHATEVER_Z, SINCE YOU WON’T HAVE TO OFFSET THE SOCKET SO DAMNED FAR)

Then add a single static or skeletal mesh and call it Hairstyle_Mesh or something similar then attach it to those sockets in the blueprint depending on the type of customization. You don’t need to add them all separately a single one will work great. Then just have a base static or skeletal mesh array variable for the type of customization with all hairstyles or whatever type of customization you want and then just cycle through the array, updating the Hairstyle_Mesh to the current array value. :slight_smile:

You can get the max of the array and set that as a variable named something like Hairstyle_ArrayMax so you don’t need to keep track of how many values are in hair customization array. Adding extra items per type of customization is super easy you just add an additional prop to the array variable and then you shouldn’t need to update any other variables it will auto-magically! <3

-edit- Sweet my 100th post.

1 Like

I appreciate the replies i will look into this a bit more later today, just to clarify even though adding all 50 hairstyles and hiding/un hiding using functions does work is it still just bad practice?, i did think of using just one for each customization and using set skeletal mesh ect, but surely some would need offsetting even if they’re set to 0,0,0, in max.

Regardless i thank you both for your answers and will dive deeper into this later today and update the thread as i go.

OK i just had a little further tweaking and as i suspected even though i would set my objects to 0,0,0 in max and set the pivot to the center there was still an offset needed, so instead of doing it the hard way in unreal, i just tweaked the 2 test hairstyles i have to be in roughly the same place, meaning the back of the hair on both are aligned as needed and then i just tweaked its pivot point to make it back to 0,0,0.
This appears to work as i would want although i would have preferred to steer clear of arrays to keep track of which hairstyle is being used as i am a little inexperienced with them, but hopefully it will be a good opportunity to learn.
Thanks.