Global illumination with Ogre: Reflective Shadow Maps
-
- Gnoblar
- Posts: 15
- Joined: Mon Oct 04, 2010 3:43 pm
- x 2
Global illumination with Ogre: Reflective Shadow Maps
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
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
Last edited by andrew85 on Sun Jul 21, 2013 7:20 pm, edited 9 times in total.
-
- Gremlin
- Posts: 167
- Joined: Sun Mar 11, 2007 1:11 pm
- Location: Turin, Italy
- x 10
Re: Global illumination with Ogre: Reflective Shadow Maps
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
http://davidedigiannantonio.weebly.com
MESH - Mise-en-scene Helper
http://www.mesh-project.org/
ASALab @ Virtual Reality & Multimedia Park
http://www.vrmmp.it
-
- Gremlin
- Posts: 180
- Joined: Tue Nov 25, 2008 10:58 am
- Location: Kristiansand, Norway
- x 23
Re: Global illumination with Ogre: Reflective Shadow Maps
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.
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.
-
- Gnoblar
- Posts: 15
- Joined: Mon Oct 04, 2010 3:43 pm
- x 2
Re: Global illumination with Ogre: Reflective Shadow Maps
I hope to release a sample application in a couple of weeks. Thanks for the feedback!
-
- Gold Sponsor
- Posts: 1894
- Joined: Sun Mar 08, 2009 5:25 am
- x 116
Re: Global illumination with Ogre: Reflective Shadow Maps
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.
-
- Gnoblar
- Posts: 15
- Joined: Mon Oct 04, 2010 3:43 pm
- x 2
Re: Global illumination with Ogre: Reflective Shadow Maps
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 ).
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).
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).
-
- Goblin
- Posts: 287
- Joined: Mon Dec 08, 2008 4:49 pm
- x 10
Re: Global illumination with Ogre: Reflective Shadow Maps
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?
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?
-
- Greenskin
- Posts: 100
- Joined: Mon Aug 30, 2010 9:35 am
- x 11
Re: Global illumination with Ogre: Reflective Shadow Maps
I'm interested in using your system. Can it work on Ogre 1.6.4, not the latest release?
-
- Gnoblar
- Posts: 15
- Joined: Mon Oct 04, 2010 3:43 pm
- x 2
Re: Global illumination with Ogre: Reflective Shadow Maps
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 . 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
@Sgw32: I'm using Ogre 1.7.1, but I did not try with older versions
-
- Gnoblar
- Posts: 15
- Joined: Mon Oct 04, 2010 3:43 pm
- x 2
Re: Global illumination with Ogre: Reflective Shadow Maps
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).
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.
-
- 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
Thanks for the release Andrew!
I'll definitely play with that in a future.
Any chance of a precompiled demo?
Xavier
I'll definitely play with that in a future.
Any chance of a precompiled demo?
Xavier
Creator of SkyX, Hydrax and Paradise Sandbox.
Looking for Ogre3D consulting services?
Follow me: @Xavyiy
Looking for Ogre3D consulting services?
Follow me: @Xavyiy
-
- Gnoblar
- Posts: 15
- Joined: Mon Oct 04, 2010 3:43 pm
- x 2
Re: Global illumination with Ogre: Reflective Shadow Maps
Glad of your interest. Yep, I'll publish a binary demo as soon as possible.
-
- 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
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?
-
- Gnoblar
- Posts: 15
- Joined: Mon Oct 04, 2010 3:43 pm
- x 2
Re: Global illumination with Ogre: Reflective Shadow Maps
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.
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.
-
- 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
I got the same result, just really dark, no lights. No errors in the Ogre.log.
Strangely lit corner outside -
Strangely lit corner outside -
You do not have the required permissions to view the files attached to this post.
-
- Gnoblar
- Posts: 15
- Joined: Mon Oct 04, 2010 3:43 pm
- x 2
Re: Global illumination with Ogre: Reflective Shadow Maps
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:
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").
Here it is a couple of screenshot I get on my laptop:
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.
-
- Gnoblar
- Posts: 15
- Joined: Mon Oct 04, 2010 3:43 pm
- x 2
Re: Global illumination with Ogre: Reflective Shadow Maps
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:
Here it is another screenshot:
You do not have the required permissions to view the files attached to this post.
-
- Gnoblar
- Posts: 15
- Joined: Mon Oct 04, 2010 3:43 pm
- x 2
Re: Global illumination with Ogre: Reflective Shadow Maps
Another sample scene:
You do not have the required permissions to view the files attached to this post.
-
- Greenskin
- Posts: 122
- Joined: Fri Jan 20, 2012 6:44 pm
- Location: Russia,Moscow
- x 1
Re: Global illumination with Ogre: Reflective Shadow Maps
why so long?
3 years..
3 years..
-
- Greenskin
- Posts: 122
- Joined: Fri Jan 20, 2012 6:44 pm
- Location: Russia,Moscow
- x 1
Re: Global illumination with Ogre: Reflective Shadow Maps
reupload please