How do I turn separate mesh islands into their own instances?

Hey all, I have a mesh that’s cut up along some edges with a split edges node, and I’d like to convert each of the resulting mesh islands into its own instance… the geometry to instance node makes it into one single big instance instead.

Any idea ?

Cheers,

Hadrien

1 Like

There are ways that involve pasting hundreds of node-groups → Each node-group basically makes a copy of everything then Separate Geometry on Island index, outputting a new instance and the “remainder” geometry… so, not a general solution but something that may work with loops (in future).
So, currently no real way to do this without using scripts…
been procrastinating making an account on developer site.
You’re on there… Could you please make a request to have a “Group Input” on the Geometry to Instance node? That would give us a general mechanism to do this without needing loops.
Thanks.

2 Likes

I’m not clued up on geo nodes.

In edit mode, Select all, press p - seperate by loose parts. Making them individual objects. Then make a separate geo layout for each object.

Alternatively wait for someone who knows how to do it with nodes only as there’s probably a node layout that can keep it as 1 object.

1 Like

Ok thanks for the peace of mind, at least I know it’s not officially supported. I think it’s alright to ping @HooglyBoogly to ask whether or not this is possible/planned? I’ve never heard anybody mention it so it may very well not exist as a todo… yet.

@ErraticStatic Thanks, I’m asking specifically in the context of geometry nodes. I am making a tree canopy and the idea so far has been to generate a lowres version of the asset with a solid canopy instead of individual leaves, split it into several cells and jumbling them somewhat. I was hoping to turn them into instances to save the computational cost of moving every vertex, but I can’t even do that because the statistics node has no group input either. So I reverted to a simpler solution for now.

Splitting mesh islands into their own instances goes against the idea of instances a bit (typically there are fewer unique instances and they’re used as a performance optimization). It could be fine to “break” that definition, but I’m not sure we’ll want to do it. It might make more sense for a node to output a geometry list. We haven’t really decided yet.

5 Likes

Ok yea I understand. Does my reasoning hold here ?

This would allow me to transform each piece of mesh individually, but I realize now I’m working around the impossibility of getting grouped statistics (in order to find one pivot point for each mesh island). Either way I think there should be a simple path to doing just that.

Thanks for the reply

1 Like

Thanks for your response.

Instead of thinking about the idea of an “instance”, the equivalent concept to consider is a “collection”… so the idea/goal is to simplify the process of procedurally creating an instance collection to then use the “pick instance” operation on later.

Its a use-case many have come across while using GN… so, hope you’ll consider it.

Thanks.

5 Likes

This would be covered by lists, wouldn’t it ?

1 Like

:man_shrugging: donno - Instance Collections is something I know how to use, Lists is some future thing like Loops… so, no idea.

1 Like

Sounds like something loops might solve for free.

Having something that turns one island into one instance inside a collection will probably be helpful, but being able to set a group of object as instance alongside other group will be much more helpful in the end.

That way a generator can create a few houses or buildings and all that ends up being scattered to form a neighborhood.

2 Likes

Ah, yes, through loops probably !

Yes, if you are fine to use the simulation branch (or the usual known hack) you can create a set of parametric instances in a very easily already, for example like johnny does here:
parametric instances by loop
In you case your could split and join each islands as instance each frame.

4 Likes

Of course ! Thanks. That’ll be my solution for now. Cheers !

2 Likes

Haha , so much hacking spirit in the blender GN community !

I was refering to regular loops that will probably come soon after simulations ?
If some quick and dirty solution is needed I would use what Zeroskill suggested: create a loop by chaining say 100 nodegroups that extract the first island and convert it to instance, and only pass instances if there isn’t geo anymore.

2 Likes

For small amounts, i would agree that this is the most portable approach atm.

3 Likes

Thanks for your solutions y’all !!

Sure we should have it but it may not be in the form of mesh island.

We could easily make several parametric varaitions of one mesh, but when being fed into the instances socket of “instance on points node”, the vars are considered as one whole instance.

Right now, GN has no way to tell them apart from each other.

So I suggest that we could add a “ID” socket for the geometry to instance node which expects an user defined attribute for the node to disdinguish the “groups”.

2 Likes