Ray tracing is a type of rendering algorithm that produces realistic lighting in graphics through a series of vector-based calculations. Ray tracing is extremely computationally expensive. A freelance programmer with Pixar Animation Studios, Peter Collingridge revealed that Pixar has one of the 25 largest supercomputers in the world, composing of 2000 machines and 24,000 cores. Even so, Pixar’s first fully-ray-traced movie, Monsters Inc. took two years to render.
Ray tracing is easily parallelizable considering that each pixel within a frame uses the same calculations and doesn’t rely on data from other pixels. This project consists of a program which needs an input file with information on sphere and light source locations, and a 2D-3D canvas to draw images to. The program then calculates the RGB value of each individual pixel. The type of math required in this program is highly dependent on the lighting, shadows, and reflections in the input file information.
This project parallelizes the ray tracing done in the program by splitting up the 2D-3D canvas into rows of pixels. With a preset number of workers in the program, each slice is assigned a number of rows of pixels to do computation on. The results are then sent back to complete a fully parallelized ray-traced image.