4
$\begingroup$

I'm very new to geonodes, but as far as I can see, this is a recurring problem because of the lack of a sort of loop system.

What I want to achieve:
I'm creating a roof made of random tiles with different widths from a collection. I want it to be entirely generated by geonodes, with parameters for width and height.

I found a solution to making a line here, complicated by the different tile widths:
Link: Position instances of different dimensions side by side Geometry node setup

My problem:
Now I want to expand the line to a grid, but I need a new horizontal line for each new vertical row. Right now I can do it with a new geonode per line with another one making the final roof, but it is very(!) inefficient.

Subpar solution

Otherwise I get the same row repeatedly, as I'm not calculating the instances more than once.Repeating pattern

Question:
Is there a way to recalculate the instances, without duplicating the whole setup ≈50 times?


Edit: cleaner .blend

Edit 2: I've tried "Repeat Input", but I don't know how to make it work. It seems to want a geometry in- and output, but I use instances.
enter image description here
This outputs one row of tiles, as if it was not there. If I use more iterations, it breaks with no output.
The nodegroup is the original nodes minus the "Collection Info"

$\endgroup$
5
  • $\begingroup$ You could use a repeat zone. The "Loop Zone", as you called it, exists since 4.0. The workarounds used before 4.0 are no longer necessary. $\endgroup$
    – Leander
    Commented Dec 15, 2023 at 14:38
  • $\begingroup$ Thanks, I see my info was outdated. Not sure how to proceed though, as I can't seem to get it to work. I use instances, not geometry. It seems the setup does not like that, I have tried a few workarounds, but nothing has worked. Outputting geometry only works on 1 iteration. Outputting instances breaks it, no output I can see. $\endgroup$ Commented Dec 15, 2023 at 15:14
  • $\begingroup$ en.wikipedia.org/wiki/XY_problem - the X problem here is clear, but the Y problem I don't understand. $\endgroup$ Commented Dec 15, 2023 at 16:15
  • $\begingroup$ @Krutzelpuntz "Geometry" is an umbrella term for anything mesh, curve, volume, or instance. Instances are geometry. $\endgroup$
    – Hadriscus
    Commented Dec 15, 2023 at 16:58
  • $\begingroup$ Thanks for the help everyone. Here's a .blend with the answered solution. blend-exchange.com/b/Jrp902vp $\endgroup$ Commented Dec 15, 2023 at 17:14

1 Answer 1

5
$\begingroup$

be aware, my solution just solves your repeating problem - as you wanted. It does create a new "problem" because the size doesn't fit anymore, but i think you will find out how to fix that:

enter image description here

result:

enter image description here

$\endgroup$
1
  • 1
    $\begingroup$ Thank you so much, this is exactly what I was looking for! I was expecting the lengths to be random, I'll either cut it with a boolean, or ray-trace to an underlying plane. $\endgroup$ Commented Dec 15, 2023 at 17:06

You must log in to answer this question.

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