From BlenderWiki

Jump to: navigation, search

Tricks with Bricks

Blender's node based textures offer two patterns, Checker and Brick. The former has only a size control but the latter has a wide variety of input and controls that make it a far more versatile tool than its name would suggest. Later in this tutorial we will see the Brick pattern used to create tiles, windows and crazy paving. You may also find some of the techniques for connecting and using other nodes helpful in other situations.

Before we get started however, we should review the controls available in the brick pattern generator.

Brick Pattern Inputs and Controls

Reading from top to bottom of the fully expanded node, we see:

  • Offset - how far (in brick lengths) to offset every nth row of bricks
  • Frequency - The value of n above
  • Squash - how much (in brick lengths) to scale every mth row of bricks
  • Frequency - The value of m above
  • Bricks 1 - the color or texture of some of the bricks
  • Bricks 2 - the color or texture of some other of the bricks
  • Mortar - the color or texture of the gaps between the bricks
  • Thickness - the size of the gap between the bricks
  • Bias - a value between -1 and +1 which determines the distribution between the two brick colors above
  • Brick Width - the normal (unsquashed) width of the brick
  • Row Height - the height of the brick
Blender3D FreeTip.gif
Single Brick Color
If you want all your bricks the same color use the bias value, +1 for the upper color input, -1 for the lower

Brick Arrangements

Standard Brick Proportions

Standard Brick Proportions

Historically, bricks have been made in many shapes and sizes, however modern bricks (house bricks) have largely been standardised. The sizes shown in Standard Brick Proportions produce a brick pattern of modern proportions at a reasonable scale.

Brick Bonds

English Bond Pattern

The pattern in which bricks are arranged in a wall is known as a bond, in particular the pattern shown in Standard Brick Proportions is known as stretcher bond as the long side of the brick is called a stretcher. This bond is very common on modern cavity wall buildings in which a single thickness of bricks is used to face an inner wall made of breeze blocks (cinder blocks in the US).

Where a thicker wall is made of bricks, some of the bricks must be turned sideways to bind the wall together. For example, every other row can be turned sideways, showing the header side of the brick. This gives us a pattern known as English bond. We can reproduce this by using the settings shown in English Bond Pattern. Note that we have changed the Squash value to 0.5 on every 2nd row (Frequency).

Common Bond Pattern

Sometimes, we see several rows of stretcher bond between the rows of headers, this is known as common bond and is achieved by changing the frequency input - for example setting the frequency to 6 gives five rows of stretchers to one of headers, a typical arrangment for common bond.

Header Bond Pattern

Another possible arrangement is to turn all of the bricks sideways, resulting in header bond. This is simply achieved by reducing the 'brick width to half of the normal value. This bond is typically used on curved walls - most bricks don't bend!

There is a final common arrangement known as Flemish bond in which each row has alternate stretchers and headers, however this is difficult to achieve with the existing brick pattern. A partial solution is included as an appendix.

Shoddy Brickwork

So far we have seen brick arrangements that are, literally, mathematically precise. My brick layings skills are nowhere near that good, so how can we add some realistic imprecision? Simply shuffle the bricks about a little by injecting some noise via a translation node. Any smoothly varying noise should do, but note that the noise size should typically be a bit bigger than the bricks and that the turbulence should be kept at quite a low value, as shown below.

Shoddy Brickwork

Crazy Paving

If we do choose to increase the turbulence we can get an effect of crazy paving, as seen in the node network below. A cloud texture has been applied to the translation of some square bricks.

Crazy Paving


Bathroom Tiles

Those square bricks give me an idea, they look a bit like bathroom or kitchen tiles... To create some we just need to set the offset to 0, make the height the same as the width and reduce the mortar thickness a little.

This is a good time to look at adding some extra features to the Brick Pattern - for example it is often useful to create the mortar and the bricks separately. Lets have a close look at the node network below, which has been grouped into areas.

Bathroom Tiles

In the area marked 1 we have a pure black and white brick pattern that has been distorted by a cloud texture. This stencil is used in two places, in area 2 it is used to mix in a grout coloured texture (from area 4) into the black areas, and some patterned tiles (from area 5) into the white areas. These are combined into an output called colour. The stencil is also used in area 3 to create a separate output, in this case called normal.

This texture can be used twice in a material, once with the colour output to create the diffuse colour and once with the normal output to create a bump map. An example use of this material can be seen below.

Bathroom Tiles Example


Skyscraper Windows

