Profile PictureRakenval
€0+

Hair Curve simulation nodes for Blender | Blender 3.6 and +

22 ratings
Add to cart

Hair Curve simulation nodes for Blender | Blender 3.6 and +

€0+
22 ratings

Here are some small node trees that will allow you to link hair curves from the new hair Blender hair system to proxy meshes and simulate them with cloth sim !

Since I'm not exactly good at nodes or math, I went for the simplest solutions I could find, so they do require a bit of manual work.

Youtube tutorial :

The nodes :

"Resample Curve" node : Litterraly the build-in "resample curve" node, but that way it's ready to go. Why is it important ? To make sure the created proxy will have the exact same point count/indexes as the hair curves.

"Follow Proxy" node : This node will link guide curves to a proxy mesh. It's super important that the hair curves and the proxy strands have corresponding vertices, with the exact same index and position (a proxy vertex with a different position won't break the whole thing but will override it's corresponding curve point's original position)

"Create Root group" node : That one comes in handy when creating pin groups for simulation. Must be used before modifying the mesh strands of the proxy.

"Hair Proxy to Tubes" node : Useful to create tube-shaped cages that can give better simulation results in some cases.


To create a proxy mesh :

First, add the "Resample Curve" node to the system, set the "point count" to either the current point count of the curves or a new one, and apply. This step is only necessary because sometimes when converting hair curves to mesh, the mesh strands somehow end up with way more points than the curves, and I don't know why.

After applying, duplicate the hair system, delete all modifiers in the duplicate, and convert to mesh. You should end up with a mesh composed of strands that have the same vertex count, index and position as their respective hair curve.

You can then either use the "Create Root group" node on the proxy mesh :

  • type "roots" in the output attribute "Selection"
  • apply the modifier
  • in the property tab of the proxy mesh, go to "attributes", select "roots", convert it to a vertex group

Or you can manually create the root group if you only have a few strands.

Now we need actual geometry for collisions to work. In most cases, a thin plane will be enough, but creating tubes is a better option for curls, loose buns or braids in my humble opinion.

  • To make planes :
    • Set the "Transform Orientation" to "Normal" in the 3D viewport.
    • In edit mode, select all the strands of the proxy, and extrude on the X-axis a little bit to create thin planes.
  • To make tubes:
    • Duplicate the proxy mesh. We'll call this duplicate a cage mesh.
    • Add a "Hair Proxy to Tube" node to the cage. Set a small radius, a big radius would be better for simulation but the tubes shouldn't be intersecting.
    • Apply the node. This will convert the previously created vertex group back to an attribute for some reason, so you'll need to reconvert it to a vertex group.
    • Add a "Surface Deform" modifier to the proxy mesh, and bind it to the cage. If you encounter problems where some strands are deformed by neighbor tubes, it probably means the tubes are too thick.

From there, you can add a cloth simulation modifier to either the proxy planes or the cage tubes. The "root" vertex group could be a good enough pin group, but you can duplicate it and paint better weights if needed (the gradient tool set to "linear" makes wonders). You can also play with the "Vertex weight edit", "Vertex weight mix" and "Vertex weight proximity" modifiers if manual weight painting is too tedious (they need to go above the cloth sim if left unapplied).

For the simulation preset, "Cotton" works well enough for the planes, and I like "Rubber" better for the tubes, but it comes down to your needs and preferences. You can enable self collisions but it will slow things down.

You'll find the right collision distance with trial and error, but as an example. It will depend on the scale of your models, and the particularities of your hair systems.

To get a better result, you can add a "Smooth Corrective" modifier (choose "roots" in the vertex group option and invert it, to make sure the roots will stay attached to the surface") under the cloth sim modifier. The smoothing may alter the collision results a bit though.

Finally, add a "Follow proxy" node to the original hair system, put it right below the Surface Deform node and above everything else. Choose the proxy as the...proxy. And voilà. The hair should follow the simulated proxy.


If you have a lot of hair systems, meaning a lot of proxies, you can create a "master cage" by

  • duplicating all the proxies that use the same cloth sim settings
  • joining them (make sure the vertex groups have the same name, and that all vertex group manipulation modifiers are applied) to make the cage
  • adding a Surface Deform modifier to all the proxies (after deleting the previous cloth / corrective smooth modifiers if they had them) and binding them to the master cage.

It should work fine and be easier to manage and bake. I've not tested all situations possible though.

You can also rig the proxies with an armature, lattices, or any other deformation method to animate them manually instead of using simulation.

I hope you'll find this useful!

And if you use it as is for your creations or tutorials, credits are appreciated ^^


Add to cart
Size
11.4 MB
Copy product URL
30-day money back guarantee

Ratings

5
(22 ratings)
5 stars
95%
4 stars
5%
3 stars
0%
2 stars
0%
1 star
0%