How to iterate through all curves in a collection(Geo Nodes)

Hi Guys,

I have a collection with several meshes with curves in it. I want to, in Geometry nodes, iterate through all children of the collection (all the curve meshes) and then instance supports for a railing on them.

I have the instancing setup working**


**
Now I want to just run it for each item in the Collection info node.

But neither with the for-each nor with the repeat zone was I able to access each of the items in the collection one after the other. How do I iterate through each collection member and then have it available as if it was a single geometry that I am loading?

Hope this question makes sense and looking forward to your help.
Thanks and all the best,
Jonathan

What’s confusing you is that Collection Info does not return each object in its collection individually. A collection is used in Geometry Nodes as one geometry that contains a set of geometries (or as instances if Separate Children/Reset Children is checked) so there is no built-in “for each object in collection” node as you’d find in a programming language.

Rail supports are not generally needed to be manually iteration for putting on all curves in the collection when you want to put on all of them. Instead:

Click on Enable Separate Children in the Collection Info node, to make each object a separate instance.
In Realize Instances, select the instances and convert them to geometry (as needed).
Then process the resulting curves with your existing node setup. Most of the Geometry Nodes operations will be available for all of the curves automatically.

For now, Geometry Nodes doesn’t currently offer a method for looping over individual members of a collection if you do need to do that for each object (for instance if you want to add attributes to each object, or you want to keep each railing as a separate object). If so, you’d probably do one of the following:

Attach one Geometry Nodes modifier to each object,
Change the workflow to process all curves at once, and only separate them at the end, if required.

Also what version of Blender are you working with (4.2, 4.3, 4.4, etc.)? Repeat zones and collection handling has been modified in recent releases and may be more specific based on version.

Dear @Farah_William,
thank you so much for your quick reply. I am on Blender 5.1 currently.

And with your inputs I just got it to work:

Thank you so much for your inputs.

Maybe I’ll file a feature request - this really is a pretty convoluted way to do it. It should work with a simply for each zone.

Thanks again and all the best,
Jonathan

In 5.2 you can iterate over each object in collection using Collection Children.

But as @Farah_William said you can process all splines at once


or use Realize Instances to handle them separately.

Awesome - thank you so much. We are just waiting a few more days before we switch the studio to 5.2 to see if there are any small severe issues that pop up before we deploy it fully. But will switch it over then to the lists solution. That is great!

This was such help @eelh! Above my earlier setup, below after I took your suggestion. SO much cleaner.

Thank you so much again!