• entries
  • comments
  • views

GPU-powered path tracing

Sign in to follow this  


I haven't posted in a long time - busy at uni. I have nevertheless been spending some time attempting to use OpenCL for path tracing. I made a quick, throwaway program, mostly used to check out how a GPU architecture would translate to simple, hardcoded ray tracing. The results are promising to say the least... this little cornell box scene attached has - brace yourselves - 1.6 million samples per pixel, for ultimate crispiness. It is also very high resolution (3840x2160, i.e. twice a 1080p image). And it only took 20 hours of work on a mainstream GPU (I shudder to think how long it would have taken on the processor instead).

I am going to spend some time writing a basic ray tracing wrapper around OpenCL (without acceleration structures, or any bells and whistles), just to test the limits of the GPU. I have to say it is refreshing to be able to obtain a result so quickly. I don't intend to use it for real-time display, as even powerful GPU's are not yet able to do that (they can get away with perhaps at best 64 samples per pixel per frame, which still results in a lot of visual noise).

It will also give me an opportunity to rehearse those shader coding skills I've neglected for so long...

A low-resolution version of the final render is attached to this entry (the full-resolution image is available in my Gallery, and is quite big ~ 5MB in PNG format). Feel free to use it in any way you wish!
Sign in to follow this  


Recommended Comments

[quote name='Ashaman73' timestamp='1337927783']
Wow, this sounds really impressive. How does it scale with the complexity of the scene ?
I don't know yet. As I mentioned it's a throwaway program so I pretty much hardcoded it with a box and three spheres. However I will be spending some time making a more flexible version of it (where you can specify the number of objects and their position, perhaps animate them too) and see how it scales. Until I add some kind of BVH or other it will probably decrease linearly though. I believe it could still be made much faster, my CL kernel looks horrible (lots of if/then, etc...), but it was still really fast which makes a statement about how powerful GPU's are.

[quote]I'm not a ray tracing buff or anything but that sounds fast The rendering looks really nice, super-crisp![/quote]
Thanks :)

Share this comment

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now