I’m trying to generate a model like the one in the picture que-03 (I’ll add it in the next post) using ‘geometry nodes’. I searched on Google and the AI offered me a possible solution (que-04), but it doesn’t work the way I want. The cubes sit grouped together, instead of spreading next to each other, without overlapping. Probably after two more posts I will be able to add the Blender file and the other images.
Can you please tell me what is missing or wrong in the code I created?
Thank you!
Based on a YT tutorial ( How to Stack Cubes with the accumulate field node, by Cartesian Caramel) I modified the initial code and now the boxes are spread out, but I still need to control the distance between them, so that they are next to each other.
So there is a lot to say I’ll try to keep it simple !
First if you ask an AI especially for GN stuff, I think it’s best to ask for tutorials or forum post … Solutions they offer by themselves with GN are generally lame.
Now is this the right approach for your problem … IDK but hey we need to start somewhere right ?
Lastly, I highly recommend you start by studying GN on it’s on and avoid to study it with a complex project such as this… If you’re stuck on simple graph like this , things won’t get simpler …
But at least it’s kind of the right exercice to start with !
Merci, sozap!
After looking on initial GN, I thought the same thing and searched for ‘Accumulate field’ and I was able to modify the code to make it work (a little). I still have to figure out how to control the distance between the panels, because the tutorial I followed used ‘Scale’, and not the exact dimensions of multiple boxes in a collection.
Okkk ! This gets a bit trickier indeed !
At this stage it’s hard to advice you properly, because there are different ways to approach programming, but choosing the right one depends a lot on the context…
In a collection elements are stored as instances which makes things a bit different…
Try this to access to each instance dimensions :
I tried to add to it the possibility to set three box sizes by adding Switch and Equal nodes, but I still can’t find a way to eliminate the distance between them.