Technologies: C++, OpenGL, WinSocket2

This is a simple rendering application which uses a photon mapping technique to calculate light transport in the scene.

The scene contains two spheres with diffuse material. In this project the light is emitted from the point light source.

To render the final image a simple ray-tracing technique has been used.

This application uses photon mapping. Although photon mapping is very computation intensive, to speed up the computation the first pass of the photon mapping algorithm (photon tracing) was parallelized by running different number of threads on one PC. The time of building the photon map decreased as more threads was fired. When the threads number being run by this application was higher than the processor thread number the time needed to build the photon map started to increase. This software has been also applied to the distributed system environment where the master PC distributes the job among all of the connected slave PC’s. All machines were connected by the gigabyte switch into the small LAN network. To reduce the data which needed to be sent over the network, the scene information was stored locally on every connected PC. Each of the slave PC ran a different number of the threads based on the processor thread number. Whenever the photon hit any of the scene objects the information was stored in the flat array and later transferred to the master PC. After the master PC received all of the tracing results the Kd-tree data structure was built and it start to render the final image.

This application contained two programs.

– Client application which connect to the server application, traced the photons and sent the tracing results to the master PC.

– Server application – In order to connect multiple machines every connection was handled in different thread. At the beginning, the number of photons to trace was sent to all the connected PCs and after, the tracing results from every PC were stored in the flat array. This application built the final photon map and rendered the final scene.