Monday, April 9, 2012

GPU Final: Week5

The path tracer is ready. I modified the basic structure supporting both point light and area light, also the algorithm for path tracing.

Because it has to run on the GPU, with each thread in charge of a pixel, I build a color stack for each thread for unwrap the recursion. After primary rays are shooted, based on the material it hits, different kinds of secondary rays are generated  and used for later loop.

The idea of this path tracer compared to photon mapping, is to use Monte Carlo method to approximate the natural light. For random number generate, I used the thrust library. Although I haven't finished the planned photon mapping tracer, I got pretty familiar with some of common parts of the thrust library.

Apart from the light part, transparency and reflectivity are added compared to the first version of this path tracer last friday. Also a bug related to shading has been fixed.

I guess it's pretty much done for my final project. I've been working on this final project for the whole past 4 weeks. I'll spend less time on this from now on and turn to other two final projects.

If possible I'll add more feature to this path tracer and update the blog with it. For the photon mapping part, I've already build a frame work for it, and finished the photon tracing and large node construction of KD tree. I'll definitely finish that in summer, when I don't have that much pressure from the three final projects which keep me away from necessary sleeping.

Here's a picture rendered from the path tracer.

Global illumination features like the caustic effect could be seen directly from the image. Yet it takes a few minutes to render a picture with such quality. In real time it's more like a spotted image.
I'll see if it's possible to make it faster for higher quality image.

2 comments:

  1. Good progress. If you don't want to roll your own kd-tree, talk to Karl and Peter; I know they are exploring options.

    Also for your final report and presentation, make sure to include a detailed performance analysis.

    ReplyDelete