Main Site Links Resources Tutorials
News VB Gaming Code Downloads DirectX 7
Contact Webmaster VB Programming Product Reviews DirectX 8
  General Multimedia Articles DirectX 9
      Miscellaneous

Realistic Ray Tracing
Author: Peter Shirley
Publisher: A.K. Peters
ISBN: 1-56881-110-1
Purchasing: [Amazon.Com] - RRP US$35
Reviewed: 4th August 2002

Front Cover Shot:

Overview

Ray tracing is not new technology - several papers were published on the topic as early as 1980. However, with recent advances in processor/computing power it is almost possible to do reasonable quality ray-tracing in real time (compared with several hours per-frame).

For those who are completely blank, ray tracing is a method for accurately modeling the behavior of light in a 3D scene. Light travels in straight lines, hence the "ray" part, and "tracing" to model how it reflects, refracts and shades the surfaces it meets. Up until recently it has been almost exclusively a technique employed by only the most advanced 3D imaging/rendering programs (such as Lightwave and 3DSMax). Now it is regularly used by games to generate light maps for 3D worlds.

Anisotropic Specular Bidirectional Reflectance Distribution Function's

First off, this book is not for the feint-hearted, it is essentially an academic/university level text. It's heavy on the language (The title above is a section towards the end of the book, and yes, I did choose the most complicated one I could find!) and even heavier on the mathematics.

You don't necessarily need to be a genius, or even at university level; where appropriate a good, solid explanation is provided. The first main chapter of the book covers all the basic math functions - vectors, matrices and color operations. Anyone with a decent understanding of mathematics (pre-university level) will be able to work with this book. The math later on in the book gets incredibly complicated, but thankfully there is always a summary equation/example such that you can still do the practical side of things even if you don't fully understand how/why you get there.

Structure

The book itself is very small in comparison to most computer/technical manuals. Weighing in at a mere 165 pages where each is (roughly) A5 size makes it quite an expensive book given the physical size/length of the text.

However, there are very few long code-listings and large images so almost all the space is used up on relevant content. Having read through it, it definitely does not come across as being a small/short book.

There are three parts making up this text, starting with a basic (and complete) ray tracer, then adding some "bells and whistles" before finishing up with a discussion of the most advanced topics. This is a very clear and useful way to structure this book - once you've completed part 1 you will have a fully functional ray-tracer (albeit very simple). You can then read through the advanced topics and "plug them in" to your existing engine, whilst it would be best if you implemented all of the advanced features, it would be perfectly reasonable to pick-and-choose from the advanced topics.

Just a book

Unlike the vast majority of other computer/technical manuals reviewed on this site there is no bundled CD included with this book. This isn't as much of a bad thing as it sounds; all of the "code" presented in the text is written as psuedo code and math in math, regardless of language. Therefore from reading this book you can write your engine in any language without any hassle of mentally converting any code presented. It would probably work best if you used one of the newer object orientated languages - .Net language, Java, C++ and VB6 (to a lesser extent).

Brief discussion of refraction

The book does a very good job of covering all the bases, and where it doesn't go the full distance it has an extensive references list for further reading. However, I was mildly disappointed with the rather brief coverage of refraction.

Refraction is where a ray of light will change direction when passing through a semi-transparent/different density object (in simple terms). For example, it would be the reason why the image appears distorted through a glass-ball/statue. 

The math behind refraction is covered - and the eventual formula would be useful if you implemented refraction; but it's not got as good coverage as some other areas in the book.

In Conclusion

If you can handle the complexity of the ideas in this book, then you'll find it a very useful reference for ray-tracing. Even the simple engine (maybe with added soft shadows) would prove to be very useful when generating a light map for real-time/multimedia 3D worlds.

 

Good Things Bad Things
• A very useful text covering all the major areas. • Very heavy on mathematics - you need to be a competent mathematician to get anywhere.
• Not (programming) language specific. • No CD included - and no solid sample code to copy down/test.
• Good introductory section laying the groundwork.  
• Good reference list for those who want to read-around the subject further.  
• Peter Shirley obviously knows a lot about ray-tracing, so definitely a trustable source.  

 

DirectX 4 VB 2000 Jack Hoxley. All rights reserved.
Reproduction of this site and it's contents, in whole or in part, is prohibited,
except where explicitly stated otherwise.
Design by Mateo
Contact Webmaster