Global illumination with Ogre: Reflective Shadow Maps

A place to show off your latest screenshots and for people to comment on them. Only start a new thread here if you have some nice images to show off!
andrew85
Gnoblar
Posts: 15
Joined: Mon Oct 04, 2010 3:43 pm
x 2

Global illumination with Ogre: Reflective Shadow Maps

Post by andrew85 »

This is a simple implementation of the paper: Reflective Shadow Maps by Carsten Dachsbacher and Marc Stamminger (University of Erlangen-Nuremberg). Despite this particular techinque is quite old, many other subsequent papers are based on this idea. I used Ogre and his deferred shader framework to build this app. By computing the indirect illumination with a low resolution image, the frame rate reaches 20 fps @ 1920x1080 (on a Radeon HD 5800).
If someone is interested, I can provide the source code on my blog http://3dgraphicsprogramming.blogspot.com/

Please find the source code and the precompiled binary at http://db.tt/pX6fpSwu

Image

Image

Image
Last edited by andrew85 on Sun Jul 21, 2013 7:20 pm, edited 9 times in total.
User avatar
lordsme
Gremlin
Posts: 167
Joined: Sun Mar 11, 2007 1:11 pm
Location: Turin, Italy
x 10

Re: Global illumination with Ogre: Reflective Shadow Maps

Post by lordsme »

Very interesting!!
My Portfolio
http://davidedigiannantonio.weebly.com

MESH - Mise-en-scene Helper
http://www.mesh-project.org/

ASALab @ Virtual Reality & Multimedia Park
http://www.vrmmp.it
hedphelym
Gremlin
Posts: 180
Joined: Tue Nov 25, 2008 10:58 am
Location: Kristiansand, Norway
x 23

Re: Global illumination with Ogre: Reflective Shadow Maps

Post by hedphelym »

Very good work! I really enjoy your blog.
It would be nice with source code, or a sample application that we can run.

I'm very interested to see how this would work on our highpoly scenes.
andrew85
Gnoblar
Posts: 15
Joined: Mon Oct 04, 2010 3:43 pm
x 2

Re: Global illumination with Ogre: Reflective Shadow Maps

Post by andrew85 »

I hope to release a sample application in a couple of weeks. Thanks for the feedback! :)
User avatar
mkultra333
Gold Sponsor
Gold Sponsor
Posts: 1894
Joined: Sun Mar 08, 2009 5:25 am
x 116

Re: Global illumination with Ogre: Reflective Shadow Maps

Post by mkultra333 »

That sounds very interesting. I have VSM spotlights, deferred point lights, and a background ambient light with SSAO, but some reflective light would be excellent. What's the rendering cost like?
"In theory there is no difference between practice and theory. In practice, there is." - Psychology Textbook.
andrew85
Gnoblar
Posts: 15
Joined: Mon Oct 04, 2010 3:43 pm
x 2

Re: Global illumination with Ogre: Reflective Shadow Maps

Post by andrew85 »

