1
$\begingroup$

In houdini it is posslible to create a for loop to repeat functions easily, is this possible in geometry nodes? the setup below is my current solution,its extremely messy and not very scalable has anyone found a better solution to this problem?

enter image description here

$\endgroup$
1
  • 2
    $\begingroup$ can you describe what you want to do inside the loop (pseudocode). in some cases it is possible to construct a node group such that combining them linearly in a chain, will also give the same result $\endgroup$ May 25 at 16:13

1 Answer 1

2
$\begingroup$

It is not possible to create loops in Blender Geometry Nodes. That is probably the #1 wished for addition to geometry nodes at this time. There is a better solution for many problems that uses an instances on points node to create the duplication. Here is a rough example:

Instances on points node idiom

The mesh line is used to generate a number of points, its count value. It can also be modified by a Set Position node to control the locations. Many other nodes or node groups can substitute depending on your need.

The key is the instance input to the Instances on Points node. Not shown in this picture, whatever feeds it is the geometry you want to repeat. That's usually replaced by whatever geometry you want to repeat.

There are similar approaches for other looping-like constructs. They rely on the fact that 3.x Geometry Nodes uses fields and you can set up the contents of a field as if it were your loop variable and then modify it with nodes like Instance on Points

$\endgroup$
1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.