• Register
Post news Report RSS The making of hair

In this week's update, I like to share the working pipeline and run-time effects I've done using Nvidia's Hairworks solution.

Posted by on

Hi everyone!

A couple of years back, I was fiddling with Nvidia's Hairworks toolset to see if I can create realistic hair inside UE4. At the time it is a hobby project, I was aiming for a small tech demo showcasing realistic hair with character animations and physics. Little did I know, years later, the project became one of the reasons that drive me to make the game 《Drifting》.

At the time, I was following the tutorial posted on Nvidia's official website, which is a good way to start off creating hair strands in third-party software, however, along the way I developed a few tips and tricks that help me to get things done quickly and efficiently.

Using 3dsMax hair and fur modifier to create hair guides, I found out it is much easier to work with multiple modifiers instead of one modifier. By creating multiple modifiers, I can enable/disable each hairpiece individually which makes the "grooming" process (brushing, cutting, scaling hair guides) much more efficient. Additionally, after importing to UE4, each modifier represents a single hair component, which allows me to make minor adjustments to each hairpiece should I felt the need to do so.

hair front combine


hair right combine


hair back combine


(The colored lines on the left side represent a single hair and fur modifier in 3dsMax, the yellow outlined hair on the right side is the corresponding hair component in UE4. Noticed the tip of the backside hair has a reddish color and is much lighter than the rest of the hairpieces.)

After importing .apx files to UE4, the process of adjusting hair offline / run-time becomes much faster and simple since all of the parameters are controllable through Blueprint system. That being said, the method I found easiest to work with inside UE4, is to create a custom actor component storing all the Hairworks component parameters on "begin play event", this custom component is then used to manipulate all the Hairworks parameters at run-time.

The benefit of using this method is to prevent game logic from accessing Hairworks parameters directly which simplifies the manipulation of hair for other gameplay systems; additionally, the initialized parameters stored inside it can serve as a baseline for run-time hair manipulation.

Below are just a few examples of run-time hair manipulation.

hair normal 04 text

(Baseline parameters without any run-time modification.)


hair wind mass text

(Stronger local wind and lighter hair mass. Notice each hairpiece respond to wind differently,
the backside hair has the strongest wind response.
)


hair glint 01 text

(Brighter hair color for root and tip.)


Last but not least, here is the tech demo I made a few years back, showcasing realistic hair with character animations and physics.

(Noticed at 1:54 the collision response between hair and shoulder bone. The collision cylinder is
pre-assigned in 3dsMax, Nvidia's Hairworks solution does not provide world collision in UE4.
)


I hope you enjoy my article and found it interesting to read.

As a friendly reminder, since I am currently moving to a new apartment, I will not have internet access for a couple of days next week, hence, the updated content during 08/03~08/04 is canceled.

Have a wonderful weekend! ヽ(‘ ∇‘ )ノ

Post comment Comments
~cHendler~
~cHendler~ - - 776 comments

Nice update as always. I like the high level of attention to detail such this hair simulation. Keep up the good work.

Reply Good karma Bad karma+2 votes
rit2040 Author
rit2040 - - 61 comments

Hello ~cHendler~

I'm happy you enjoy the article!

The working pipeline for hair simulation is a topic I've been planning to write for a long time, I'm glad I can make it out this weekend.

Thank you for your good words and I wish you a productive day! :)

Reply Good karma+1 vote
Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: