Weird scaling in Geo instancing

I am using a grid sop and then a sopto chop to get my instancing data for a rectangle sop.

Then my approach for scaling was
size/rows of the grid sop

However i have gaps between the instances. I have to increase the caculates sclae by 0.03 then it fits perfeclty but that doesn’t make sense to me.

What am I missing here?
weird_scale.tox (9.8 KB)

Hi @herr_schaften,

the rectangle is placed on it’s center to all the grid’s points. This means your final size of the instanced geometry is gridSize + rectangleSize. Hence when calculating the scale for the rectangle, you have to subtract one from the number of rows:

op('grid1').par.sizex/(op('grid1').par.rows-1)

You can test this by rendering the grid ontop of the instances:

cheers
Markus

Makes totally sense. Thanks a lot.