Hybrid rendering meets Cornell Box

00000000000000000000000000000000
0
Anonymous Aug 05, 2009 at 14:00

09-08-04.jpg

Description
Hello,

So again after I while I’m posting some image and some info about my progress in graphics research of hybrid graphics rendering (and implementation of it in my game engine).
Okay this time no scene , but just well known Cornell box (If you’re bored by global illumination stuff, then don’t read this - GI heavy related stuff). So generally this is focused on GI.

Okay about principle - it’s little similar to instant radiosity, basically I use ray tracer to shoot rays and calculate VPLs, I do this with several bounces. Then comes the part of lighting the model where I lit model with those VPLs.
Whole principle is slightly complicated (mainly due to optimisations), but whole solution is very fast and fully dynamic. I slightly slowed down scene with adding recursive reflections on spheres (with hybrid rendering it’s very simple and pretty fast).
Anyway I sample VPLs just for color bleeding and indirect illumination, ambient occlusion is done with help of few rays very quickly (just google to net and you will find lots of papers on this topic).

So here is video of the solution in action - http://www.youtube.com/watch?v=NA8BOPRhuxw.

I hope to hear some commentaries and opinions from you (ask about algorithm if you wish to know more about it - i might even add some pseudo code here) - thinking about writing a paper onto this (or maybe some blog+papers on my website on GI topic generally).
And due to one guy I even got idea to try interactive photon mapping (which isn’t so different from this) - just need to cast rays as in this technique (but reflect/refract them … not just compute VPLs) and compute photon map from this (instead of VPLs), and then somehow to do final gathering (hope to come with some cool idea how to final gather enough quick to be interactive).

*btw. VPL - Virtual point light (though I hope you already know this)

5 Replies

Please log in or register to post a reply.

5f8d1e15c62932fa37f8a383b8567e52
0
macnihilist 101 Aug 05, 2009 at 15:35

Looks very nice! Do you have some more information on your hybrid renderer? I’m quite interested in this topic.

A few other dumb questions:
- What parts of your technique run on the CPU (if any)?
- The solution seems very smooth, are you using some sort of importance/interleaved sampling or just many VPLs?
- The objects in the video are moving quite slowly, is this because you are using some incremental approach to update VPLs?

Cheers,
Karsten

46407cc1bdfbd2db4f6e8876d74f990a
0
Kenneth_Gorking 101 Aug 05, 2009 at 17:12

Yeah, looks good man, but why are there no reflections on the left sphere?
@Vilem Otte

And due to one guy I even got idea to try interactive photon mapping (which isn’t so different from this) - just need to cast rays as in this technique (but reflect/refract them … not just compute VPLs) and compute photon map from this (instead of VPLs), and then somehow to do final gathering (hope to come with some cool idea how to final gather enough quick to be interactive).

There is a guy called Vlad Stamate, who did an article for ShaderX6, called “Real-Time Photon Mapping Approximation on the GPU” (presentation, source), which sounds like something that might interrest you :)

B20d81438814b6ba7da7ff8eb502d039
0
Vilem_Otte 117 Aug 05, 2009 at 23:34

#macnihilist - Thanks, to the matter of hybrid renderers - I’m preparing some article (and maybe if I will continue in it, it would grow to article serie) on them + sample applications + maybe even some sample code, although it sometimes get really tricky and brain heavy (one must know something about rasterization and raytracing + lots about multi pass rendering (because you can say that one pass is ray tracing and another rasterization (which can be mutlipass too).

What parts of your technique run on the CPU (if any)?

Mainly computing VPLs, although reflections are done through ray tracing too (although it got a little tricky, because there was just too much VPLs for ray tracing), and ambient occlusion (which was quite a challenge to get it real time, but with 1/4 screen size it wasn’t THAT hard)

The solution seems very smooth, are you using some sort of importance/interleaved sampling or just many VPLs?

Nope, I use even less VPLs than most people that tried this GI solution. Smoothness is mainly due to tricky ambient occlusion solution (through ray tracing (without stochaistic sampling) + then smoothed/blurred on GPU while combining it)

The objects in the video are moving quite slowly, is this because you are using some incremental approach to update VPLs?

The solution is brute-force method (resampling VPLs every time light moves - in video light is static, but as I said I hope to think of and make some small scene (KD-tree friendly one) where I would be able to fully test this approach).

#Kenneth Gorking
Thanks, I think I did some wrong normal calculation at the edge of sphere - strange think it happens just for reflections (so probably I made a glitch while making fast reflection code … voila, I think I’ve got another glitch from Cornell box), anyway thanks for giving info about it (I missed it, really I was too focused on GI and my eyes haven’t seen wrong reflection). Although there can be seen reflection (but strange, as like the sphere was scaled in Z (depth) direction).

Thanks for the link on paper, I haven’t read it (but it’s one of the first links in my TODO list) - I started on some photon mapping in last several hours (I took photon map generation code from my non-real-time ray tracer, so it was quite simple … okay I made few glitches while adapting it a little for real time performance, but that was as always an accident), though final gather was quite a big challange (still unsolved) - my non real time approach on this is just too slow, so I decided to try something else - read more here:

http://www.otte.cz/devblog/vilemotte/index.php?entry=entry090805-190644, although I will definitely look into the paper, maybe it has some tips about final gathering of them (some more clever way that I made up in few hours … but I may think of something much better in some time too). So again, thanks for the link.

Anyway here are few glitches on my GI solution instant-radiosity-like one. http://www.otte.cz/devblog/vilemotte/index.php?entry=entry090805-014733

6aa952514ff4e5439df1e9e6d337b864
0
roel 101 Aug 06, 2009 at 10:24

Nice! But just to summarize (but not to neglect your work): it is instant radiosity + ao + shadows?

B20d81438814b6ba7da7ff8eb502d039
0
Vilem_Otte 117 Aug 06, 2009 at 14:59

Basically yes It has principle pretty much as Instant radiosity (although not exactly the same, but very similar) + Ambient Occlusion (tried reaching the best quality possible with current hardware) + shadows (not the best one, I have used several times better algorithm on them - as soon as I will have some time to write I might write something about shadows too).