# Z-Offset Array Instances driven by height map

I'm attempting to create a cubes wallpaper with an array of cube objects with different Z-offsets, where I can control the offset of each cube with a texture (height map) to get a more organic look (instead of randomizing the offsets, or moving the cubes manually).

At first, I added two array modifiers to a cube (along the X and Y axis), then applied the modifiers and separated the cubes so I can offset them individually (manually, or by a random transform). This had the downside that I needed to apply the modifiers (I'd rather work in a non-destructive way) and cannot get that organic look.

Next thing I tried is to create just a plane, and use a particle system to generate the cube particle instances in a grid pattern. For the offset, I used a copy of the plane with a Displace modifier backed by a texture underneath, with a sticky surface and high friction.

When stopping the simulation at the time the cube particles hit the displaced plane, it looks like what I was trying to acomplish:

At that time, some of the cubes already began to slide off the surface.

Now to my question: is there another way to get that look by using a cube, array modifiers, and some other modifier to displace just the cube location (not the actual cubes) along the Z-axis?

• i don't know whether you ever had a look at geometry nodes...but it is worth a look. And this is a typical case for geometry nodes. You would have all the control in your hands and it is non destructive. Commented Jan 13, 2022 at 15:21

So IF (i hope you are) you are interested in a geometry nodes solution:

here is the node setup:

Result:

or with a noise texture instead of a wave texture:

or voronoi:

• Of course I'm interested in geometry nodes! (started learning Blender just a couple of weeks ago, but haven't explored that part yet). Thanks a lot for the node setup! Commented Jan 13, 2022 at 15:46
• You are welcome! Commented Jan 13, 2022 at 16:08
• i think i used blender 3.0 or 3.1 to that time. So sorry, but some nodes are not in Blender 2.93 Commented Feb 4, 2022 at 11:35
• I'm using Blender 3.0, only the "Scene Time" not was not available, but I actually do not use it anyway. Commented Feb 4, 2022 at 11:41

You can subdivide a plane in Edit Mode, or by a Subdivision Surface modifier in Simple mode, then displace, then parent a cube to it, and in the plane's Object Properties > Instancing > Vertices. Scale the cube down in Edit Mode, so it fits.

• Another neat solution, thanks! Commented Jan 14, 2022 at 14:25