We have created a series of tutorials how to create a Brick material in Material-Z.

Part 1: Building the Brick Basics