My Optix porting of SmallVCM (only PathTracer & BDPT)

Practical and theoretical implementation discussion.
AGPX
Posts: 12
Joined: Sat Jan 11, 2014 4:35 pm

My Optix porting of SmallVCM (only PathTracer & BDPT)

Post by AGPX » Sat Mar 08, 2014 5:35 pm

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
S1.png (233.34 KiB) Viewed 8987 times
S2.png
S2.png (388.8 KiB) Viewed 8987 times
S3.png
S3.png (316.38 KiB) Viewed 8987 times
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
Last edited by AGPX on Tue Mar 11, 2014 3:06 pm, edited 2 times in total.

spectral
Posts: 382
Joined: Wed Nov 30, 2011 2:27 pm
Contact:

Re: My Path Tracer + Bidirectional Path Tracer

Post by spectral » Mon Mar 10, 2014 1:28 pm

It crash on my computer !!!
Spectral
OMPF 2 global moderator

AGPX
Posts: 12
Joined: Sat Jan 11, 2014 4:35 pm

Re: My Path Tracer + Bidirectional Path Tracer

Post by AGPX » Mon Mar 10, 2014 2:35 pm

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.

AGPX
Posts: 12
Joined: Sat Jan 11, 2014 4:35 pm

Re: My Path Tracer + Bidirectional Path Tracer

Post by AGPX » Tue Mar 11, 2014 8:52 am

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?

spectral
Posts: 382
Joined: Wed Nov 30, 2011 2:27 pm
Contact:

Re: My Path Tracer + Bidirectional Path Tracer

Post by spectral » Tue Mar 11, 2014 2:09 pm

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 ... ) ?
Spectral
OMPF 2 global moderator

AGPX
Posts: 12
Joined: Sat Jan 11, 2014 4:35 pm

Re: My Path Tracer + Bidirectional Path Tracer

Post by AGPX » Tue Mar 11, 2014 2:21 pm

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?
Last edited by AGPX on Tue Mar 11, 2014 2:34 pm, edited 1 time in total.

spectral
Posts: 382
Joined: Wed Nov 30, 2011 2:27 pm
Contact:

Re: My Path Tracer + Bidirectional Path Tracer

Post by spectral » Tue Mar 11, 2014 2:31 pm

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 !
Spectral
OMPF 2 global moderator

AGPX
Posts: 12
Joined: Sat Jan 11, 2014 4:35 pm

Re: My Path Tracer + Bidirectional Path Tracer

Post by AGPX » Tue Mar 11, 2014 2:39 pm

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 ;)

AGPX
Posts: 12
Joined: Sat Jan 11, 2014 4:35 pm

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

Post by AGPX » Tue Mar 11, 2014 3:32 pm

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)...

spectral
Posts: 382
Joined: Wed Nov 30, 2011 2:27 pm
Contact:

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

Post by spectral » Tue Mar 11, 2014 3:37 pm

No,

I have try... but still the same FPS !
Spectral
OMPF 2 global moderator

Post Reply