I want to create a wall or cobblestone path or similar and I’m starting with a grid - which I then split the edges and randomly scale the elements to get different sized blocks. This leaves the following:
Want I then want to do is close the resulting gaps by moving the mesh islands (or instances, if I split them to instances) so that the gaps are closed (in this case, it would only be on the z-axis - not fussed about others). After quite a lot of searching on the web for an answer, and many failed experiments, I have come to the conclusion that I just don’t understand geometry nodes well enough to work out how to do it. I know it is preferable to try and show what I’ve done in the past, but nothing I’ve done has ever come close (usually it just ends up with the mesh disappearing altogether). My assumption would be to use a loop of some kind, use ray casting (or sampling nearest?) for each island/instance to get the distance/proximity of the nearest island, and then use that to set the position of the island/instance. But turning the theory into practice is beyond me.
I know you can stack things more easily using the Accumulate Fields node, but at some point I will want to deform or resize the islands/instances, which will inevitably create gaps that I want to try and close. (I know there are probably many better ways to make a wall/path then how I’m currently going about it, but - as much as anything - I’d really like to know how to work better with islands and/or instances (once realised))
Any advice - or any tutorials I could follow to better understand how geonodes works for things other than scattering (the only thing I’ve ever used it for) - then that would be gratefully received.
Many thanks
Laz