---- DATABASE ERROR: 1 ----

Quick And Dirty: Building a CSG Chess Set

by Mike Kost

Introduction

Chess sets have always had their place in ray tracing, usually right after the required sphere over a checkered plane. Even beyond their use as beginning first steps, chess sets are reoccuring props in other Povray works. To promote the advancement of chess sets everywhere, this Quick and Dirty tutorial will show how to build a chess set using (mostly) construction solid geometry (CSG) in Povray 3.6.

Quick Reading

In Povray, as in chess, it is best to study before making a move:

Beginning Design

Chess sets have a motif that runs through the whole set. Some sets hold closely to this theme while others are barely recognizable except for the base on each piece being similar. This chess set will have an abstract style centered around the curvy center of a torus.

Stem rendering
The stem is constructed by taking the difference of a box and a torus as shown below. The translate is added to put the bottom of the stem at y = 0. 
difference {
    box { 0.4, -0.5 }
    torus { 0.8, 0.7 }
    translate <0, 0.5, 0>
}

The Pawn

To construct the pawn, the lowliest of the chess pieces, a sphere is added on top of the stem.
Pawn rendering

merge {
    object { O_Stem }
    sphere {
        0, 0.17
        translate <0, 1.01, 0>
    }
    texture { T_White }
}

The Rook

Rooks are taller than pawns and have castle battlement tops. To get the effect, it's necessary to subtract off some material from the stem. A cylinder will be used to hollow-out the top of the stem and several boxes will be used to add the notched battlements. The squares and cylinders are pictured below.
Rook cylinder & squares
This structure is subtracted from a scaled up stem to produce the rook. Basic scripting was used to create the multiple boxes at regular intervals instead of writing them all out.
Rook rendering

difference {
    object {
        O_Stem
        scale <1.1, 1.2, 1.1>
    }
    cylinder { 0.95*y, 1.1*y, 0.17 }
    #local i = 0;
    #while (i < 4)
        box {
            <-0.04, 1.0, -1>, <0.04, 1.1, 1>
            rotate 45*y*i
        }
        #local i = i + 1;
    #end
}

Continue To The Next Page

Copyright (C) 2006 Mike Kost