[Author's Homepage] [Author's POV-Ray page] [Brick tutorial]

Readme file for
Bricks.Inc

"Bricks" is an include file that creates brick textures that are a little more visually interesting than the default brick pattern. The user may control all aspects of the bricks' appearance (including colours, brick sizes, normal and finish, and so forth) by declaring certain identifiers prior to including the file. This file documents the use of those identifiers.

The include file is set up to assign default values to the identifiers if none are specified. To use it with default values, simply include it, then use the texture T_newBrick wherever you desire:

   #include "bricks.inc"
   box { <-100,0,-2>, <100,30,2> texture { T_newBrick }}

Changing parameters is simple:

   #declare newBrickDepth=8
   #declare newBrickMortarWidth=0.5
   #include "bricks.inc"

To use several different brick patterns, simply create the first brick texture, apply it to the object or objects you wish, change the parameters, include the file again and use that texture, and so forth.

The include file possesses a built-in mechanism to reset all identifiers to their default values:

   #declare newBrickLoadDefaults=1
   #include "bricks.inc"

This will reset the texture to its default appearance. If the user wishes to reset the identifiers to their default values, then change one or two of them, it will be necessary to include the file twice:

   #declare newBrickLoadDefaults=1
   #include "bricks.inc"
   #declare newBrickDepth=8
   #include "bricks.inc"
   box { <-100,0,-3.824>, <100,30,3.824> texture { T_newBrick }}

The dimensions of the bricks default to the values for the standard brick pattern: 8 units wide, 3 units high, and 4.5 units deep:

   #declare newBrickWidth=8
   #declare newBrickHeight=3
   #declare newBrickDepth=4.5

The mortar is slightly thinner than the value of 0.5 usually used by the default brick pattern; this may also be changed by the user:

   #declare newBrickMortarWidth=0.35

The user may supply three values for the brick colour: the midtone value, the "highlight" (the lightest colour to be used), and the "lowlight" (the darkest colour to be used). The default values provide a mixture of light and dark red bricks:

   #declare newBrickMidtone=colour rgb <0.60,0.10,0.10>
   #declare newBrickHighlight=colour rgb <0.75,0.25,0.10>
   #declare newBrickLowlight=colour rgb <0.40,0.05,0.00>

The variation in colour is provided by a bozo pattern, scaled to a relatively large value. The midtone colour is used at points 0.0 and 1.0 in the pigment map; the highlight and lowlight values default to the following values:

   #declare newBrickLowlightPos=0.20
   #declare newBrickHighlightPos=0.80

The scale of the bozo pattern is declared as follows:

   #declare newBrickBozoScale=100

The scale may be lowered to produce bricks that blend from one colour to another; experimentation will be required to produce the exact results desired by the user.

The colour of the mortar may be declared by the user; the default value is shown below:

   #declare newBrickMortar=colour rgb <0.90,0.89,0.85>

If the user desires to use a clear mortar, so that a second object set just inside the bricks can provide a more three-dimensional appearance, this can be done by declaring newBrickMortar to the appropriate values, or by adding:

   #declare newBrickClearMortar=1

By default, a small amount of turbulence is added to the brick pattern, because most real-world bricks do not have razor-sharp edges. This value may be increased or decreased for different results:

   #declare newBrickTurbulence=0.05

Too large a turbulence value may make the bricks themselves look wavy.

The pattern's default normal and finish values are shown below. These, too, may be overridden by the user prior to including the file:

   #declare newBrickNormal=normal { granite 0.1 }
   #declare newBrickFinish=finish {}

For test renders, however, the user may find the textures too slow. If the identifier Quick is defined before including the file (the value is irrelevant), the T_newBrick texture will be created to consist of the midtone pigment with no finish or normal attached.


[Author's Homepage] [Author's POV-Ray page] [Brick tutorial]