Hair Tool

I developed Hair Tool addon to simplify creation process of low/medium poly hair models
This addon will help you generate hair mesh ribbons with uv’s from bezier/nurbs curves. It is how most current games are doing hairs for characters.




Basic workflow is:

  • create grid mesh (quad only) in basic shape of hair, that will be source of hair curves
  • mark one of border edges as sharp - it will be root of generated hair
  • Use button ‘Curves from surface’ - to generate curves. Play with F6 setting to vary the look, amount of splines
  • Generate hair ribbons by pressing ‘Generate ribbons’ button.
  • If you want to switch to mesh version of you curve based ribbons, press ‘Curves to Ribbons’ button.

Detailed info can be fund on MY BLOG

16 Likes

Simply amazing.

bought…

Thanks guys. I will add test models with hair texture for download soon.
There is one limitation I couldn’t find solution to - aligning curve tilt to surface normal. It seems there is no property in blender API to get curve point bi-tangent vector (it is needed for adjusting point tilt to surface normal).
Also the addon name is bit generic. So if you have some ideas how to change it let me know.
And lastly I give refunds to people who are not satisfied with results, so don’t be afraid to test this addon.

1 Like

Purchased. You said you’d add some test models but I’d really love it if you would also post a tutorial about how to produce the hair assets to use with this.

This looks fantastic! Are you familiar with Imdjs wonderful Hairmesher Addon? It produces polystrips from particle hair, but the strips it produces do adjust to the surface normals, so there is no manual adjustment/tilting needed. You might want to take a look into the code of that, maybe there is a solution for this problem after all. (I have no coding skills tho, so… grain of salt… grain of salt all over the place… …)

gave the plugin a quick spin to test and liking it so far.:eyebrowlift:

What exactly would be the best way in the polygon creation phase
to get a smoother blending between the frontal hair and the other hair?

Any change to extend it like a basic fur system? How about beards?

Interesting idea! I got an error trying to do Curves from surface in a 0.01 metric scene unit scale file (for UE4 compatibility). It worked fine in 1 metric unit scale but it would be nice if it worked in 0.01 too so I could actually have the hair in the same file as the characters.


obsurveyor - I will try to make video tutorial in future. In the mean time grab the blend file from gumroad site where I uploaded demo head with some hair samples.

PixelPete - yep I know about HairMesher, but it has bit different purpose that mine. HairMesher - uses particle hair to generate mesh ribbons - it is good for short, dense hair styles where lots of alpha planes is required - there is no curve step because it usually generates so much hair strips that you would not want to tweak them manually.
With hair tool I aimed for different kind of workflow - it more about generating splines, tweaking them, converting to mesh for previewing and then going back to curve state. It was made to simplify work with longer hair styles like this.
I think I will add quick support for converting blender hair it curve ribbons in next release (it is possible now with few clicks - convert particle hair to geo, then convert it to curve - and lastly use Hair Tool to add ribbons to those). But I will automate this.

myclay - grab blend file I uploaded on Hair Tool gumroad page. I will help you. Anyway for this kind of style I use few steps:



From left:

  • base hair mesh is generated but it is using same texture space so it looks bit repetitive.
  • second step is to map some hair strands to different uv area to vary to break the uniform look
  • then I generated second layer of hairs with more randomnes
  • lastly on right - both layers combined.
    Tip: usually I put more dense texture on bottom layers to cover the scalp, and then add less dense hair strips on top to make hair look softer.

Tosky - as I have written above, that this addon aims for longer hair styles, but I will add support for generating ribbons from blender particle hair system. I believe it is the best workflow right now to use native blender hair as source for hair ribbons. Or try hairmesher - I think it is more suited for short hair types.
Cyaoeu - I will try to reproduce it and fix. Usually this is why I don’t work in metric 0,01 system in blender, but I work in blender units, and then use my script for batch export selected objects in metric system. Let me know if I should put this script on github.

Good point, imdjs’s addon was locked down so you couldn’t really see the code but yours isn’t. On that point you should probably put your name in the license! :stuck_out_tongue:

I took a look at the code and it seems like some values are just too small, like

 snappedPoint, normal, index, istance = my_BVHT_tree.find_nearest(noisedEdgeCenter, 3) #distance = 3

I changed 3 to 300 and it worked fine. Values are still too small when actually making the meshes.

It should be fixable though, just find out if the scene unit scale is 0.01 and if it is multiply the values that need to change by 100 and it should hopefully work.

Thanks for that blend file, that really helps put everything together with the blog. Just so I’m clear, the part I’m most interested in learning more about is how to create the HairStrip.png and maybe the shader, if there’s anything interesting there. I see you’re faking the normals but your hair still looks great. I hope this will still hold true when the Principled BSDF node arrives soon or you at least address the changes(baking out a normal map?) that have to be made.

@JoseConseco: Yes, I understand the difference between the two tools and I´m amazed by the simlicity of your addon. In my post I was adressing this comment you made in an earlier post (should have made it clear, sorry):

There is one limitation I couldn’t find solution to - aligning curve tilt to surface normal. It seems there is no property in blender API to get curve point bi-tangent vector (it is needed for adjusting point tilt to surface normal).

Another issue I found was that the addon doesn’t work when using a mesh with a mirror modifier. Usually when sculpting you will want a mirror modifier because the normal sculpting symmetry messes up the symmetry so you can’t proportionally edit in edit mode afterwards.

Cyaoeu thanks for the tip with my_BVHT_tree.find_nearest. I improved other areas so custom unit scale should be no longer problem.
Update 1.1:

  • works better with custom unit scale
  • added radius param, to ‘Change radius profile’ operator
  • source surfaces will take modifier into account (eg. mirror)

Good news it - I think I found a way to do the automatic rotation of splines to surface normal. Will try to code it this week. It may actually work.
I will put this addon on BlenderMarket too after that.

Thanks for the update, works great now!

This is one of the greatest addons I’ve seen. Consider this purchased.

Update 1.2:

  • Adjust generated curves tilt, so it is aligned to source mesh surface with new - ‘Align curve tilt’ button
  • Added ability to generate hair spline ribbons from blender Particle Hair system.
  • Improved speed when generating curves from surface
  • Improved UI
  • Minor tweaks, bug-fixes and optimizations

I uploaded some gifs with new features on bottom of blog.
That took longer that expected. I didn’t have time to test it as good as previous release so let me know I you find any bugs
I should make quick guide video soon. Thanks for your support!
Update:
I messed up the zip file, but now it is ok. So if you got hair_tool_1.2.zip and it wouldn’t work, try downloading hair_tool_1.2.zip again from gumroad. I will work now.

I wonder will bevel shader will make it into blender 2.79?
Anyway some updates on my Hair Tool addon:
Update 1.3:

  • added ‘Randomize Tilt’ operator
  • added ‘Smooth Tilt’ operator
  • added ‘Randomize Spacing’ option when generating curve hairs from surface

Update 1.4:

  • added ability to attach curves as particle hair system ‘Particle Hair from Curves’ (this can be used to import zbrush fibermesh curves and use them as blender Particle Hair system)
  • ‘Generate ribbon weights’ - make vertex group with gradient from ribbon root to tip
  • 'Generate ribbon vertex color’ - make vertex color with gradient from ribbon root (black) to tip (white)

So you can finally attach zbrush fiber mesh curves as blender particle Hairs, and render those as hair primitive.
I made some videos too.

Amazing addon! Your latest update had me jumping in my seat with the curves to particle hairs implementation. Bravo!