In recent years modern graphics processing units have seen great improvements in both their architecture and coding, enabling a broad new range of processing capabilities for real-time environments.
These exciting new additions to the arsenal of game developers include powerful new tools for physics based particle, cloth and hair simulations. Particularly notable is Nvidia's real-time hair simulator HairWorks.
While particles and cloth could be emulated with a reasonable degree of realism utilising traditional methods, applying this work flow to hair and fur production often produced unconvincing results. This disparity was further highlighted by the introduction of PBR shaders and improved lighting models in game engines. As a result a more realistic hair rendering method was sorely needed. Enter NVIDIA Hairworks.
Featured in the Witcher 3, Far Cry4 and Call of Duty: Ghosts, this powerful tool enables realistic hair simulation to be processed on the GPU. At its core the software functionality is implemented through DirectCompute. This is a boon to developers as it does not restrict the rendering of hair assets solely to NVIDIA hardware.
But raw processing ability aside, its the smarts of HairWorks that really sets it apart. The software utilises DX11 tessellation to both generate hair and dynamically modify its density. Put simply, it processes detail only when it has to. For instance, the closer you zoom into an object, the more detail it offers you, creating a proportional relationship between focus and detail. The beauty of this method is in its ability to add and subtract detail on the fly. Objects deep in the background lose unneeded detail, relieving unnecessary demand on the GPU.
But to fully appreciate the offerings of Hairworks, let's go back to the roots. Firstly, you need to create the hair. Hair 'guide-curves' are usually made in a third-party 3D package like Maya, which allows you to build from the ground up. This is no stretch for artists working in native packages they are already familiar with.
Once 'grown', the hair can then be groomed and styled in the HairWorks viewer. Finally, maps are used as control textures that define the hair density, clumping, colour, thickness and basically any characteristic that makes the hair guide-curves look and behave like real hair. A benefit of this work flow is that the colour of hair can be matched to the base texture of the model. This ensures that when an object is moved into the distance and the hair is culled, the transition will be seamless.
I should point out that the dominant use for HairWorks historically has been to replicate fur, rather than hair. While hairstyles for human characters produced with HairWorks are aesthetically much more appealing than assets that utilise traditional methods, the behaviour of advanced hairstyles has yet to be refined and can break the illusion. Complicated features such as fringes and hair accessories present additional challenges for the achieving realistic deformation and here is where the software begins to strain.
Considering the vast range of improvements NVIDIA has planned to achieve even greater realism in terms of emulating hair behaviour, there is ample potential for this exciting new player on the scene to make its mark. HairWorks capability for fur creation is second-to-none and given time and progress, this capability should translate well into sophisticated hair executed in real-time. I for one will be watching this space for growth in the time ahead.
Written by Game Development student Okan Beyit.
To Enquire about studying, click here
Other articles you may be interested in;