Create a cubical pattern background
For this tutorial I'll first show you how you can create a cubical pattern background using Illustrator's so called Pattern Maker feature. So you need version CS6 or later for this tutorial. Then secondly I'll also show you how you can create a triangular pattern. Let's get started…
Draw a hexagon
Select the Polygon Tool which is located under the Rectangle Tool. Click on the canvas…
Enter 100 px as radius value, and 6 as the amount of sides. Click OK. For pure practical reasons, give the hexagon a color fill and no stroke.
Rotate by 30° from the center
To transform this object into a cube, we need to rotate the hexagon by 30° so we have a point at the top in the center. With the hexagon still selected, select the Rotate Tool and Alt/Option click in its exact center point. Enter 30° as the rotation angle value, and click OK.
Draw a vertical line
Now we'll create dividing lines to split this object up into 6 triangles. We start by drawing a vertical line. Select the Line Tool and draw a vertical line somewhere in the center of the hexagon (by holding down the Shift Key).
Align Vertical & Horizontal Center
Now select both objects and click both the Align Vertical Center and Align Horizontal Center aligning option from the Control bar at the top of your workspace. If you don't see this bar go to View > Control.
Copy Rotate line by -60° from the center
Select just the vertical line, choose the Rotate Tool and Alt/Option click in the exact center of the line. To help you find this exact spot, enable Smart Guides: go to View > Smart Guides. If you see a checkmark, then they are enabled. You can use Cmd/Ctrl + U to switch them on and off during your process.
In the rotate options window enter -60° as the rotation angle value, and make sure to click the Copy button. Now enter Cmd/Ctrl + D to repeat this action (Object > Transform > Transform Again).
Align Vertical & Horizontal Center
Just like before, select all objects and click both the Align Vertical Center and Align Horizontal Center aligning option from the Control bar at the top of your screen.
Divide into triangle segments
With everything still selected, go to the Pathfinder panel and choose the Divide option. This will divide the hexagon into 6 triangles.
Now select each triangle and give it a color. Use the Direct Selection Tool white arrow) to select. You can choose any color you like. You could choose only one color and play with dark and light to create depth. I've decided to keep it very colorful with the illusion of depth as if it's a cube with transparency at play.
Make a pattern
Now comes the fun part! Select the object and go to Object > Pattern > Make.
Illustrator will give you a warning message that a pattern is saved in the Swatches panel. Just click OK. Now you are in Pattern Mode. Select the Hex by Row option from the Tile Type dropdown menu, and enter a name in the Name field. Here you can still tweak the color of the pattern object if you like by using the Direct Selection Tool (white arrow). If you are happy with the result, exit Pattern Mode by clicking the back arrow at the top of your window. That's it! Now you can apply your pattern…
Apply the pattern
To apply your pattern, draw a rectangle and select your pattern as a fill from the Swatches panel. Often it happens that the pattern is either too big or too small. To fix this I usually resize my object by for instance 500% using the Scale Tool (via Alt/Option click) and I make sure that the option Transform patterns in the Scale window is unchecked.
Then I scale the object back into its original size using the Scale Tool again, and by entering 20%. Since I made my object 5x bigger I now have to make it 5x smaller. Now I make sure my pattern will be scaled too, so I check the Transform patterns and click OK. Of course you use values that you think would fit best. If you only want to scale it by half you can use 200% and then 50% to scale back to its original size.
So next is the creation of a triangular pattern background. You'll see we'll be using a similar technique of dividing an object into triangles. Let's dive in…
Create the dividing lines
Select the Line Tool and draw a vertical line (by holding down the Shift Key). You can apply a stroke color for practical reasons if you like. Now select the Rotate Tool and Alt/Option click precisely in the top anchor point of the line. In the Rotate window that appears, enter 120° as the rotation angle value, and make sure to click the Copy button. Then hit Cmd/Ctrl + D to repeat this action.
Group the 3 lines together, by going to Object > Group or use the shortcut Cmd/Ctrl + G. Now select the Rectangle Tool and draw a rectangle (landscape shape) starting on an intersection on the left line, somewhere the top left of the line (see image above). To be sure you start on the line, make sure Smart Guides is enabled (you need to see the word path appearing next to your cursor). Start drawing a rectangle, by click dragging from top left towards the bottom right. Stop dragging if the center point of the rectangle is as good as over the vertical line. So the rectangle is as good as in a centered position over the lines. Now select both the Align Vertical Center and Align Horizontal Center aligning option from the Control bar at the top of your screen to make sure everything is perfectly aligned.
Select the rectangle and move it below the lines by going to Object > Arrange > Send to Back. From the Pathfinder panel select the Divide option.
Copy Rotate at 120°
Select the Direct Selection Tool (white arrow) and delete the 2 bottom shapes so only the top (triangle) shape is left. Choose the Rotate Tool and Alt/Option click precisely in the bottom anchor point of the triangle. In the Rotate window enter 120° as the rotation angle value, and make sure to click the Copy button. Now enter Cmd/Ctrl + D to repeat this action.
Copy Rotate at 60°
If you like you can already apply colors to each rectangle. Here I've chosen to create depth again by choosing a lighter and darker green. Now select both vertical triangles (so not the top one). Choose the Rotate Tool again and Alt/Option click precisely in the bottom anchor point of the selected objects. In the Rotate window enter 60° as the rotation angle value, and make sure to click the Copy button.
If you like you can choose different colors for these 2 triangles. This is up to you.
Remove unnecessary parts
Since I want to end up with a perfect rectangular shape, I need to remove one half of the bottom triangle. I can easily do that by using one of the Pathfinder options. First draw a rectangle that aligns with the left border of the vertical triangle (see image above). Use Smart Guides so it'll snap to that line. Select both the rectangle and the triangle and select Minus Front from the Pathfinder panel.
Select the 2 triangular shapes on the left, and choose the Reflect Tool (located under de Rotate Tool… or press the letter O). Alt/Option click precisely on the vertical line as shown in the image above. In the Reflect window that appears select Vertical Axis and make sure to click the Copy button.
Make your pattern
Select the entire object and go to Object > Pattern > Make.
In the Pattern Options panel choose Grid from the Type Tile dropdown and give your pattern a name. Tweak the color of the object if you like by using the Direct Selection Tool.
That's it! I hope you liked this exercise and it gives you ideas for some fun and maybe more complex pattern creations. This new pattern feature is powerful and fun to experiment with. Here is another example of how you can use the Pattern Mode where I just used some random colourful circles. I also explain how you can save a pattern tile for the web. Have fun experimenting!