Geometry Nodes Loop Node

I know that loop nodes are going to be added to geometry nodes at some point, but does anyone know of someone that has made a loop node in an addon or something like that? Cause it would be really helpful.

I dont think that is possible with an addon.

Just create a nodegroup and do some CTRL+D :slight_smile:
a plugin could automate the process but well, best is to wait for an official implementation

Yeah, that’s what I’m forced to do. It just isn’t reasonable when I want to do something that has like 100 iterations.

While it’s quite handy and I’m really looking forward to using loops, in the meantime, I managed to workaround situation where I was convinced loops where the only solution by using available tools.
It just more tedious but possible.

Why you need it for ? Maybe it’s possible to do otherwise …

In this specific case, I have a quite complex node group that makes a planet for a solar system generator. For every planet I want to add, I need to copy the nodegroup and plug in all the needed inputs and outputs. Ctrl+Shift+D helps with that, but it makes it so that changing the number of planets is not super quick and versitile. At the moment I have it so that a planet is added by adding another geo node modifier. It works just fine, but would be a lot easier if all you had to do was change the number on a slider.

1 Like

Ha yess ! I think I’ve seen your generator !!

I see the issue ! If it’s just random planets , and you don’t need control over each planet… I think the whole stuff is doable without loops at all, but that would mean redoing the whole architecture of the tree, and that would probably be more technical.

Because you nearly finished your project, at that would mean mostly starting over , I see why it’s better to look for loops right away !

1 Like

Yeah luckily adding another geonodes modifier to the tree also has it’s perks. Because I have everything randomized through a seed, each planet is automatically randomized when they are parts of different modifiers rather than all in the same tree. And for this project I don’t think I would use the loop node unless I had a rush of feeling like completely reworking a lot of the tree. Just would really be helpful because it seems like every project I’m doing it would just make it faster even though there is almost always a work around that gets the job done.

1 Like

I was intrigued by your problem and took a shot at it. I’m not sure exactly how your nodes are structured, but they would almost certainly need some rejiggering to work in this configuration:

orbits.blend (677.3 KB) - cc0 license

This is super basic, and mostly a proof of concept for having multiple orbiting bodies adjustable with a single value. you certainly could add in elliptical orbits, and oblique orbits, and whatever else you need for the orbital dynamics part of the problem, then once you have those points generated and moving the way you want, you can plug in whatever you are using for a planet generator, or just generate some planets, put them in a collection and instance those out.

1 Like

Also note that the orbital speed is driven by their radius to the center point, based on kepler’s laws (or at least a rough approximation of them, haha)

Your setup does allow more much more artistic freedom, but that node tree of yours seems… daunting

1 Like

Oh that’s really smart! I’m not sure if that would have worked for mine, but using the count of a mesh line is a really good subsitute for iterations. This is making me think maybe somehow resampling a curve could also be used for some cases as another type of iteration? Thanks for taking the time to figure something out!

1 Like