UE4 Hair Grooms

Afternoon all,

So I moved over to 4.24 to look in to using the new hair system and found it was far more complex to get in to than I’d originally anticipated. Seeing a few people have posted some amazing work they’ve produced with the hair system has really inspired me to keep trying - but to no avail so far! The work I’ve seen has come from people using software such as Maya and I’ve been using Blender.

I made a couple of basic hair grooms following some tutorials out there, exported them to the alembic format, looked at what was being exported as what etc. Unfortunately I only seem to get the file in UE4 as an invisible static mesh. It shows that there are many, many vertices to it, but they’re not visible and it’s a mesh rather than groom.

Points I’ve checked in an attempt to get it to work:

  • The scalp is uv’d and a material is applied.
  • The hair particles have a material applied.
  • The hair particles are exported as curves.

Below is my export screen from Blender:
https://live.staticflickr.com/65535/49450282032_588efec01f_k.jpgBlenderHairSS

Unfortunately my 4.24 is updating at the moment so I can’t grab any screens from inside that.

If anyone has some suggestions on getting it so that UE4 will accept it as an alembic file I’d be massively appreciative (and would happily write up my workflow if it will be of use to anyone, including one of my simple grooms - both Blender file and exported).

Cheers,
Chris

Can you share the alembic file?

Here’s the abc file:
https://drive.google.com/open?id=1RawTTffB6NffG5Caf0A3KPlY9PVOcOSN

Here’s the Blender file:
https://drive.google.com/open?id=1Fl8pkGD2ZB14TXJddhUD3aQB02ScGc7a

Both quite basic, just made quickly to try and figure out what’s going on. I didn’t centre the scalp when I produced it. Also I’ve just found that the scaling didn’t stay with the scalp from it’s original file - so if I scale the static mesh that does import it will show the scalp in UE4. Just not the hair - so that could well be my issue?

@Boruki Hey. So I tried my luck with Blender (never used it before) and I got UE4 to read the export as a groom. Unfortunately the curves from Blender come in wrong. Not sure if it’s the way Blender exports curves or UE4 that causes the issue. Will investigate further if I find the time. See my export steps below:

That’s amazing. I’ll give it a go. Definitely a few steps there that I wouldn’t have ever guessed!

Does the result in UE4 not maybe need just setting up? (You obviously know far more about that than I do).

So following your instructions it imports - however (probably due to how I made my hair) all strands come from origin (visibly). And then UE4 seems to have hung when I tried to re-import it after centering it - it’s been re-importing for about 30 minutes :|. Having just opened Task Manager it seems that it crashed, but the crash reporter never came forwards. Hopefully I’ll get a screenshot of my basic hair in editor a bit later. But many thanks for your directions!

https://live.staticflickr.com/65535/49463553261_7a47ec1526_k.jpgBlenderHairUE4SS

And the stretched areas down to what I believe was the based of the original model the scalp came from (potentially caused by not setting an origin early enough, but still there even when I deleted the curve and re-created. I perhaps need to start from just the scalp mesh, make sure it’s origin’d/transform applied etc properly before doing anything with the hair.)
https://live.staticflickr.com/65535/49463553336_63fe519026_k.jpgBlenderHairUE4SS2

I think it has to do with the way Blender converts and exports curves. When I bring the curves into Maya and re-export it works.

When you create the hair initially in Blender before clearing the automatically generated stuff and painting it in place it all comes from the origin/centre. I did wonder if there were hidden bits to the hair when it was painted. And if this might change by breaking areas down in to vert groups etc. A bit of playing around to be done still I feel!

Yes and no. When you convert xGen to curves in Maya you end up with a group of a bunch of separate curves, but when you convert hair system to mesh in Blender and convert it to curves you end up with one combined object of unconnected curves. The groom system in UE4 doesn’t understand this so you have to separate the groom before converting to curves, THEN export as alembic. That should work.

I’m not particularly experience with modelling programs (if that isn’t obvious). What do you mean by “separate the groom”? Is there a specific process in Blender to do that or do you mean that’s what needs to be achieved just in a general sense?

Sure. I’m not sure if the images i uploaded will show in correct order, but hopefully you’ll understand.
First, if you didn’t know already, UE4 operates in cm and Blender in m. So you should set the unit scale to 0.01 and length to centimeters.(before you do anything in your scene)

So when you convert your hair particle system to a mesh, Blender gives you one object as seen in the second(?) image. You want to go into edit mode, select everything, press P and separate by Loose Parts.

Now you have a bunch of separate meshes. Select all of them and convert to curves.

That’s it, now you can select all the curves and export as alembic and UE4 should automatically detect that it is a groom if you have the plugin.

On a side note (this is not a Blender problem) I haven’t figured out how to bind the groom to the correct joints on the mannequin. Half of the groom is bound to the left foot and the other half to the right foot. Obviously that’s a problem - I want it to bound to the head.

Not much luck getting the hair to render correct in UE4, the strands are huge ! Am I the only one having this problem?

Sorry, I didn’t get a chance to try but I did read your reply. I think the children are set quite high in UE4 which makes it look very thick. I managed to adjust mine down with a single setting. I think the direction of the strands may be wrong in some instances based on the lighting - but it was hard to tell on mine as they were all joined up still.

I can bring in just 100 guide hairs and the strand thickness would still be too thick.

Hi,

I made a tutorial about how to give it a shot :wink:

That’s awesome marvelmaster - I’ve not been around much due to illness. I’ll have a look at your video properly when I’m all better and ready to give it a proper go.

Looks great though!

I’ve just realised your video is for 4.25 and I’m using 4.24 (and theres not enough support for stuff I’m using to move over yet). I’m hoping this will explain why I’m missing quite a few bits that you’ve got on yours. I think I may hold out using the groom system until it’s a bit further along so I don’t have to keep updating my project to the new engines all the time to do stuff.

Although having said that I’ve just done the re-import part of your tutorial and it’s gotten rid of the stretched bits of the hair! (I forgot I’d done that before I wrote the above).

Regardless though I don’t have the physics group options no matter how many resets etc I’ve done.

Marvelmaster you are amazing! Thank you! Now I just have to figure out how to split a group apart in blender so I can delete useless hair curves inside my meshes skull…