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

Quick And Dirty: Building a CSG Chess Set

Return To The Previous Page

The Bishop

Bishops are even taller pieces that are sometimes pawn-like but have an extra notch out of the top. To construct the bishop, the stem is stretched to add height. A sphere is elongated to make it an oval-like solid, and a CSG difference between the oval and a box is used to remove the notch.
Bishop rendering


merge {
    object {
        O_Stem
        scale <1.05, 1.3, 1.05>
    }
    difference {
        sphere {
            0, 0.17
            scale <1, 1.5, 1>
            translate <0, 1.3, 0>
        }
        box {
            <-1, -0.15, -0.025>, <1, 0.15, 0.025>
            rotate x*12
            rotate y*30
            translate <0, 1.45, 0.075>
        }
    }
}

The Queen

The queen is a taller piece with a low, rimmed crown along the head. To construct the queen, the stem is stretched, and spheres are placed along the top to give the impression of a crown. Some scripting is used to take the drudgery out of getting the spheres placed.
Queen rendering

merge {
    object {
        O_Stem
        scale <1.2, 1.5, 1.2>
    }
    #local i = 0;
    #while (i < 7)
        sphere {
            0, 0.07
            translate <0.17, 1.55*0.9, 0>
            rotate y*360/7*i
        }
        #local i = i + 1;
    #end
    texture { T_White }
}

The King

The king is also a very tall piece and has a distinctive point or other display to represent the crown. For this king, a cross on top of a tall stem will be used to mark the crown tip. Simple and easy.
King rendering

merge {
    object {
        O_Stem
        scale <1.2, 1.5, 1.2>
    }
    box {
        <0.03, 1, 0.05>,
        <-0.03, 1.5*0.9+0.4, -0.05>
    }
    box {
        <-0.03001, 1.5*0.9+0.20, -0.15>
        < 0.03001, 1.5*0.9+0.30,  0.15>
    }
    texture { T_White }
}
 

The Knight

Knights have always been the hardest parts of a chess set. They're the most "different" of the pieces and usually require an extra burst of creativity. Unfortunately, this burst of creativity flung the knight into the realms of isosurfaces. The torus function was used to get the same starting shape as the stem, and then extra terms were thrown in the make the knight zig and zag around.
King rendering

object {
    isosurface {
      function { -f_torus(x*((1+(y+0.5))) + 0.3*sin((y+0.5)*2.5*pi)-0.3*(y+0.5), y*y, z*((1+y+0.5)), 0.8, 0.7) }
      contained_by { box {<-0.5,-0.5,-0.5>, <0.5,0.0,0.5> } }
      accuracy 0.001
      max_gradient 3
      translate <0, 0.5, 0>
      scale <2, 3, 2>
    }
}

Putting It All Together

All of the chess pieces have been placed an include file (chess_set.inc), and rendered on a chess board with some dramatic lighting. Voila!
Fully rendered chess board

Want To Know More?

I have to admit that I've had problems finding good Povray chess material. Unfortunately, several sites have ceased to exist. Here's some bits and pieces that I have been able to find:

If you run across any more chess material (or create it), drop me a note and I'll link to it.

Published: 07/02/06
Last Edited: 07/02/06

Copyright (C) 2006 Mike Kost