SMART: Spatial Measures for Accelerated Ray Tracing
John Spackman
Sep 24, 2003
Contents
1 The SMART algorithm
2 A SMART Implementation of a Ray Tracer for SPD/NFF Models
2.1 Building the SMART Ray Tracer
2.2 Invoking the SMART Ray Tracer
2.3 Output from the SMART Ray Tracer
3 Contact Information
1 The SMART algorithm
The original SMART: Spatial Measures for Accelerated Ray Tracing
algorithm was published as
- "The SMART navigation of a ray through an oct-tree"
J N Spackman
Computers and Graphics, 15, 2,
June 1991,
pp 185-194.
2 A SMART Implementation of a Ray Tracer for SPD/NFF Models
Source code for a ray tracer implementing a modified SMART algorithm for the
Standard Procedural Database models put forward by
Eric Haines
is available at
http://www.johnspackman.ukf.net/raytrace/smart.zip.
This SMART ray tracer lazily decomposes a model into an octtree during ray tracing.
2.1 Building the SMART Ray Tracer
The source code for the SMART ray tracer is in plain ANSI C,
without any SSE, 3DNow!, assembler or other such optimizations, and as
such should build on most platforms. A makefile suitable for
GNU make and a Developer Studio Project file smart.dsp are
included in the zip file for building the SMART ray tracer.
2.2 Invoking the SMART Ray Tracer
The ray tracer should be invoked from the command line as
smart.exe [-c<complexity>] [-d<depth>] [-g] [-o] model.nff
where
- -c<complexity> specifies the maximum complexity or object count
of a leaf in the octtree, as an integer; if unspecified, a default value is
assigned.
- -d<depth> specifies the maximum depth
of a leaf in the octtree, as an integer; if unspecified, a default value is
assigned.
- -g specifies the output of some diagnostic graphs in GNU plot format.
- -o specifies that the voxelated octtree decomposition be output in
neutral file format prior to being purged, to the file Smart001.nff,
Smart002.nff etc.
- model.nff specifies the model to be ray traced, in neutral file
format.
For example, invoking
smart.exe -c0 -d6 -o rings.nff
will ray trace the model
``rings.nff'' with an octtree decomposition
of complexity 0 and depth 6, with the voxelated octtree being output to
file Smart001.nff, Smart002.nff etc. which
may be subsequently ray traced for purposes
of visualisation.
2.3 Output from the SMART Ray Tracer
Image output is to a window on Microsoft Windows, or to file in
PNG image format otherwise.
3 Contact Information
For information about the SMART Ray Tracer, please e-mail
JohnSpackman@ukf.net