Monday, March 26, 2012

GPU Final: Week 2

I got started on the final project last week.

Yet I've got other projects due so I got started on Friday. I spend the whole weekend on the final project. 
Begin with the getting familiar with G3D engine. I studied the starter code carefully, and doing so to the raytrace and shader sample code. Now what I'm capable to build a scene and rendered with OpenGL, also GLSL could be used if I want to.
Yet designing the structure needed for photon mapping, and taking advantage of GPU is not a trivial task. 
I'll spend this week on this part.

Because G3D engine provide data file import as well as several famous scene and objects, I guess what my final scene would be a stanford bunny in the scene sponza.

The paper present a impressive idea, but in implementation, it's far more difficult than I thought. Good luck to myself.

Monday, March 19, 2012

GPU Final: Week 1

Sorry for being late in updating.

In the past week, I've been preparing for interviewing blue sky animation studio, and did not spend much time on the GPU final.

I've read the paper twice more, and have basically understood how the whole process worked. Also I referred to the author's website, where suggestion of implementation had been listed.

So to implement, I would based on a physics engine called G3D recommended by the paper author. I've setup the environment for the G3D library, and it could functioning properly on my computer right now.

For next step, I'll start off to get familiar with the G3D library and design the data structure needed for implementing the paper. Recently I've been pretty busy in preparing for 3 final projects, 2 homework assignments, 2 presentations and also a few possible internship position. I hope I could finish all the miscellaneous stuff  as soon as possible and focus on all my final projects.

Saturday, March 10, 2012

Pitch for GPU programming final

    I've always been interested in Computer Graphics, especially global illumination. And among all the existing global illumination algorithms, photon mapping is the one I like best. So for the final project of GPU programming course, I'm planning to implement photon mapping on GPU with the help of hardware to do the accelerating work. My goal is to make photon mapping “real-time” somehow, and interactive so that it could be used in game industry.

By searching for papers related to my idea, I found one really attractive paper, and the real time photon mapping result represented in the demo is exactly what I want.
  
The paper I would refer to is "Hardware-Accelerated Global Illumination by Image Space Photon Mapping". Basically, the method used here, Image Space Photon Mapping (ISPM), is an extension of traditional photon mapping, tuning its most expensive steps to be amenable to GPU acceleration. It treats the whole photon mapping process as photons emitted from light source and bouncing several times into the pinhole camera. The most time-consuming procedure is the first bounce and the last bounce, which stands for direct illumination and final gathering respectively. And the method used is to use bounce map for light source in calculating on GPU the result of first bounce, which contains the most photons in photon spraying. Also it changes the gathering process by scattering, making it suitable to be executed on.

Honestly speaking I’ve not understand all the details in the paper, but the main idea is innovative enough to astonish me. My plan for implementing the paper could be conclude in steps as follows. First is to understand the whole procedure of the paper in detail, and design a corresponding framework capable to show the result. As mentioned in the paper the demo was based on a game engine, which is hard for me to build upon, so designing a good framework is significant. Next step would be implementing the algorithm based on the framework. And in my anticipation, C++, CUDA programming, OpenGL and GLSL would be languages and tools used here for implementation. The last step would be tuning and testing the performance.

If available time is possible after these, I would also like to make a comparison of performance between GPU accelerated version and the CPU version to see how much performance enhancing could be achieved.

Here is the paper and the demo attached: