3D Procedural Artist Abir "Xeofrios" Dutta has shared a comprehensive breakdown, walking us through the entire working process behind the recently-shown Blender-powered hair creation system.
In case you missed it
You may find these articles interesting
Introduction
Hi there! My name is Abir, better known as Xeofrios. I am currently studying science in high school and exploring 3D art as a hobby. I have studied traditional drawing, but 3D caught my attention as it combined the two passions of my life: logic and art. I enjoy creating useful procedural tools in Blender and using them to streamline my workflow while creating art.
The Concept
My goal was to create a hair system that would deliver quick and believable results using the Geometry Nodes in Blender. Because of its speed and simplicity, the mesh to guides workflow was the best way forward. I also tried to keep the workflow straightforward and intuitive.
The Process
I will use a simple grid throughout the process, which can be replaced by the actual hair shape later. I will also add a Curve>Empty hair. This does not need to be parented to the guide mesh.
Increase the render and viewport subdivisions for hair curves in the render settings.
Now, the first question is how to mark the hair direction. The simplest way would be to crease the edges we want to use as guides. This is easier than you would imagine, as you can select an edge loop and then click on Select>Select Loops>Edge Rings to select all the parallel loops. But it is still a bit too much work each time you want to edit the guide mesh.
The method I settled on was to mark the roots as edge creases. This gives us a lot of freedom when editing the mesh because we don't have to worry about the hair getting messed up.
Now, let’s get to the actual nodes. Start by adding a geometry node modifier to the hair curves and then add an object-info to reference the mesh.
Our goal is to separate all the edges perpendicular to the creased edges, which means deleting those that are parallel. Notice that all the vertices of a parallel loop are the same number of points away from the creased edges. I will call this distance the Crease distance.
If the Crease Distances of the connecting vertices of an edge are equal, we can delete that edge. An added advantage of this method is that we can add a subdivision and the setup will autogenerate interpolated guides. Converting this logic into nodes:
This might look perfect, but the hair direction is still random. To fix this, we need to add another piece of logic that flips the curve direction if the starting point of the curve is not marked as a crease.
And that’s it for generating guide curves from mesh! The rest of the article discusses adding children to these guides and effects like noise. But they are personal choices and would depend on the style you are going for. Anyway, let’s add some simple children. I will use a 4D noise texture to make sure each hair strand gets a different noise texture. For my final render, I went for a count of 20 for the first children duplication and 10 for the second layer of (combed) children.
Lastly, randomize the lengths with a trim node and set the curve radius. I added an easing falloff for the thickness at the start and end of each strand.
Watch the full node-graph creation process here:
Extra tip: curve space coordinates
When adding deformation to hair curves, such as displacement or noise, it is convenient to use curve space (normal, bitangent, and tangent) instead of global space (world XYZ) coordinates. Since we have this data readily available to us in Geometry Nodes, the conversion is quite easy.
The default curve normals are messy to work with so I recommend using the original mesh normals instead if you can.
The Results
Applying all the work we did till now to a simple guide mesh:
As you can see, this tool is already quite powerful when it comes to simple hairstyles. We can go even further by adding effects like curls, waves, braids, etc. Consider this tutorial as a starting point in your Geometry Nodes Hair journey.
You can get a free well-packaged file with all the nodes we discussed so far, plus an extra curves-to-guides node group on my Gumroad.
Conclusion
Geometry Nodes in Blender are developing at a rapid pace. Embracing them in your Blender workflow will save you a huge amount of time – all the way from simple pebble scattering to complex hair grooming. I hope this article gave you a feel of the power Geometry Nodes provide and inspired you to delve deeper.
Thank you for your time, and thanks to 80 Level for letting me share my thought process!