Monday, April 28, 2008

Stuck on some CG stuff

So we've put the CPU side of this project to rest. We've tested our BVH tree to death CPU side, but things aren't synching up on the cg side. We struggled for a couple of days just getting our cg code to compile. Apparently there's a problem having cg that doesn't know the number of loop iteration in a while loop while compiling. Now that that's sorted out we are working on calculating the ray intersections on the GPU side.

Thursday, April 24, 2008

Journey to the GPU - Part I of 0

Having finished with most of the CPU aspect of the project, we started work on transfering the BVH and ray data to the GPU via textures. We had to review the necessary steps to convert and pass the data as textures and ran into a few roadblocks in trying to do so. Fortunately, we were able to figure most of the issues out. Currently we believe we have correctly passed the data, but are not really sure how to effectively test it. The next step we will then tackle will be formulating and coding the ray intersection test on the GPU based on the paper [1]. Hopefully this will go smoothly so we can move on to getting the results and outputting them to the screen asap. We are still excited.

[1] “A Comparison of Acceleration Structures for GPU Assisted Ray Tracing” by Niels Thrane and Lars Ole Simonsen.

Tuesday, April 22, 2008

Bunnys of the world



We've trying to make sure the textures we are sending to the cg program are set up right. They include textures containing data for the bvh tree, the ray origins, the ray directions, and the best hits so far per ray. To test them we map them to bunnies before we send the textures. Some of them seem to work, some seem to pass okay but color the bunny wrong, and some crash program...

Monday, April 21, 2008

We have fully completed the creation of the BVH tree using the top-down approach described in [Kay/Kajiya 1986]. The results look very convincing after testing with many simpler cases. The above shows our Stanford bunny with correctly applied axis aligned bounding volumes. We now will start the part of the project where we transfer the BVH tree via texture to the GPU. We are excited.

[Kay/Kajiya 1986] Timothy L. Kay, James T. Kajiya: Ray Tracing Complex Scenes, ACM Computer Graphics, Volume 20, Issue 4, p. 269-278, 1986, ACM Press, New York, USA

Wednesday, April 16, 2008

BVH Problems



We have finally fixed our problem with our normals. It turns out our PLY point indexing was incorrect, thereby causing our normals calculation to output faulty results. We laboriously traced our indices of our simple bunny in order to find the error.

We conducted research on different implementations of BVH trees and have created a root bounding box that works. We are currently unsure as to which is the most effective way to perform the subdivision of geometry. We will therefore continue with our research on possible approaches. We will look into surface area heuristics as recommended by Mr. Luebke from NVidia.

Thursday, April 3, 2008

PLY Loaders specifics

The PLY loader we wrote currently only reads in files in ascii format. There are tools out there to convert the binary PLY files into ascii ones, but they're the type of tools that are ill-documented and consist of a lot of source files you have to put together yourself, so integrating those is a back-burner step.
The stanford bunny comes in ascii PLY at varying degrees of fidelity, so he's our current test object.

Wednesday, April 2, 2008

Debug Applet Initiated

We have been able to merge the PLY loader with the OpenGL output window. Currently the shaders are simply spitting out the input data, but at least we are getting objects rendered. Our next step will be to finalize the ray tracing algorithm and apply to the debug app.

Tuesday, April 1, 2008

Project Update


We are currently making progress towards our alpha build of the project. We have thoroughly researched the background information involved in creation of the ray tracer and the bvh trees. The PLY loader is fully implemented, although the further details of its implementation will be revealed later. The OpenGL debug window has also been completed more or less. We will meet in the near future to combine the two modules. We will also revise our schedule based on advice provided to us by a previous student who worked on a similar project.