Here is a snapshot from my latest GLSL Path tracer which was inspired by the excellently done path tracer in WebGL by Evan Wallace(http://madebyevan.com/webgl-path-tracing/). I have modified his code considerably to make it run even faster on PC.
It runs at ~70fps with 128 samples per pixel for an output res. of 1024x1024. Check this video captured live from a session.
Another video showing a live editing session.
Another video showing the famous Cornell Box scene.
This demo renders the famous Cornell Box scene in realtime. You can edit all the parameters live and it renders at ~240 fps on my NVIDIA Quadro FX 5800 on an output resolution of 1024x1024. I have not added importance sampling or any other optimization. Adding those will certainly make it even faster.
Yet another video of Cornell Box
This time it is even better with more photons. Takes a bit longer to converge but the output is worth it. GLSL Pathtracer Demo Enjoy!!!
It runs at ~70fps with 128 samples per pixel for an output res. of 1024x1024. Check this video captured live from a session.
Another video showing a live editing session.
Another video showing the famous Cornell Box scene.
This demo renders the famous Cornell Box scene in realtime. You can edit all the parameters live and it renders at ~240 fps on my NVIDIA Quadro FX 5800 on an output resolution of 1024x1024. I have not added importance sampling or any other optimization. Adding those will certainly make it even faster.
Yet another video of Cornell Box
This time it is even better with more photons. Takes a bit longer to converge but the output is worth it. GLSL Pathtracer Demo Enjoy!!!
25 comments:
Are you planning on posting any sample code anytime in the future?
I've written raytracers before, but this puts my work to shame.. :)
Awesome stuff!
Hi Seth,
Thanks for the compliments. Currently, I am very busy with some stuff. I am planning to opensource this pathtracer. Another thing I am planning is to do a book on practical GLSL-based ray/pathtracing and photon mapping. I have seen a couple of books but none of these give u practical details on how to do it in practice. Stay tuned for more stuff soon.
Cool stuff. I would be interest in purchasing your book and see a live demo for myself. Let me know when you have any of that info out. Keep up the awesome work!!!
HI Mark,
Thanks. I am a bit involved these days. I have this in my pipeline as soon as I am free I will be focusing on this.
Regards,
Mobeen
What did you do to make it faster?
hi Brendon,
I have removed the sqrt in the uniform hemisphere sampling which Evan Wallace used. This gives almost the same output but with improved performance. Another thing I did was some shader caveats like replacing the if conditions by using the variable used as the fragment alpha. This way if the conditions is false, the alpha is 0 thus the fragment does not show up on display.
Good evening,
anyway you can share a sources for this demo? Thank you.
Dmitry.
dmitry.khudorozhkov@gmail.com
Hi Dmitriy,
I have shared the shaders already. You can give it a try first. If you really cannot do it then I will post my code here for you and others.
Thanks,
Mobeen
I have modified the link. Now it should work fine. If it doesnot, you can download from here.
https://dl.dropboxusercontent.com/u/5513476/GLSLPathTracer%28bin%29.zip
Thank you for the shaders, Muhammad. But the program doesn't work )) I get "Error executing program(t)".
Hi Dmitriy,
I have just ran it on my office machine (NVIDIA Quadro FX 5600) and it works fine. Could you share which GPU u r running this on AMD/NVIDIA and what model?
Hi,great work,but the link don't work,can you modify the link,thanks
Hi blueangel74,
Well it works for me both on my home network and my office network. Could u try this direct link
https://dl.dropboxusercontent.com/u/5513476/GLSLPathTracer%28bin%29.zip
Hi,
also cannot run the GLSL Path tracer with NVIDIA 310M or NVIDIA 560GTX. Have bought your CookBook (which is really awesome :)) and PathTracing example from there is running on both cards. Any idea why this is not working?
hi MarioFoerster,
What error do you get on the dos console? Or is it some side-by-side configuration error?
Thanks,
Mobeen
Hi,
yes it show some Sidy-By-Side configuration error ...
OK the reason you get this error is because probably you are running the code on an x64 bit machine. I build the exe on an x86 machine. I will upload an x64 version of code and let you know.
Thanks,
Mobeen
Thanks for sharing.
Thanks for sharing
Hi, I'd like to test the code on a 64 bits machine.
Do you think it is usable in realtime in WebGL ?
The original version was not because there was some loud noise at the screen on object displacement...
Hi Denis,
Sure it should be fine on an x64 machine too. it should be fine in webgl as I converted the original webgl code to c++.
Regarding loud noise on object placement is expected as that is how path tracing works. The results should converge rapidly to a noise free output.
Could you provide a 64 bits executable ?
OK I will but please provide me some time.
Here you go
https://www.dropbox.com/s/k6dfcwms17p75tq/GLSLPathTracer_x64.rar?dl=0
Hi, could you provide the source code?
Post a Comment