# Scale Subinstances separately in nested instances

I would like to use geometry nodes to create the Weaire Phelan structure (Wikipedia) such that I can independently transform (and in particular scale) every single cell.

To that end, I so far have:

1. Built the two necessary pieces, one with 14 sides (left) and the other with 12

1. using Geometry nodes, arranged them into a unit cell pattern. Eight pieces in total. I also gave them different materials mostly for debug purposes.

1. I generated a grid of points to instance this construction on. Here a 5x5x5 grid. This is entirely procedural.

1. and finally I instanced the cells and scaled them accordingly.

The problem now is, that the scaling happens on the full cell, rather than on each individual piece. What would be the best way to accomplish this same thing but per piece?

I have found that something like this is possible with Pick Instance and Instance Index:

However, this is not good enough: While that lets me scale the pieces individually, the transformations are still centered on the points in the grid rather than the pieces. In effect, the pattern ends up being the exact same if driven by a texture. The scale is sampled from the grid positions and the locations to scale towards are also on the grid. I need both of those things to happen at the positions of each piece instead.

I think maybe it's possible by also feeding in the noise texture eight separate times and carefully shifting it around but I can't quite get the shifting right and it seems like a very brittle, error-prone method. I am hoping for something more efficient

Now I've understood the problem better and here is the solution.

So transform instances moves object while keeping object center in place, this is not suitable behavior for our task. So instead, I will create additional points for each separate piece.

This is a plan - add 8 copies for each point, shift them, rotate instances. Unfortunately, blender doesn't allow rotating points, so we have to mark them using IDs and later rotate them as instances. So this is my result for 3 pieces out of 8:

Some repeating actions I've putted into node groups. First one assigns an ID and offset points:

Second one uses IDs to rotate instances:

I've put the system on test using this setup:

And have good results:

• You can't scale nested objects separately, because root objects share the same data Commented Apr 27, 2022 at 14:27
• This is the walkaround:) you can group repeating actions in a group to make nodes simpler, though Commented Apr 27, 2022 at 14:30