2
$\begingroup$

I'm trying to do an assembly animation where there I start with elements of a collection scattered and they progressively join the final object.

To start, I would like to change the locations of my objects as if I was scaling them away from their common center, but without affecting the scales of the objects; only locations: in the regular layout tab this could be done with Options > Affect only > locations.

Is it possible to do something like this in geometry nodes?

example

$\endgroup$

1 Answer 1

4
$\begingroup$

To solve this I put the pieces into a collection in their final location. Then Created this node tree

enter image description here

enter image description here

EDIT: You can replace the position node with a noise node connected to vector math node subtracting 0.5 to have them scatter randomly.

If you want your pieces to not move towards the grid origin you can add any arbitrary location to the position. Here I've created an empty that lets me change where the center is. enter image description here

enter image description here

$\endgroup$
3
  • $\begingroup$ how does it work? shouldn't "position" correspond to an origin of the (invisible) "Cube" object (so scaling it would scale differently when placed in different places in the world, and the number of vertices in there won't match "geometry")? Why do you need to "separate children"? How could I spread them in the XY-axis more than in then in Z-axis? $\endgroup$
    – sygi
    Commented Mar 26, 2022 at 18:28
  • 1
    $\begingroup$ When you feed in a collection it treats the collection as the instance. So instead of a point or edge or face its the entire collection. We use separate children so that it treats each member of the collection as an instance. The caveat is that each members location needs to be unique. Otherwise this method won't work. $\endgroup$
    – TheJeran
    Commented Mar 28, 2022 at 7:16
  • 1
    $\begingroup$ When we use the 'Position' node it will scale from the origin. or (0,0,0). If you want them to move away from a a different place. Add an empty and then add it's position to the node tree. I'll update my answer to reflect that. $\endgroup$
    – TheJeran
    Commented Mar 28, 2022 at 7:18

You must log in to answer this question.

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