# Randomly reduce instances on Z axis

I am trying to randomly reduce instances placed on a grid in the Z-Axis.

This is an example for what I am looking for. How can I achieve this using Geometry Nodes? I'll attach my example file, which is pretty close to nothing.

https://we.tl/t-yQhdoDq4re

This task could be solved with the node Random Value:

Since your grid is not regularly structured in terms of the indices, you cannot use the indices for an evaluation.

Therefore I would work with the Z-position.

If you set the node Random Value to the option Boolean, it will generate $$0$$ or $$1$$ depending on the value for Probability with a certain probability.

As value for this Probability you use in your case simply the values of the Z-positions of your grid, and map them to a range of your choice. In this case your grid has a size range of $$-1$$ and $$1$$ on the Z-axis, so I use exactly this values in the node Map Range. You could also create this on automatically using the bounding box.

• Hi Quellenform, thank you for the answer :-) Is it possible to use the extract the remaining empty points? I created two collections. One for the lower objects and one for the higher objects. They should not share the same point. I copied the script and fliped the map range. I thought with the same seed it should use the empty points which was not the case. Do you have any ideas? Feb 17, 2023 at 19:30
• @Schmidtli Yes, of course, that is also possible. For this you would simply use the previously created selection to separate the points from each other with Separate Geometry and process them differently. Something like this: i.stack.imgur.com/vHdfc.jpg Feb 17, 2023 at 19:39
• Perfect! Thank you very much :-) Feb 17, 2023 at 20:22