Page 1 of 3

My Optix porting of SmallVCM (only PathTracer & BDPT)

Posted: Sat Mar 08, 2014 5:35 pm
by AGPX
Hi all,

I have implemented a Path Tracer and a Bidirectional Path Tracer based on the brilliant SmallVCM code using Optix 3.0.1 (I'm going to update it with the fresh new Optix 3.5).
You can download the demos here (based on your compute capability):

Pathtracer SM2.0: https://drive.google.com/file/d/0B5XiKs ... x0cHlGVmM/
Pathtracer SM3.0: https://drive.google.com/file/d/0B5XiKs ... VYMTh1ekE/

Bidirectional SM2.0: https://drive.google.com/file/d/0B5XiKs ... ZPNFRDSWM/
Bidirectional SM3.0: https://drive.google.com/file/d/0B5XiKs ... BjZlh3MWc/

N.B.: the SM3.5 seems not work for some reason on which I'm investigating.
S1.png
S2.png
S3.png
This is a work in progress. Actually the demo use a single sample per pixel. Some keys:

- o: change the object;
- n: change the object material;
- space: change light conditions;
- 0-9: change max path depth (0 = 10, default = 5);
- 'z' (Path Tracer only): toggle the stratified sampling (this make rays more coherents and produces about 30% of speedup. I'm aware of the strange effects when you activate the stratified sampling.);

The scene is completely made of triangles (loaded from .obj files).

Actually I have only tested the SM2.0 because my video card is quite old :-( .... Can you please give a try on your video card and reports frame rate? Thanks in advance.

- AGPX

Re: My Path Tracer + Bidirectional Path Tracer

Posted: Mon Mar 10, 2014 1:28 pm
by spectral
It crash on my computer !!!

Re: My Path Tracer + Bidirectional Path Tracer

Posted: Mon Mar 10, 2014 2:35 pm
by AGPX
spectral wrote:It crash on my computer !!!
(!)

Which version have you tried? At least the SM2.0 works on my video card: nVidia Geforce 555M 2Gb.

Re: My Path Tracer + Bidirectional Path Tracer

Posted: Tue Mar 11, 2014 8:52 am
by AGPX
Ok, some people report crash on the 3.5 version. It's strange, because I have simply recompiled the code using the compute model 3.5 (as for the other two versions). Looks like a CUDA 5.0 compiler bug (unfortunately it's not the first I discover...). I'm going to post this on the nVidia Developer Forum (but I want definitely to upgrade to Optix 3.5 and CUDA 5.5). The version 3.5 is removed from the original post.
Spectral, can you please confirm that the version you have tried is the 3.5?

Re: My Path Tracer + Bidirectional Path Tracer

Posted: Tue Mar 11, 2014 2:09 pm
by spectral
Hi,

Yes it was with 3.5 !

It works with 3.0 but looks VERY VERY SLOW !! I got 4 FPS on a GTX690

I have try to reproduce your test scene in our GPU renderer, it use a kind of BDPT too... and is not optimized yet (For the next version) ! 47 FPS !
And with our new path tracer (no caustics) we got 200 FPS and a noise free image in 30-40 seconds.

One question, where is located your ligth ? Which kind it is (area, point ... ) ?

Re: My Path Tracer + Bidirectional Path Tracer

Posted: Tue Mar 11, 2014 2:21 pm
by AGPX
spectral wrote:Hi,

Yes it was with 3.5 !

It works with 3.0 but looks VERY VERY SLOW !! I got 4 FPS on a GTX690

I have try to reproduce your test scene in our GPU renderer, it use a kind of BDPT too... and is not optimized yet (For the next version) ! 47 FPS !
And with our new path tracer (no caustics) we got 200 FPS and a noise free image in 30-40 seconds.

One question, where is located your ligth ? Which kind it is (area, point ... ) ?
Hi, thanks for the test. The initial scene use a directional light. Pressing space you have a sky light only and pressing space again you have a single area light.
I use 5 bounces by default. You can change it pressing key '0' - '9'. (0 = 10 bounces).
Actually this is a direct port of the SmallVCM code (as is, without vertex connection merging). Yes, it's quite slow, I haven't performed any optimization yet, but
I wish to figure out where the main bottleneck is....
Can you please try also the PathTracer and report the framerate? Another question, you obtain 47 fps using triangles or other primitives?

Re: My Path Tracer + Bidirectional Path Tracer

Posted: Tue Mar 11, 2014 2:31 pm
by spectral
50 FPS for the path tracer... looks really better ;-)

But as you know, there is more "math" stuffs with the BDPT and also more divergence because of additional lights path... so, doing a fast PT is simple... but doing a BDPT with the same speed... I'm not sure it is possible !

Re: My Path Tracer + Bidirectional Path Tracer

Posted: Tue Mar 11, 2014 2:39 pm
by AGPX
spectral wrote:50 FPS for the path tracer... looks really better ;-)

But as you know, there is more "math" stuffs with the BDPT and also more divergence because of additional lights path... so, doing a fast PT is simple... but doing a BDPT with the same speed... I'm not sure it is possible !
Yes, BDPT shoot more rays and it requires scattered writing in the framebuffer (at least, it's implemented this way, in the light tracing pass). I think that a more GPU-friendly algorithm is necessary. Any suggestion is welcome ;)

Re: My Optix porting of SmallVCM (only PathTracer & BDPT)

Posted: Tue Mar 11, 2014 3:32 pm
by AGPX
Ah... I forgot... GTX690 is a dual GPU, you have to press the 'P' (uppercase!) key to increase the number of devices used (I'm not sure if Optix automatically use both)...

Re: My Optix porting of SmallVCM (only PathTracer & BDPT)

Posted: Tue Mar 11, 2014 3:37 pm
by spectral
No,

I have try... but still the same FPS !