Thursday, October 8, 2009

Thoughts on ray tracing

Ever since I've read any articles on the topic of Ray Tracing i became interested in the topic and possible applications including dynamically correct lighting effects in animations and some serious video games. I found it interesting to think about how much proccessing power and numbers of calcualtions needed to generate these images but never really got into actually trying to create one on my own.

Thats when i stumbled upon this book: "Photorealism and Ray Tracing in C" by Christopher D. Watkins, Stephen B. Coy, and Mark Finlay. It was published in 1992 and offers a line by line deconstruction and explanation of the ray tracing software which was packaged with the book. I thought this was excellent but never really thought about how i would get the actual files off the pair of 5 1/2 in floppy disks.

Being able to see the code of the program and understand the logic (somewhat) was enough for me to try and get a small ray tracing program together from source code. As it turns out there are many places you can get amateur made simple ray tracing programs which work excellent.

The one i chose to use was PixelMachine. After compiling and running the program many times it was really easy to see how small changes in effects and thoroughness of the generated image would affect the overall time.

Now the fun part is making it faster ...