Hair Sim

From ETC Public Wiki
Jump to: navigation, search

Hair Simulation is a new technology used for animation projects.

Project Sirena: Hair simulation with Maya XGen

There are different types of simulation systems existing in the market. Maya has its own nHair dynamic system. It could be used with XGen grooming plugin. Below will introduce a general workflow for hair simulation in Maya and some suggestions and tips. Normally, the animation has to be finalized to pass it to the hair simulation division, since the hair simulation depends on the animation movement and different animation will result in different simulation results.

Create the hair

Hair could be created through Maya nhair system directly or using the XGen plug in. The reason to use XGen is that you could have more control and groom to the hair style that is in need. Hair has to be created on top of a hair cap mesh. There are two different kinds of XGen, one is XGen and one is XGen interactive groom. In the project, for above water scene, XGen interactive groom is used since the hair is more stable and we did not apply any simulation for it. The main focus is to style the hair. For underwater, XGen is used since it is all simulated and the hair strands are flowing at each timestamp.

Create hair system

XGen guides are the base hair for the simulation. After the creation of XGen, the XGen needs to be convert to nHair curves in order to be simulated with physics system. In order to see the curves moving and simulating, the animation has to play from the first frame, and every time if it is not cached, it has to play from the start. Sometimes when converting the guides to curves, there will be some errors and the curves are not moving with the dynamics system. This is an unsolved bug in Maya 2018. The main reason is because if the head itself is having large amount of translation, the follicles of the curve are not attached to the curves and there is error appeared.

Adjust the hairsystem and nucleus

Adjust different parameters according to the need. Sometimes, when attach back to XGen guides, the hair might poke out from the model mesh, and keyframing different parameters is needed. Wind direction could be an initial adjustment to match the animation with hair direction.

Below is the suggested setup for underwater hair.


Maya hair-sim Wiki1.png

Maya hair-sim Wiki5.png

Attach hair system to XGen

Attach all the output curves to XGen to see the base hair simulated. Live mode will show the simulation from first frame, however, it is not recommended to play it through directly from live mode, since the computation time is long and Maya might be unstable. It is very important to cache all the hairsystem output curves and export selection as alembic. Under guide animation, the cached file could be loaded and user could see the hair for different frame without playing from first frame. It is still not recommended to play the whole animation with the simulated XGen turns on. The user could playblast the video to see the whole result.

Pass it to the pipeline

The things to pass it to rendering side will be the alembic cache file and all the XGen collection files. There might be some path issue and this is further discussed in the render wiki page.

Some Useful links

Animate guides by attaching an nHair system

XGen Learning Paths

nHair simulation and caching