I have created a Geometry Nodes setup with a Repeat Zone to duplicate instances randomly along the X-axis and stack multiple rows on top of each other. A fixed stacking value is given so that each row has the same Z value. (see if needed Randomizing Stacked Rows of Cubes in Geometry Nodes with Fixed Start and End Constraints for my first issue about this setup that has been solved)
Now, I want to give each row a random Z value so they have different Z scales but still stack on top of each other. This should be like using an Accumulate Field node, but it does not work in the Repeat Zone loop. I can give a random Z value to each row, but I can't set the position of each row to stack according to this random value because each instance is moved individually.
First image shows a constant Z offset, second one shows a random Z offset but on each instance, last one is the Repeat Zone
Also, I need to keep the instances, so using a Realize Instances node is not possible.
In my Repeat zone, the output of the "NodeGroup" is the random Z value for all instances in a row. I want to use this by connecting it to the Set Position node to set the position of the entire row, not each instance separately.
Has anyone had a similar problem?