Friday, October 19, 2012

Realtime global illumination, sort of

I just added skylight to the realtime renderer. I am very happy with the results. In my opinion it adds a lot of depth, and it is quite fast to compute. You can see it here in two series of screenshots I took for a forest setting.

In each series, the first image is the final results, the second image is the contribution from the skylight and the third is the direct sunlight illumination:

Second series:

This is already looking good, and it runs in realtime. If there was some large character moving around in the scene, you would see its contribution to the shadowing.

The skylight is a standard shadow map, but it is sampled taking a lot of neighbors into consideration. This creates nice soft transitions between areas of light and penumbra.

There are no light bounces here, however. I have been toying with the idea of a screen-space radiosity solution. I think it is possible. If you know of any papers on the subject, please drop a link in the comments section.

As usual I look forward to your comments and criticism.

13 comments:

  1. Hi,
    I'd be interested in SSGI (screen-space global illumination) as well.

    This guy did something in this direction, but I'm not sure how good it is: http://my-pseudocode-life.blogspot.de/2009/08/screen-space-global-illumination-screen.html

    This is a paper for extending directional SSAO to support one bounce of diffuse light: http://www.mpi-inf.mpg.de/~ritschel/Papers/SSDO.pdf

    And for future generations, screen space photon mapping: http://www.cs.brown.edu/courses/cs224/papers/is_photon_mapping.pdf

    I hope some practical realtime solutions are possible.

    Cheers,
    Mind

    ReplyDelete
  2. Here's another one:
    http://homepage.cs.uiowa.edu/~cwyman/publications/files/imgSpRadiosity/egsr09_imgSpRadiosity.small.pdf
    Good luck!

    ReplyDelete
  3. Its not screenspace GI, but this technique is pretty impressive: http://developer.download.nvidia.com/GTC/PDF/GTC2012/PresentationPDF/S0610-GTC2012-Octree-Voxelization-Global.pdf

    And Accompanying video: http://www.youtube.com/watch?v=fAsg_xNzhcQ

    They are using it in the latest unreal engine: http://www.youtube.com/watch?v=7ExHH-4j6EE

    I think this is the paper they referenced: http://maverick.inria.fr/Publications/2011/CNSGE11b/GIVoxels-pg2011-authors.pdf

    ReplyDelete
  4. Criticism? We don't criticise, we worship!

    Is that a map in the bottom left? And if so, are these two shots taken at the same point facing different directions?

    Having light splashes under the gaps in the canopy is magic. Really gives it that "dappled sunlight" look you get in forests.

    ReplyDelete
  5. Wow, this is looking fantastic.

    ReplyDelete
  6. Thanks to all for the links. The papars are great. I have some reading to do.

    ReplyDelete
  7. Looks fantastic.

    ReplyDelete
  8. @ape I was about to suggest the same paper!

    ReplyDelete
  9. Hello again, I found a blog that covers someone's adventures with the tech I linked to earlier. This post in particular is very enlightening on how things work: http://realtimevoxels.blogspot.com/2012/09/introduction-to-gigavoxels-and-sparse.html

    ReplyDelete
  10. Can you point out what specific technique do you use? Is it some sort of SSAO for skylight shadow map?

    ReplyDelete
    Replies
    1. No SSAO, just a traditional shadow map pointing downwards. It has a lot of filtering to smooth shadow boundaries.

      Delete
  11. https://docs.google.com/viewer?url=http://www.mpi-inf.mpg.de/~ritschel/Papers/SSDO.pdf another.

    ReplyDelete
  12. Hope you find something interesting here: http://www.iquilezles.org/www/index.htm

    ReplyDelete