Geo Nodes: Try to modelling a building

Hi,

I want to achieve the following with geo nodes:
image

There are two elements:
image

I added these two elements into a collection, and my setup looks like this:

The goal is to alternately add a narrow and a wide element, but unfortunately that doesn’t work because I can’t figure out the width of the elements. Can someone help me with that?

You can access geometry dimensions with the bounding box node. Separate min and max, subtract maxY from minY, use these values to set the mesh line’s point positions. Let me redirect you to this tutorial for book stacking. He has many instances of varying widths so he uses the accumulate field node, but you don’t have to. He’s also transforming instances, not setting point positions, but the idea is the same.

4 Likes

Hi,

For Instances the Bounding Box doesn’t actually give you the dimensions (min and max give (0,0,0))… you need to do the following workaround to realize the bounding box and use the 1st and 8th vertices (which give the min and max values) to allow you to calculate dimensions:


…then use Accumulate Field as suggested by Hadriscus.

(Modulo by number of objects in your collection… Dimensions multiplied by (0,1,0) here to only work on Y dimension i.e. interpreting Y to be the width)

Good luck!

7 Likes

Wow. Great. Need a litte time to understand that, but it works. Thank you, sirs.

1 Like