Hey, those tiles also look a bit like a a glass curtain wall of windows on a skyscraper don't they? Lets rearrange the sizes a bit to make them rectangular. This is another case in which separating the mortar (building fabric) and the bricks (windows) would be useful - the windows would be a little bit transparent (possibly with another texture behind them) and reflective, while the building fabric would have only a diffuse texture.

Half Height Windows

If we wanted less of a curtain wall and more distinct windows we can use a little trick to blank out every other row by setting the squash value to 0 and the frequency to 2.

To create tall windows instead of wide ones just connect a distort -> rotate node to the color output of the bricks pattern node and set the rotation to 0.25 turns in the Z axis.

Irregular Windows

If you don't like such regularity we can create random window sizes by connecting up some random zero depth cell noise to the brick width input, as shown below.

Randomly Sized Windows

To get this effect you need to ensure that the noise size is the same as the row height. Note also that the input colours vary from black to white so the brick width varies from zero to one. You could use shades of gray if you wanted a smaller range, or use a math node multiplier between the noise and the brick width input if you want a larger one. You could even use a stepped RGB Curve node instead of the multiplier node to have random windows from a fixed set of different widths. Feel free to experiment!

A Random Selection of Windows

It can be useful to select a subset of windows, for example to have some of them emitting color and thus appear to have a light on behind them. This can be done by masking out some of the windows, as shown below.

Random Windows

Looking at the nodes from left to right, first we have two math nodes - I am just using these to make sure that the brick sizes are the same (Blender lacks an input value node so I just use a math node set to maximum).

Next we have a brick pattern node with brick colours varying from pure black to pure white, and the mortar pure black. The output colour of this node is passed through a math node set to greater than 0.9 - so its output is 0 if the input is below 0.9 and 1 if the input is 0.9 or above. This means that roughly 10% of the windows should appear in the final output. Adjust the value of the math node to choose what percentage of windows should appear in the final image.

Below the math node is a brick pattern with the brick colours set to nice warm colours, like interior lights.

The real work is done in the mix node - this starts with an empty area (with an alpha channel of zero) and only where the math value is 1 does it copy over the colour from the second brick pattern.

You can use this technique either to draw only a subset of windows, or to mask a subset of lighted windows on top of a complete wall of dark windows for example.

Windows With Frames

We can use a similar layering technique to create a frame around each window, look at the node network below.

Framed Windows Node Network

The two math nodes on the left are just used as input nodes to ensure that all our brick patterns are the same size. There are two key points to note

  • The relative sizes of the mortar thickness (outlined in yellow)
  • The order in which the various layers are mixed and the selection of the alpha channel which controls the mix

Below we see a render of a material using just this texture.

Framed Windows Example

Bringing it all Together

The image below shows a building with a single material showing four different types of framed window, randomly located with a bump map and reflection channel all generated by brick patterns, using the techniques discussed above.

Skyscraper Windows Example

Tips For Using the Bricks Pattern Node

When you are using the Bricks Pattern in a texture, remember that it is a 2-dimensional texture projected onto the X-Y plane (the ground). If you want to use the texture on a vertical wall then you may need to use the mapping buttons in the texture panel, for example mapping X to Z and Y to X.

Also, when using brick patterns try to avoid showing closeups of corners in your renders or animation. The patterns above are found in continuous stretches of walling - near corners quarter and three quarter bricks (known as closers) are used to ensure that the ends of the wall are straight. These patterns cannot reproduce those effects. Even the stretcher bond changes as it goes around a corner, what is a header going into the corner is a stretcher coming out. Try hiding corners with vegetation or perhaps by using larger squared off stones (known as quoins) at the corners.

Appendix - Flemish Bond

As discussed above, Flemish Bond is a brick bond that requires some skill to lay out neatly, and is often seen on older, high status buildings. The brick pattern texture node cannot create this bond directly, but we can simulate it by using the node network shown below.

Flemish Bond Node Network

We have a normal stretcher bond brick pattern which we offset by one third of the brick width and overlay on itself using a mix node.

There are two minor problems with this - the vertical mortar is less intense than the horizontal and brick colours are more difficult to control as they are mixed with themselves. The mortar problem can be solved by creating a mask using the same same settings but with white bricks and black mortar and using this as a stencil over a mortar colour. The brick colour just takes trial and error!


I hope you found this tutorial useful and it has sparked some creative ideas for Blender!

Thanks to all the Blender team who have made Blender what it is today!