As you may know, if you've followed my last series of articles, I've been taking a deeper look at Unreal Engine 4. In one of the articles, I discuss a little bit about UE4's new hair rendering capabilities, and I presented a very quick example. This time I am going through the process of actually making a nice-looking hairdo in Unreal Engine 4.
UE4 doesn't include hair-creation tools. This means you have to create your hair in an external application, and then import the hair into the engine for shading and rendering. As you can guess, I decided to use Maya to make the hair (you can also use Blender, Cinema 4D, and a couple more). Basically, what you need from your 3D application is the capability of creating XGen grooms that can be exported as Alembic files. Maya has this capability (I'm talking about the standard Maya, not Mala LT).
RELATED: Creating hair in Maya and Unreal Engine 4: part 2
RELATED: Creating hair in Maya and Unreal Engine 4: part 3
RELATED: Creating hair in Maya and Unreal Engine 4: part 4
RELATED: Creating hair in Maya and Unreal Engine 4: part 5
In Maya, you have two ways to create the grooms. One of them is to create an “interactive” groom. When you use this method, you start with a groom that features completely-straight hairs, and you use the tools to “comb” the hair and make it look the way you want it. I haven't tested this method much, but I might do it in the future.
The second method is to use curves to create your hair. Basically, you start by drawing a bunch of curves you want to use to shape your hair, and then use those to create the actual hair strands. In my case, I decided to make a braided hair, so I created the curves that would follow this shape.
One thing you have to keep in mind is that your head scalp should have UVs, because XGen uses the UVs to create the strands.
After the curves have been created, you can create your groom. You should use these settings to create it, so you can use the curves to shape the hair.
If nothing shows up, don't worry. The next thing you have to do is open the XGen pane (or switch to the XGen workspace), go to the Utilities tab and then create the guides from the curves you created. Hair should show up now.
Chances are you might get hair everywhere, so you can also use a texture mask to control where the hair is created (you manually paint the mask using Maya's paint tools). You can also configure the density of the hair to make it denser, and increase the CV count of the hair so they follow the guides more closely.
One thing I did, to make my work easier, was to create more than one description: I created one for the head cap, another one for the braid, and a last one for the tiny hairs hanging from the forehead and sides of the head. The reason I did this is because the generated hairs will interpolate their shape based on the guides, and I wanted the different parts to follow the shape I had defined without any kind of weird transition between them. This will not create any issues when you import it into Unreal Engine, if you keep all the descriptions as part of the same collection (see the XGen creation window above).
Next, I will show you how to export the hair as an Alembic file that can be imported into Unreal Engine 4.
Get Unreal Engine: https://www.unrealengine.com/en-US/get-now