|
1 |
| -# raytracinginoneweekend |
2 |
| -# raytracinginoneweekend |
3 |
| -# raytracinginoneweekend |
| 1 | +Ray Tracing in One Weekend |
| 2 | +==================================================================================================== |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | +## Getting the Book |
| 7 | +You can download the PDF version of the book from Eric Haines [Real-Time Rendering] site. |
| 8 | +Alternatively, you can purchase a Kindle version of this series from [Amazon.com]. Half of the |
| 9 | +proceeds of these sales go to [Hack the Hood], a really neat organization. |
| 10 | + |
| 11 | +## Overview |
| 12 | +I’ve taught many graphics classes over the years. Often I do them in ray tracing, because you |
| 13 | +are forced to write all the code but you can still get cool images with no API. I decided to adapt |
| 14 | +my course notes into a how-to, to get you to a cool program as quickly as possible. It will not be |
| 15 | +a full-featured ray tracer, but it does have the indirect lighting which has made ray tracing a |
| 16 | +staple in movies. Follow these steps, and the architecture of the ray tracer you produce will be |
| 17 | +good for extending to a more extensive ray tracer if you get excited and want to pursue that. |
| 18 | + |
| 19 | +When somebody says “ray tracing” it could mean many things. What I am going to describe is |
| 20 | +technically a path tracer, and a fairly general one. While the code will be pretty simple (let the |
| 21 | +computer do the work!) I think you’ll be very happy with the images you can make. |
| 22 | + |
| 23 | +I’ll take you through writing a ray tracer in the order I do it, along with some debugging tips. By |
| 24 | +the end, you will have a ray tracer that produces some great images. You should be able to do |
| 25 | +this in a weekend. If you take longer, don’t worry about it. I use C++ as the driving language, |
| 26 | +but you don’t need to. However, I suggest you do, because it’s fast, portable, and most |
| 27 | +production movie and video game renderers are written in C++. Note that I avoid most “modern |
| 28 | +features” of C++, but inheritance and operator overloading are too useful for ray tracers to pass |
| 29 | +on. I do not provide the code online, but the code is real and I show all of it except for a few |
| 30 | +straightforward operators in the vec3 class. I am a big believer in typing in code to learn it, but |
| 31 | +when code is available I use it, so I only practice what I preach when the code is not available. |
| 32 | +So don’t ask! |
| 33 | + |
| 34 | +I have left that last part in because it is funny what a 180 I have done. Several readers ended |
| 35 | +up with subtle errors that were helped when we compared code. So please do type in the |
| 36 | +code, but if you want to look at mine, here it is. |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | +[Amazon.com]: https://amazon.com/dp/B01B5AODD8 |
| 41 | +[Hack the Hood]: http://www.hackthehood.org |
| 42 | +[Real-Time Rendering]: http://www.realtimerendering.com/#books-small-table |
0 commit comments