It totally depends on the number of VPLs and the resolution of indirect light buffer, as this technique is fill-rate limited. With 256 VPLs, 512x512 indirect buffer and 512x512 RSM, the cost is 17ms, but you have to tolerate some amount of "blur" across discontinuities. I have no time to provide a complete chart for the cost, but you will be able to play around with the app very soon (sorry but I'm busy with my master thesis :D ).
Actually I'm planning to improve this demo with a multi-resolution approach that would be far better both in quality and performance (see, for example, Greg Nichols and Chris Wyman. "Multiresolution Splatting for Indirect Illumination." ACM Symposium on Interactive 3D Graphics and Games).
jonim8or
Goblin
Posts: 287
Joined: Mon Dec 08, 2008 4:49 pm
x 10

Re: Global illumination with Ogre: Reflective Shadow Maps

Post by jonim8or »

Its a very interesting technique. One question, though. In the paper I see the color of the lit walls reflected on the statue, but due to the positioning of the statue in the screenshot I can't see it there.
Can you post another screenshot that shows in which aspect this lighting technique is very good?

And how does this integrate with the Deferred Shading? is it an addition, or a replacement of the shadows/lighting functionality that is there already?
Sgw32
Greenskin
Posts: 100
Joined: Mon Aug 30, 2010 9:35 am
x 11

Re: Global illumination with Ogre: Reflective Shadow Maps

Post by Sgw32 »

I'm interested in using your system. Can it work on Ogre 1.6.4, not the latest release?
andrew85
Gnoblar
Posts: 15
Joined: Mon Oct 04, 2010 3:43 pm
x 2

Re: Global illumination with Ogre: Reflective Shadow Maps

Post by andrew85 »

You mean color bleeding, here it is a screenshot. You can see reddish reflections on the statue and on the other wall. Shame on me for the shadow... it is not antialiased :roll: . The technique plugs and plays with deferred shading. You have deferred direct lighting/shadows and the indirect illumination added optionally. As you can see in the screenshot there's a turn on/of button. If I turn off, I'm just using the ogre deferred shading framework provided with the SDK.
@Sgw32: I'm using Ogre 1.7.1, but I did not try with older versions

Image
andrew85
Gnoblar
Posts: 15
Joined: Mon Oct 04, 2010 3:43 pm
x 2

Re: Global illumination with Ogre: Reflective Shadow Maps

Post by andrew85 »

I released the code of this demo http://db.tt/pX6fpSwu. Check out my blog http://3dgraphicsprogramming.blogspot.it/.

This demo relies on Ogre 1.7.1 and its deffered shading system. As I stated in the previous posts, it is a very basic technique ( Based on "Reflective Shadow Maps" by Carsten Dachsbacher and Marc Stamminger ) for a faster and more advanced implementation ( or to adapt it to your needs ) you can contact me ( baldacci85'at'hotmail'dot'it).
Last edited by andrew85 on Wed Jul 17, 2013 1:00 pm, edited 1 time in total.
User avatar
Xavyiy
OGRE Expert User
OGRE Expert User
Posts: 847
Joined: Tue Apr 12, 2005 2:35 pm
Location: Albacete - Spain
x 87

Re: Global illumination with Ogre: Reflective Shadow Maps

Post by Xavyiy »

Thanks for the release Andrew!

I'll definitely play with that in a future.

Any chance of a precompiled demo?

Xavier
andrew85
Gnoblar
Posts: 15
Joined: Mon Oct 04, 2010 3:43 pm
x 2

Re: Global illumination with Ogre: Reflective Shadow Maps

Post by andrew85 »

Glad of your interest. Yep, I'll publish a binary demo as soon as possible.
drwbns
Orc Shaman
Posts: 788
Joined: Mon Jan 18, 2010 6:06 pm
Location: Costa Mesa, California
x 24

Re: Global illumination with Ogre: Reflective Shadow Maps

Post by drwbns »

I built from source and the demo is really really dark in DirectX and OpenGL. All resources loaded correctly but are there some missing resources? Same result with Ogre 1.8 latest and 1.9 latest. I notice you said you're using 1.7. Is deferred shading different in latest versions? Also, I don't have the overlay options you have in your screen shot, maybe a different build you have?
andrew85
Gnoblar
Posts: 15
Joined: Mon Oct 04, 2010 3:43 pm
x 2

Re: Global illumination with Ogre: Reflective Shadow Maps

Post by andrew85 »

Sorry a paramater was wrongly set. Dowload again from this link http://db.tt/pX6fpSwu and let me know. (I cant check myself right now). (Please note that, for now, the binary is compiled in debug mode, and that in the demo are included and activated a motion blur and dof effect )

The overlay pannel was included in a previous version, maybe I can include it again. In the provided demo, there is a single spot light and 256 virtual points lights that simulates the indirect illumination.
drwbns
Orc Shaman
Posts: 788
Joined: Mon Jan 18, 2010 6:06 pm
Location: Costa Mesa, California
x 24

Re: Global illumination with Ogre: Reflective Shadow Maps

Post by drwbns »

I got the same result, just really dark, no lights. No errors in the Ogre.log.
screenshot07212013_051834887.jpg
Strangely lit corner outside -
screenshot07212013_052136467.jpg
You do not have the required permissions to view the files attached to this post.
andrew85
Gnoblar
Posts: 15
Joined: Mon Oct 04, 2010 3:43 pm
x 2

Re: Global illumination with Ogre: Reflective Shadow Maps

Post by andrew85 »

It seems there is a problem with ssao. I disabled it. However consider also that there is only a light source. Try to move it to see different result ( either from the source code or moving the mouse while pressing the right button) .

Here it is a couple of screenshot I get on my laptop:
rsm1.jpg
rsm2.jpg
I am going to upload the new version.

About the light outside, consider that this method do not account for indirect light occlusion, thus there may be some light bleeding outside.

However this method could be further improved to account for this fact (for example with:"Imperfect shadow maps").
You do not have the required permissions to view the files attached to this post.
andrew85
Gnoblar
Posts: 15
Joined: Mon Oct 04, 2010 3:43 pm
x 2

Re: Global illumination with Ogre: Reflective Shadow Maps

Post by andrew85 »

Ok. I disabled all other effects except global illumination. Download again from http://db.tt/pX6fpSwu. Give it a try and let me know.

Here it is another screenshot:
screenshot07212013_194521364.jpg
You do not have the required permissions to view the files attached to this post.
andrew85
Gnoblar
Posts: 15
Joined: Mon Oct 04, 2010 3:43 pm
x 2

Re: Global illumination with Ogre: Reflective Shadow Maps

Post by andrew85 »

Another sample scene:
133217_178558178830612_8054888_o.jpg
You do not have the required permissions to view the files attached to this post.
nickG
Greenskin
Posts: 122
Joined: Fri Jan 20, 2012 6:44 pm
Location: Russia,Moscow
x 1

Re: Global illumination with Ogre: Reflective Shadow Maps

Post by nickG »

why so long?
3 years..
nickG
Greenskin
Posts: 122
Joined: Fri Jan 20, 2012 6:44 pm
Location: Russia,Moscow
x 1

Re: Global illumination with Ogre: Reflective Shadow Maps

Post by nickG »

reupload please