0
$\begingroup$

I'm trying to position the instances based on where the neighbor instance is respecting its boundaries. If all instances in the collection had the same dimensions i could simply multiply the count of instances by the size, but the instances dimensions vary. I know my node setup is NOT correct, i need to play with attributes, but i really don't know where to start.

I want the result on the left and instead i got the result of the right [Image 1]. I TRIED to somehow follow this solution: Using object dimensions in geometry nodes (Blender 3.x) but it does not work for my purpose.

Any attempt to help would be appreciated. Thanks in advance!

what i expect / what i get respectively

enter image description here

Robin Betts has pointed me the right node to use, but I still can't get the result I need, am I misundarstanding something? Blend file below

enter image description here

$\endgroup$
4
  • 2
    $\begingroup$ You wouldn't know if you didn't know where to look, but this case is exactly covered in the manual : docs.blender.org/manual/en/dev/modeling/geometry_nodes/… $\endgroup$
    – Robin Betts
    Jul 27 at 20:30
  • $\begingroup$ That is exactly what i was looking for. Many thanks! $\endgroup$
    – Paulo
    Jul 28 at 21:37
  • $\begingroup$ I've tried again, but it won't work for collections... Updated the answer with a blend file $\endgroup$
    – Paulo
    Jul 28 at 22:18
  • $\begingroup$ Aaargh! Instances! It's infuriating, and I've tried again, too. But this sort of thing seems to be the only way through. It seems absurd, so don't take my word for it. Maybe the likes of @quellenform will come up with a better way. $\endgroup$
    – Robin Betts
    Jul 29 at 9:03

2 Answers 2

1
$\begingroup$

Here is my setup, a little simpler than quellenform's one.

It based on generating bound boxes for instances, getting 2 faces from that boxes and using transfer attribute by index to get access to coordinates of these faces. With knowing these 2 coordinates, it is easy to move objects using accumulate field:

enter image description here

$\endgroup$
5
  • $\begingroup$ Great, that is of course an even simpler solution! With the variant with the rotated/scaled instances, this can unfortunately not be implemented, because the bounding box is also always rotated and thus the dimensions change, but for the simple lining up without scaling/rotation, this is optimal. Cool! $\endgroup$
    – quellenform
    Aug 8 at 13:16
  • $\begingroup$ Maybe I missed something, but isn't that instances on points ignores object scale? $\endgroup$
    – Crantisz
    Aug 8 at 13:22
  • $\begingroup$ Uh, no, try this: blender.stackexchange.com/a/271451/145249 $\endgroup$
    – quellenform
    Aug 8 at 13:26
  • $\begingroup$ Ok, these should not be reset. $\endgroup$
    – Crantisz
    Aug 8 at 13:28
  • $\begingroup$ Correct! But I didn't mean the scaling and rotation of the objects themselves before they are instantiated, but the scaling and rotation, which is done randomly in Geometry Nodes afterwards. This would change the bounding box, so this technique does not work. ...but for this question without rotation/scaling it is the leaner method. $\endgroup$
    – quellenform
    Aug 8 at 13:39
0
$\begingroup$

To answer this question, you would need to reliably determine the width of each object contained in the collection.

If you know the width of an object, things are actually simple, because then you only have to move the points accordingly.

But how can you determine the width?

This could be done in the following way:

enter image description here enter image description here


(Blender 3.2)

Essentially, this answer is a variation of the technique presented here, but a bit simplified, and without any individual scaling and rotation of each object.

I would therefore like to avoid repeating the text, and would ask you to take the description from this post.

PS: In fact, I originally wanted to answer your question exactly, but then I realized that there is much more possible here, so I opened a separate question about it. ...I really did not want to "steal" this interesting question!

$\endgroup$

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.