1
$\begingroup$

I would like to use the new hair curves (Blender 3.3) as an input for an already existing geometry node. This node expects a collection of curves (i.e. curve instances). I don't see how I can change that node to work with one geometry containing all curves. So is it possible to convert the geometry I get from the hair Curves object into a collection of curve instances (each curve -> one instance)?

Edit:
Shortly after my question here someone asked a similar question: Is it possible to convert mesh islands to instances? There are currently two answers following the same basic idea. This is IMO the neater one: https://blender.stackexchange.com/a/276930/139016 The Idea is to use a cascade of Separate Geometry nodes where the Selection input is given by the Island Index output of a Mesh Island node. This way one needs N Separate Geometry nodes to convert N islands into N instances.

For my problem regarding the new hair curves I would need many such steps. Currently experimenting with creating a 10 Islands to Instances group node, based on this a 100 Islands to Instances node, ...

$\endgroup$

1 Answer 1

1
$\begingroup$

I found a solution which works for me. It is limited to max. 1000 curves, but could be extended easily (just there will always be an upper limit).

To make the Mesh Islands node work, the curves need to be converted into a mesh, which is converted back to curves at the end. enter image description here

The first node group in the above screenshot (Islands To 1000 Instances) is just using another node group in a cascading manner which splits up mesh islands into 100 Instances: enter image description here

Islands To 100 Instances works the same... enter image description here

Finally Islands To 10 Instances is doing the work. By using Mesh Islands and Separate Geometry 10 times. By using the Index output of Mesh Islands it selects all but the first island and returns that first by the Inverted output slot. enter image description here (not my idea but taken from here: enter link description here)

All the Islands To X Instances groups are always creating the same number of instances (10, 100 and 1000 respectively). For N input curves all instances > N will be just empty. To get rid of those empty instances I'm using this node group on the results: enter image description here (to be honest, I'm not entirely sure why this last node actually works)

With that I'm now able to use my hair system together with the new hair curves (I created my hair system actually before the new curve / geometry node based hair system came out).


Update

I don't know if the information about what is an island is directly stored in the internal data model or if it is computationally expensive. But just in case I have created another setup, because the above calls Mesh Island a 1000 times on 1000 different meshs (each reduced by one island).

Main group First step here is to call Mesh Island once and capture the result for all other steps.

1000 islands: Split 1000 islands by calling the 100 islands node 10x 100 islands (indices [offset..offset+100[): Split 100 islands by calling the 10 islands node 10x 10 islands (indices: [offset..offset+10[): Split 10 islands starting at the n-th island

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .