CS180H Schedule:

Week 16: May 13, 2014 This week was dedicated to finalizing my report and updating the research content to the website. I plan on continuing research and coding with CUDA over the summer after I graduate. A link to an external code repository will be added to this webpage as well to provide a link to the most up-to-date code.

Week 15: May 6, 2014 This week was spent writing the rough draft of my report. The rough draft was presented to Dr. Pollett for review. Aside from a few grammatical errors and the need to expand on what the Cornell Box is, the report was good. Next week will be spent finalizing the report and uploading my code and examples to the course website.

Week 14: Apr 29, 2014 The CUDA port of SmallPt GPU is complete! I demonstrated the working code to Dr. Pollett and discussed several optimizations that could be done if there were more time in the semester. These will be included in the report and I plan on continuing to work on them after this semester and graduation.

Week 13: Apr 22, 2014 Worked on porting SmallPt GPU from OpenCL to CUDA. I noticed that CUDA 5.5 is much more succinct than OpenCL and was able to reduce lines of code by about half. The porting process will be explained in more detail in the report. One thing I found interesting is that CUDA takes significantly less time to initialize than OpenCL. This may stem from the fact that OpenCL gives much more low-level access (think Assembly or C) whereas CUDA provides a much higher level access (eg C++) to GPU coding.

Week 12: Apr 15, 2014 Got a simple CUDA 5.5 program working. My first sample kernel (which will be included in the final code) updates each pixel of the window to cycle through a color wheel. This test program looks very similar to something that might have been found on MTV when it first began airing. With the knowledge of how to pass memory from CPU space to GPU space, I can move on to porting from OpenCL to CUDA 5.5.

Week 11: Apr 8, 2014 Found out about SmallPt GPU, an OpenCL port of smallpt. OpenCL is the major computer to CUDA as a general purpose computing language. Unlike CUDA , which is NVIDIA specific, OpenCL supports both NVIDIA and ATI graphics cards. As far as the application, major improvements had been done to visualize some metrics of the program as it updates. I discussed with Dr. Pollett about focusing on porting this application to CUDA 5.5 as the final project. He agreed and started work on final software.

Week 10: Apr 1, 2014 Spent this week refocusing back onto CUDA. Found a project known as tokaspt (The Once Known AS SmallPt), A CUDA 2 port of SmallPt. Unfortunately, there has been significant syntax changes between CUDA 2 and the 5.5 version that I am developing with. I could not even get the project to compile. Will focus on forming a parallel global illumination algorithm that I can implement.

Week 9: Mar 25, 2014 Spring Break. Spent week working on a 3D Scanner Project for a different class.

Week 8: Mar 18, 2014 Errors were caused due to a mixing of global and camera coordinates. Rather than wasting more time on GLSL, need to spend time getting back to the point of my research: Global Illumination and modern CUDA. I will spend next week getting back to CUDA 5.5 and getting working code examples using CUDA.

Week 7: Mar 11, 2014 Spent this week learning GLSL in more depth. Finalized a small shader sample, but lighting calculations seemed off on a basic scene. Talked with Dr Pollett about possible causes and suspect it was an error in lighting calculations. Will spend next week trying to debug lighting issues and examining the Gortler book.

Week 6: Mar 4, 2014 VS 2012 is working again! This week was dedicated to updating my radiosity engine. I finalized the Quad-Tree structure and tested it. It is now coupled with the input-file reader that had previously been developed. I am currently implementing a radiosity shader to visualize my test scene with global illumination. Coding is going much more smoothly now that the program specifications have been solidified. Focus for this upcoming week is to program the radiosity shader using hemisphere sampling and test.

Week 5: Feb 25, 2014 This week was dedicated to getting the CPU Radiosity engine working. I was attempting to implement a Progressive Radiosity algorithm, which utilizes a QuadTree to store surfaces and subdivide patches as needed. The new code base was centered on an array to store patches. When converting the code base and installing SDL, I seem to have broken VS 2012 and cannot run or debug any programs now. Internet searches suggest it is a 64 / 32 bit crossover issue. Once this is fixed, the algorithm should run. Update coming soon!

Week 4: Feb 18, 2014 This week I focused on learning GLSL and updating my code base to modern OpenGL. Currently I have a working "Cornell Box" geometry being read in by an input file. The specification is still in flux, but it currently reads in lights and quads separately with the following attributes: position vector, normal vector, color vector. I modified the fragment shader to support per vertex coloring and blending. I concurrently learned about other Global Illumination Models which may be focus of next week: Monte Carlo Integration, Hybrid Ray Tracing + Radiosity, and Photon Mapping all seem to be suited better towards GPGPU programming.

Week 3: Feb 11, 2014 This week I focused on recreating my code base. At first I attempted to fix the memory model by reducing repeated information. This led to more difficulty than expected and resulted in me learning modern OpenGL. Having little experience with GLSL, I began reading through "Foundations of 3D Computer Graphics" and building there sample "Hello World 2D" and "Hello World 3D" examples. Code was still buggy by the time I met with Dr. Pollett. I began to work on the slide set for CUDA, however, halted any further research.

Week 2: Feb 4, 2014 This week I attempted to start the first project on the Udacity course. The project utilizes CUDA to convert an image to greyscale. I ran into major issues trying to get CUDA to work on my computer. After several hours of Google, I found out that the issue lied in NVIDIA Optimus technology. Since my laptop is equipped with an integrated GFX chip on the CPU as well as a dedicated NVIDIA card, VisualStudio was automatically trying to start the program on the CPU. The fix is to force your computer to use the NVIDIA card for all applications. This setting can be changed after development to increase battery performance. As far as phase one, I found that there are some major memory issues with my CS116B code. When I first coded that project, I just wanted it to "work" and through caution to the wind. I feel it is best to start from scratch and focus on a more memory-friendly algorithm. This will be the focus of next week.

Week 1: Jan 1, 2014 This week I started the Udacity course on Parallel Programming. The course teaches Parallel Programming by using CUDA. Please see the attached power point presentation for my notes on this course. The most interesting thing I found out was that you can map CUDA processors up to 3-space by having a three dimensional grid which contains blocks. Each block can be a three dimensional group of threads. Each CUDA kernel (graphics card program) is written as if it is a serial program. the kernel has ability to access its block and thread number. This mechanism will lend itself nicely to a radiosity engine! With respect to phase one of my project, I was able to find my old code from CS116B and repair it to produce reasonable radiosity. My biggest issue was that I had an open wall and light "energy" was leaving the system. I am still unsure if I will use this code as a base for my project. I clearly defined the specification for an input file of geometery.