EMAIL: ian_c_thornton@hotmail.com
NAME: Ian Thornton
TOPIC: Fire and Ice
COPYRIGHT: I SUBMIT TO THE STANDARD RAYTRACING COMPETITION COPYRIGHT.
TITLE: Pawn Melts Queen
COUNTRY: UK
WEBPAGE: 
RENDERER USED:
    Java ray tracer written by me (see below)

TOOLS USED:
    Microsoft Visio (chess piece cross-section design)
    EditPad Pro (scene file editing)
    Microsoft Digital Image Pro 9 (JPEG conversion, adding name/year)

RENDER TIME:
        1s to parse scene file
       74s to generate caustic photons
    26h32m to render final image

HARDWARE USED: Pentium4-HT 3.4Ghz, 1Gb

IMAGE DESCRIPTION:

Fire and water (ok, ice), two of the great elements, line up for the first time
in competition.

After steaming into the lead early on in the game, "Team Ice" gains a strong
positional advantage with its Queen pressuring the Fire King in his own home
corner.  A humble fire pawn steps forward, Fire King nods a command and Fire
Rook (no.1), appearing to be minding his own business on the opposite end of
the board, flicks the hot-plate on.  The Ice Queen melts, the Ice King wets
himself and the match is resigned...

DESCRIPTION OF HOW THIS IMAGE WAS CREATED:

This is my first entry to the IRTC and the first public outing for a program
I've developed from scratch over the past few months (I've been off ill from
work for a while and have had PLENTY of time on my hands!).

When I was 15, I wrote an assembly-language ray tracer for the venerable old
BBC Micro Model B (anyone remember that?).  It would take about 8 hours to
render a 160x256 (non-aliased) image of a couple of chrome spheres hanging
over a red/white tiled diffuse surface.  It supported diffuse shading,
reflection, refraction and simple shadows.  It internally supported 16M colours
and could visualise this by popping up multiple frames to be exposed on an
open shutter camera.

Now I'm a little (ahem) older, I thought it time to write another. I won't
waffle on about it too much here (that's not the purpose of this file) but it
supports the usual stuff ... reflection, refraction (plus a simple form of
fresnel refraction), anti-aliasing, depth-of-field, simple radiosity, photon
mapping for caustics, bump-mapping, image-mapping, some simple procedural
texture/bump maps, reflection/specular/transmission maps, simple layering of
textures, all common CSG ops (plus one which I've not seen anywhere else before),
simple primitives (its biggest limitation), spatial subdivision and a number
of the usual speed-ups (shadow caching, ray mailboxing etc.).  I've also
implemented a C-like scene desription language, which probably took longer
to design, code and test than most of the rest of the features put together.
The program also includes a real-time, ray-traced preview mode which allows
perfect placement of the camera, manual camera-focusing on specific objects
and checking that reflection/refraction features look about right.

Written entirely in Java it's, predictably, about 2-3 times slower than PovRay
3.6.  I'll rewrite it in C++ once it's absolutely necessary (e.g. the time limit
for IRTC entries drops to one week...)

How the image was created...

CHESS PIECES

The chess pieces are all CSG merges, with the occasional CSG subtracts for
the details on the heads of the queen, bishop and rook.  The main stem of
each piece is a vertically-stretched torus subtracted from a cylinder to
carve out a curved shape (the only option in the absence of my program
supporting more advanced primitives ... it will soon).

The melting queen is basically the queen design with individual sections
rotated and translated as appropriate, plus a perlin noise bump-map applied
to enhance the appearance of melting.  The large puddle on the floor is
an ellipsoid with a similar bump-map for the ripples.

The 60 water droplets surrounding the melting queen were generated at random
(with some obvious constraints) by the program's scene description language
and, once I found a layout I liked, I commented out the generation code and
hard-coded the generated positions/radii in the scene file.

The melting queen, puddle and water droplets are all combined as a single
merge CSG object, just in case any of the droplets touch the queen/puddle or
each other (which indeed they do).  Obviously, without imposing a merge,
touching surfaces of refractive objects look weird and wrong.  Unfortunately,
I forgot to hand-craft a bounding object for this group, which probably
didn't help the render time too much :-S (CSG performance is one area
I do need to address...)

The red/orange transmission map on the fire pieces is a 3D perlin noise
volume map.  All other textures in the scene are UV-mapped (i.e. 2D surface
maps).

BOARD

Simple, infinitely-thin square primitive with procedural texture map (tiled)
for the squares, plus more perlin noise for the bump map.

TABLE-TOP

Free high-resolution wood texture from www.mayang.com/textures also converted
to a B&W bump-map image in Digital Image Pro.  I wondered whether I should have
generated my own rather than taking from the Internet but, at the end of the day,
the table-top isn't a key feature of the image (and I did write the renderer
myself) so I thought it wasn't too big a problem ;-)

SKY

Nothing clever here ... a gentle gradient of light-cyan at the top and white at
the horizon.  A textured sky sphere would have made the refracted details too
fussy, hence me sticking with a solid colour designed to make the ice more, umm,
icy.

LIGHTING

The main lighting is simply 4 point lights positioned above each corner of the
main chess board surface.

My first idea to give the impression of intense heat around the glowing pawn was
to rely solely on a flood of caustic photons for that piece only.  This generated
some nice fiery orange/red arcs of colour on the surface of the board but didn't
really help the illusion of glowing, fire, heat etc.  To remedy this I first placed
a small, bright-orange area light directly above the pawn.  This improved the caustics
dramatically making them far more focused and centred around the pawn.  The resulting
coloured shadow around the base of the pawn looked great too.  The final render is
achieved with soft shadows switched off ... the resulting hard coloured shadow around
the pawn's base gave me a perfect hot-plate without having to resort to more texture
mapping :-)

It was tempting to flood every single chess piece with caustic photons, which wouldn't
have increased the render time that much (OK, the parse time would have been 30 minutes
for over 3 million photons but this is a drop in the ocean compared to the overall time).
However, the full-caustic rendered scene looked far too fussy and detracted attention
away from the queen/pawn fight, so I decided against it.

MISC

I test-rendered with/without depth-of-field effects.  The non-blurred image looked
very clean and the details of the refracted scene (especially in the ice pieces) looked
great.  However, I finally settled for mild focal blur, again to highlight the queen/pawn
action and make the whole image look a tad more realistic.  

Final image rendered at 1024x768, maximum ray depth of 10 (to prevent too much
blacking-out of refraction details), 50 samples per pixel for depth-of-field and
anti-aliased at 16 samples per (appropriate) pixel.  Most of the core render
time would have been spent by vast numbers of refracted ways negotiating their way
through the CSG objects (especially the 80-primitive melting queen combination).

ZIP includes full scene file plus a screen-shot of the ray tracing program part-way
through the anti-aliasing pass, just to prove it exists ;-)