Wow, that is awesome!
Why is this not enabled by default?
In my computer I have 3 graphics cards. Recently I swapped one of my three GTX 1080 for an RTX 2080 SUPER. Everything seems to work just fine so far.
In that scene I just tested I get the following results:
1 GTX 1080 on CUDA: 7:47 min
1 GTX 1080 on OPTIX: 7:34 (interesting…)
1 RTX 2080 on CUDA: 4:43
1 RTX 2080 on OPTIX: 2:50 (super interesting…
1 RTX + 2 GTX on CUDA: 2:13
1 RTX + 2 GTX on OPTIX: 1:46
So, OPTIX yay! If only it had Bevel + AO shader, and most importantly BPT.
But other than that, I think it should be enabled for GTX cards as well!
Not to completely derail this discussion but I think there’s actually better techniques on the block these days. Raw BPT has issues with certain paths. To overcome some of that, there is Unbiased Photon Gathering (pdf) which is like an unbiased version of Photon mapping. And, instead of a fully new algorithm, it’s also possible to modify BPT (pdf) to make these problematic paths more accessible
Either way though, as far as I know these algorithms are generally really hard to efficiently implement on GPU. The problem I think vaguely is that, while those algorithms are basically just as parallelizable as PT, in that you just add up lots of events from the same basic process to get your end result, it’s hard to predict how each individual pass works out, so you can’t group similar tasks (similar rays) together as well, which means context switching, which GPUs are really bad at.
I just want to know if this doesn’t work on my card because it is a GTX card, or if this may be a bug, or if just that viewport denoiser has not been implemented yet for other viewport resolutions other than 1x.
To clarify this for people – this isn’t a CMAKE flag, it’s an environment variable (the picture above looks like a cmake-gui window to me? But maybe it’s a gui environment variable editor).
So for example, on my Ubuntu machine, I can set the variable with: CYCLES_OPTIX_TEST="all" and then, when I run Blender from this console, it will have access to this environment variable, and I’ll be able to attempt to use Optix with my GTX card (works beautifully on GTX1080). Now, if I want to make this persistent so that I don’t have to set the variable everytime, I can export CYCLES_OPTIX_TEST and it will be saved as an environmental variable.
This works on the build-bot builds, ever since the commit was added.
I hope this helps people who were confused, like me. Thanks @LazyDodo for helping me over at Blender.chat, and for making the commit.