download: OpenCL_Pathtracer_Diewald.zip (24.05.2013)

… a few notes …

It’s an Java application using JOCL and JOGL.

controls

  •   LMB: rotate camera (orbit)
  •   MMB: move camera (pan)
  •   RMB: zoom camera
  •   ‘1’     … toggle sky (Ambient occlusion)
  •   ‘3’     … toggle sun
  •   ‘2’/’8′ … sun elevation
  •   ‘4’/’6′ … sun azimuth
  •   ‘p’     … pause renderer
  •   ‘s’     … save rendering

I never planned to publish it in the current state because it was always ment to be an experiment and a way to get used to OpenCL. So the code contains a lot of unecessary debugging stuff and probably errors, so don’t take my implementation of the pathtracer too seriously. Now, a few months later, i certainly would do some things differently, to speed up performance and enhance rendering-quality.

It maybe doesnt work with older graphic cards, and i’m also not sure if it works on ATI-Cards, i just had a Nvidia GeForce GTX 550 Ti to test.

requirements:

  • OpenGL 2.0
  • OpenCL 1.1

If you have problems running it, or notice any other errors in the kernel code,  feel free to send me the console-log in an email. I notices that there are some issues with ATI cards. even when they support OpenCL 1.1.


 

 

Made another test with more triangles and added dynamic sunlight. The environment lightning is a combination of direct sunlight and ambient occlusion. The ambient occlusion shading is linked to the position of the sun.

Having a dynamic sun was quite easy to implement, since its totaly independent to the scene and therefore the BVH. To enable area-lights to move their position/orientation would require an update (dynamic) of the BVH, which i havent done yet

Also i did some bugfixing on transparent materials, which casted dark shadows in previous tests. Due to this change, i got a noticeable loss in performance when running a scene with a lot transparent materials.

 

Get the Flash Player to see this content.