Pixelation Script with Surface

I’m working on a pixelation script and I was wondering if someone could help me further develop it.

This is the current script that I’m working on with the results attached:



If someone could help me fix the script so that it ends up looking somewhat like this, I’d appreciate it a lot!

Edited to be more clear.
Create a distribution of operations, so that each box has an integer that represents the index of an operation list. For instance,
0 -> Move Z somehow.
1 -> Scale XY somehow.
2 -> Subdivide and Move Z somehow the children boxes.
3 -> Do nothing.
So, each box must have an integer from 0 to 3, maybe you can sample them using noise or interference or multiscale distributions to approximate the look of that image. Or create biomes if you feel more inspired. Once that, you can filter the boxes to run its specific operation.

1 Like

If you want to have a bunch of random sizes, you could use quadtree and a set of random points as the way to subdivide the boxes.
The Z of each cell would be based on the surface.
You could then randomise offsets dependent on size of the box.

1 Like