Justin's Ray Tracing How-to

Ray Tracing is method of creating computer-generated images. The scene is described mathematically in 3D space. It takes a long time to generate the image because the software traces the path of each light ray as it travels through the scene. The advantages are that complex optical effects may be simulated.

The gallery itself is located here.

How are those images created?

The program that I use to create these images is "POV-Ray", a free ray-tracing renderer that can be found at www.povray.org. POV-Ray is available for most operating systems on most hardware (you can download the source and compile it). Judging by the results in the Internet Ray-Tracing Competition (www.irtc.org), POV-Ray is keeping up with the commercial packages in terms of quality of output.

The scenes are defined in a text file, which may be edited by hand or by using a separate 3D modelling program. I have used a variety of editors over the years, and currently work in Windows using TextPad (for which I have created a custom syntax-file).

For modelling complex shapes, pencil and paper usually suffice: amazing shapes can be built up by adding and subtracting simpler shapes. I have tried 3d modellers such as Moray, but tend to get frustrated and go back to the graphite method. For complex maths in animations, I have found that hand-coding is the only way to get it right.

For converting still images from one format to another, or for creating 2D graphics. I use the Windows program Paint Shop Pro. Its forte is batch conversion from one file format to another, but it can also be used to create interesting 2D graphical effects. On Linux, "The Gimp" is very good at the same stuff, too.

Video files can get very big. Lots of research goes on into compression methods that result in smaller files, that are still of acceptable quality. MPEG was one of the first video file-formats, and has gone through several revisions. Formats such as AVI (mainly on Windows) and Quicktime (mainly on Macintosh) can be written with a variety of "codecs" (compression and decompression algorithms), and are thus able to take advantage of newer technologies as they emerge.

The videos on this site were originally created to the MPEG-1 spec using a command-line tool CMpeg. I have experimented with other formats, and have been impressed by the DivX codec for AVI, and the Sorensen encoding for Quicktime.

Other tools which have proved useful include HF-Lab for creating height- fields (hills etc), PolyRay (another ray-tracing package) and Moray (a scene building tool for PovRay). Pencil and paper are used extensively, as is a pocket calculator and occasionally a spreadsheet program.

A Word On Linux

Linux is gaining popularity across the world, and I enjoy using Linux for some of my work. It is highly stable, and copes with multi-tasking very well. It is a great platform for working with POV-Ray. On the other hand, my familiarity with Windows means it is faster for me to edit documents in a Windows-based editor. I have also found that the video support under Linux is not as easy to use as it is under Windows or MacOS, so I tend to revert back to Windows for the animation stuff.

Conversely, when building animations, I have yet to find a feature as useful as xv -wait 0 file*.tga to display the animation without compiling it. Why does this feature not exist in any of the Windows-based tools?


Return to Start Copyright © 1994-2002 Justin Watkins
If you are visually restricted, I would particularly value your feedback on your viewing experience of the graphics.