============================================================================== WB3RT -- The Only Ray Tracer that can claim William Baxter III wrote it October 6, 1999 Version 0.2 ============================================================================== This is a ray tracer written as a class project for Comp 238 at the University of North Carolina at Chapel Hill. -------------------- ACKNOWLEDGEMENTS -------------------- The tracer is written in C++ and was compiled with MSVC++6.0. WB3RT takes advantage of STL to some degree, and I chose to use the version called 'stlport' which is a port of SGI's STL to the PC by Boris Fomitchev. I'm also using an image library by Colloseum Builders which reads and writes PNG, JPG and BMP (at least). They wrote a book on compressed image file formats and this code was presumably developed along the way. I'm using the AdvancedXMLParser library by Sebastien Adrivet. See http://www.advtools.com. My model format is an XML document. While coding I referred occasionally to the book "Object Oriented Ray Tracing in C++" by Nicholas Wilt. It came in handy for those messy formulas like the refracted ray direction. I also referred extensively to the RayShade homepage since I based my model format on RayShade's. Enough of the acknowledgements, now for what it does: ------------------- FEATURES ------------------- As of the first release, 0.1, WB3RT had the following features: * Spheres * Planes * Triangles * Full standard local light model (ambient, diffuse, specular) * Reflection * Refraction * Point light sources As of this release, 0.2, it now has * Antialiasing * More light types including - Ambient Lights (this part was separated out from prior Point Lights) - Directional Lights - Extended lights that give SOFT SHADOWS * Some TEXTURE MAPPING - Planes and Triangles only - Triangles support per-vertex UV coords - Bilinear interpolation - The ability to control any attribute with a texture map (I think anyway, I just have to write some scenes to try this out) * GLOSSY REFLECTIONS ------------------- DETAILS ------------------- While my ray tracer currently doesn't support most of the fancy features that you could get from something more established, I'm rather happy with how my code base overall turned out. The design has worked well and has proved to be rather extensible so far. I have lots of stubs that I stuck into the XML parser where all I would need to do to support one of those fancy features would be to write one class and plug it into the existing infrastructure and write the few lines of parsing code to turn input into model. The XML format has worked out pretty well. The biggest shortcoming I see (and it may be my own fault) is that checking for correctness is a bit difficult. However, since this is XML I should be able to write a DTD (Document Template Definition???) which describes my model format completely and which the parser can use to validate the file. I'm not sure if the parser I'm using can do that though. The model format I'm using is basically a transiteration of the RayShade format into XML. The biggest problem I've had other than the sheer amount of code necessary to create a nest for these neat little algorithms to sit in, is the sampling. I ended up using uniform random sampling in both my extended light source and for blurry reflections, and the result is as may be expected, quite noisy. A sampling strategy that was a bit more band limited would have been better. My antialiasing method is just to shoot more rays through each pixel and average the resulting values together within a pixel. I use a regular grid for that. It seems to be OK. ------------------------------------------------------------------ --William Baxter --Computer Science