I need to create this pixel square effect in Illustrator:

enter image description here

I tried to make perspective grid, put squares and blend them.

My problem includes two main points:

  1. I can't make distance from smallest to biggest from horizon;
  2. My squares turn in perspective but I need them to stand straight.

enter image description here


You rule out Blending and Envelope Distorting, because they either do not give proper vertical and horizontal distances or they distort the shapes.

With no doubt someone could easily say something like "Do it in the text editor - simply write it in SVG or other graphic language or do it even more easily and program a script".

Without thislike literal skills we can do some hard work. At first draw some lines to the perspective grid or otherwise create a bunch of horizontal lines that are like the same amount of identical horizontal lines with equal distances seen in a perspective:

enter image description here

This was actually made in Inkscape, where

  • a series of equally spaced identical lines were drawn
  • lines were combined (Path > Combine)
  • Path effect "Perpective envelope" was added
  • dragged the upper corner nodes a little closer each other
  • saved as Inkscape's native SVG

It's no use to apply that envelope to squares because they would get distorted.

In Illustrator draw a line of squares. Have a scatter brush or make an array. If you use a scatter brush, expand the appearance. That releases the squares from the stroke. They are available for editing as a group:

enter image description here

Manually drag copies of the square groups over the perspective lines. Drag the lengths to fit. Hold shift at the same time, it makes also the heights to fit.

enter image description here

ADDENDUM: The hard work method is in practice possible only, if the distant elements also have a substantial size when they are dragged to their places. This is not the case if you try to manage as much shapes as your example image has even on the ground level. I'm afraid that your only non-programming option is to import it from a CAD program.

Here's an SVG import example which would be unmanageable by the hard work method, but was made in a CAD program easily. The squares are tilted 20 degrees from the perfect 3D vertical position. Note that in your example the amount of shapes is still much higher.

enter image description here

|improve this answer|||||

I'm guessing this may have actually been created in a 3D program... but we can still approximate this effect using Illustrator.

You are entirely on the right track with using the Perspective Grid.

Here is a simpler example like the one created by user287001 I'm posting just to show you that it can indeed be done in Illustrator:

Simple user287001 example

Note that using this method the squares stay perfectly vertical from the front row all the way to the back:

Now to recreate your example I used a two point grid which looked like this: Perspective Grid Layout 1 The rectangle on the right is my artboard. Closeup:

Perspective Grid Layout 2

Not sure if blending is the way to go... Perhaps if you created and expanded your blend off the grid and then dragged it on. I personally just used multiple squares, made right on the grid by moving while holding Alt to copy, then Ctrl+D to make the full row.

Here is my first row:

Row 1

To make my second row I move the first row while holding Alt to copy and pressing the 5 key to move it back. Second row below... I now already have 80 squares:

Row 2

And using Ctrl+D to take the rows to the horizon:All Rows

How all of this works for you will depend largely I think on the processing power of your computer. My example has larger and fewer squares than your example yet my laptop (with 8GB of RAM) still had to work hard to handle what ended up being over 20,000 individual squares (and that just for the ground plane).

Lastly I randomly selected squares and hid them (Object > Hide > Selection)...

Here is my final result, replacing the ground plane in your example:


It's not identical but it's pretty close. I doubt if my computer could handle too many more squares than this... so your results may vary.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.