Creating hair cards in UE4

General / 27 March 2018
I recently started working on creating a range of art tools in Unreal Engine. One of these tools is a new way of creating game ready hair. Making hair has always been difficult, predominantly because there is such a disconnect between what your making and the final outcome. Hair cards can look absolutely fine in preview, but as soon as it goes into engine it looks awful, it is then a painstaking process of manually tweaking until it looks right. What I wanted was a way of doing all of this in real time, manipulating the cards and textures as needed and then exporting a mesh.
You can create high poly hair strands, bake them to a texture in real time and dynamically place and control hair cards. So far I have built the following;

A high poly hair strand maker. You can control hair length/width, waviness and strand count. Still to come is hair clumping and more waviness control.



A baker that captures the high poly hair strands and outputs a texture (alpha, height, random colour). These textures go into a hair shader which is applied to the hair cards. Here you can see the baker being moved across the high poly and updating on the lp mesh. 

Finally the low poly hair card editor. You can control direction, length, random offsetting along the head mesh and count. Once you are happy, you can export the mesh as a .fbx. This tool still needs a lot of work, still to come are assigning UV's for multiple high poly strands. Hair layering and better spline control.

Let me know what you think and thanks for reading!

Thanks to Shannon Symonds for providing the head mesh.