It’s been a while since I last posted. Whilst I have a break from consultancy projects I’ve been looking into real-time hair, specifically for VR. Hair is a complex issue but there does seem to be some interesting progress by Nvidia (HairWorks) and AMD (TressFX). At the moment most public real-time applications don’t have support for either of these tools but I wanted to get a flavour of what might be possible..

Just by chance I stumbled across Hair-Farm’s ability to export hair splines to hair strips! This is a great way to export out complex hair models from 3DSMax into any real-time application, Marmoset Toolbag 2.0, Unity, UE4, CryEngine etc


Converted to polygon strips


It’s more of a hack though sadly, as the polygon strips wont camera face along their original spline, so from some angles they will appear as flat planes. Which will also impact on any kind of anistropic hair shading that you might want to do. This exercise was really to see what is possible, what the speeds are like displaying up to 1,000,000 polygons stereo.

Rendering traditionally in mono is a synch with regards to FPS. Thanks to modern PC’s and GPU’s now that VR has hit the scene everything has to be rendered twice, which has an impact on speed.

On average I’ve been getting around 20-30 fps in stereo. 60-70fps in mono, rendering hair models with exported polygon strips totalling on average about 1,000,000 polygons. It’s amazing to see such complex strands rendered in VR and at fairly useful frame rates. I don’t have access to any decent anistropic hair shaders for Unity that suits this method of rendering polygon strips (nothing on the Asset store held up) Until I can find a way to re-render the polygons or find a way to make them face the camera’s viewpoint along their generated spline, anistropic shading wont work anyway.

Hopefully at some point Unity or UE4 will be able to properly integrate HairWorks or TressFX into their tools set, which will enable real-time culling, proper strand generation on the GPU with some more advanced hair shading. Plus per strand ambient occlusion, inter-reflections and self shadowing. I would love to get my hands on such tools, once integrated.

For now these shots are just slight glimpses of what is possible in Unity, minus any kind of decent shading. The multi coloured map helps bug fix any issues with strand generation, plus I’m sure it could be used for anistropic control? Vector direction? Each polygon strip has a UV map for full root to tip controls.

unity-hair-shot-04b unity-hair-shot-04c unity-hair-shot-01b unity-hair-shot-01c unity-hair-shot-02b unity-hair-shot-02c unity-hair-shot-03b unity-hair-shot-03c

unity-hair-shot-01 unity-hair-shot-04 unity-hair-shot-03 unity-hair-shot-02

Currently I’m not interested in simulation, just being able to display hair in stereo, realistically! at around 60fps is the goal. Both HairWorks and TressFX should offer hair simulation, if you can supply some decent hair splines to work with.

Tip of the iceberg, hopefully more to come.


  • IkephotoReply

    I recently faced this same problem, working for a celebrity scan to be used in an Augmented Reality app for mobiles... I had to revert to textured strips and face a whole lot of problems with shading in Unity. It was messy and in my opinion results were quite poor... But I'm guessing no iphone 4 can move 1000000 polys anyway!

    This is a very interesting approach Lee, I hope it develops further and we can have something to work on soon. Best regards. Iker.

    July 17, 2014
    • InfiniteReply

      Thanks. Yes it's a damn tricky problem. We've already found a way to make the polystrip's vertices camera face a long their angle of generation which should help with the shader. Still a hack but a good hack :)

      July 23, 2014
  • JeromeReply

    Nice to see you back Lee !
    I'm also very interesting in RT hair representation...
    I've finaly bought both hairfarm and ornatrix last year and i'm hardly "testing" it to achieve good hair. But simulating it still a pain in the ...
    If RT solution give us decent simulation tools then I think we will do a big step forward because at the moment it is just too slow to simulate in 3dsmax (imho).

    See you and keep posting !

    July 24, 2014
    • InfiniteReply

      I have some cool updates to post soon, there's also a guy called Kennux working on a cool simulation solution for Unity.

      August 5, 2014
  • JeromeReply

    Am I wrong or some hair are from woody's ? (daniel Garcia)
    Look's very similar to his work... even the girl model used...

    I was also thinking about some tests i've ran rendering hair with octane render v2.0.
    Since it now accepts rendering hair splines directly from hairfarm and Ornatrix it is prety simple to use it and it renders very fast (even if still a little unstable but i'm sure otoy is gonna to fix this...).

    July 24, 2014
    • InfiniteReply

      Yes it's Dani's models. Great about Octane!!

      August 5, 2014
  • ErikReply

    Hi Lee,

    I'm sorry that you feel that you:

    "don’t have access to any decent anistropic hair shaders for Unity that suits this method of rendering polygon strips (nothing on the Asset store held up)"

    I know we emailed before about using my hair shader package (!/content/11331) for your models.

    I would still appreciate if you could send me one of your hair models to test some
    shader optimizations and some other rendering ideas.


    July 27, 2014
    • InfiniteReply

      Thanks Erik, I did try your shader but couldn't get the results I was after. I will post some of my findings soon and send you some models. Please could you email me?

      August 5, 2014
  • Christian KahlerReply

    Hi Lee,

    I implement TressFX in Unity. If you are interested, send me an email.

    Kind Regards

    August 6, 2014
    • InfiniteReply

      Hi Chris, very cool. Will do. Thanks.

      August 7, 2014
Would you like to share your thoughts?

Leave a Reply