Hair - Medusa Nodes

Hey guys I don’t know if you aware but since a while ago there is a beta version of the new curve hair system you can check out the experimental builds…

I am not sure how better is this system compared to this gn node based hair from you

1 Like

The hair system is pretty good but is not finished yet, already better than legacy hair system I believe.

1 Like

It turns out remove hair by minimal root distance is pretty easy to make. I just random split points in 2 parts and use proximity to delete part A point that is close to part B and then join them. I iterate the node around 25 times and it can basically handle millions of points.One thing to keep in mind is that you need to consider the case one part is empty, in that case you need to add the condition distance bigger than a small number to delete points.It can be transferred to remove curve by root distance.
edit:Every node should have different seed.

3 Likes

btw for everyone rendering curves. at this point i hope you’re not using curve to mesh; there is a better way.
in the newer versions of Blender (which you are anyway using for geometry nodes) with the new hair objects you can render curve without geometry and just set the curve radius.
there are 2 ways to use this.

  1. if you build the geometry nodes in a hair curve object
  2. you can use an object info in the hair curves empty object and all curves coming in will render without the need for real geometry [curve to mesh]
    they are really the same things.
    this will majorly increase preformence.
    i hope this tip was helpful.
4 Likes

Had to start experimenting on my own here, finally iterative clumping control in blender! Tackling interpolation is next!

8 Likes

Maybe something like this can be used for removing the curves by distance as well. The “distance” here is just a value form 0 to 1:



Edit: White Noise doesn’t need UV mapping here.

2 Likes

@bert_vdb, great job! the hairs look very clumpy indeed. :slight_smile:

1 Like

I’ be back in 10 days and maybe start working on clump based on point input(manually)

I think white noise is similar to random value node but uses a vector instead of an integer as ID. So it’s more like delete by random threshold. What happens if the curves are already far enough? Does it still remove?

Yes, this is basically delete by random threshold, and the random value node produces similar results and is even faster. I have test it on the 2m plane and it works with sparsely distributed curves as well.

1 Like

What’s currently the most efficient way in geonodes to find n-nearest neighbours? I’m struggling to get interpolation to work, I’ve been able to construct a delaunay triangulation of the guide hairs based on their UV position, but geo nodes provide very little access to the vertices per face it seems.

Got length interpolation working! Just on a flat surface for now but should work on curved surfaces very soon as the three neighbouring guides are found in UV space. The limitation of this method is that interpolation across UV seams probably won’t be possible. After curved surfaces, shape interpolation is next.

3 Likes

Seems to be holding up fine on curved surfaces so far, it can get quite finicky at the delaunay edges when there aren’t a lot of guide curves though.

9 Likes

I just found a 3d hair database which might be useful for testing interpolation.
http://www-scf.usc.edu/~liwenhu/SHM/database.html 514 hairstyle
each with 10k hair strand, around 1 milion poly.
Import script https://blender.stackexchange.com/questions/262567/how-do-i-add-hair-3d-segments-coord-from-file-to-a-head use interpolation to raise strand count to 50-150k hair strand to see the effect.

4 Likes

Nice resource! I believe you don’t even need the script any more, just use the mesh->curve node?

The hair is not in typical 3d format, it needs some script to read the data.

1 Like

ah I see, thought the hair were just edges in an .obj or something

I published a Windows build on GraphicAll that you guys might be interested in; it contains patch D15691 (https://developer.blender.org/D15691) which allows for per spline index curve interpolation! Hans Goudey let me know that this should be included in the daily builds in 2-3 weeks, but I couldn’t wait to optimize my hair nodegroups with this new feature! Enjoy!
https://blender.community/c/graphicall/dRPL/

9 Likes

Been working on some advanced braiding nodegroup and decided to give procedural cornrows a try, quite pleased with the results so far!


42 Likes

Some braid formulas http://www.hao-li.com/publications/papers/siggraphAsia2014CBH.pdf

6 Likes