Ogre Soft Shadows Demo
-
- Gnoblar
- Posts: 22
- Joined: Wed Mar 26, 2008 4:53 pm
- Location: Paris, France
-
- Gnoll
- Posts: 653
- Joined: Thu May 11, 2006 9:12 pm
- Location: Bavaria
- x 36
awesome work & outcome
ARTIFEX TERRA 3D - Artist-friendly, free and easy WYSIWYG realtime outdoor scene Editor & Painter
New loader now with Ogre::Terrain support: Addons for Artifex on SourceForge
MOC - Minimal Ogre Collision & Mousepicking
Simple TerrainMaterialGenerator for the use of standard Ogre material with Ogre::Terrain
Support me on Patreon
-
- Old One
- Posts: 3245
- Joined: Tue Apr 24, 2007 8:23 pm
- Location: NY, NY, USA
- x 11
This shader won't directly work with directional lights because it assumes that the length of the light space vectors equals the distance from the light to the point being shaded - obviously, this is incorrect with directional lights. It'd be possible to manually send the rescaling parameters to the shaders, or maybe use a constant parameter. Also, your screen shots shadows seem _extremely_ low-res: what were you using, 256x256, by any chance ? Combine that with the default 3x3 filter and what you see is displayed in your screenshots .Romz wrote:Ok I just found that the problem goes away if I disable the directional light. But that's not a solution
EDIT: Read my post on page 6 of the discussion topic
-
- Gnoblar
- Posts: 3
- Joined: Sat May 10, 2008 12:28 pm
-
- Old One
- Posts: 3245
- Joined: Tue Apr 24, 2007 8:23 pm
- Location: NY, NY, USA
- x 11
It's really just basic Ogre stuff, set up your project as you would for any of the Ogre examples to compile.Cronk wrote:Hi, I've been watching Ogre and playing around with it for a while now and now I wanted to play a bit with this Softshadows because I think they look pretty nice.
My problem is, that I can not really compile it, anyone knows which settings to use in VS2008?
-
- Gnoblar
- Posts: 3
- Joined: Sat May 10, 2008 12:28 pm
Thats what I did, but the compiler gives me a LNK4210 warning. When I start the App it crashes with a standart Windows error and without any logfile. The debugger tells me, that there is something wrong with the line mgr.cfgFile.loadDirect("../../data/config.ini");, to be exact it says: Translated to english this is something like
Code: Select all
Unbehandelte Ausnahme bei 0x109a1359 in myapp.exe: 0xC0000005: Zugriffsverletzung beim Lesen an Position 0x00000000.
Code: Select all
Unhandled exception at 0x109a1359 in myapp.exe: 0xC0000005: access violation while reading position 0x00000000.
-
- Gnoblar
- Posts: 3
- Joined: Sat May 10, 2008 12:28 pm
-
- Gnoblar
- Posts: 4
- Joined: Wed Mar 05, 2008 9:48 am
-
- Gnoblar
- Posts: 4
- Joined: Wed Mar 05, 2008 9:48 am
That is to say, you implement VSM in this demo? Why did you store a squared depth value into green channel for? And, I cannot see any code of shadow reciever. How did you deal with it?nullsquared wrote:Nope, it stores linear depth to the eye in the red channel, and a squared version in the green channel (for VSM).chowchow wrote:Is your implementation traditional shadow map in the show_cast.material?
Excuse me for my so many questions. I want to implement "Queried Virtual Shadow Mapping" in OGRE. But I really have no any idea to implement it. I want to get something valueable from your demo. Thanks a lot
-
- Old One
- Posts: 3245
- Joined: Tue Apr 24, 2007 8:23 pm
- Location: NY, NY, USA
- x 11
Yup. Just plain old VSM. A better demonstration would be LVSM, but I didn't (and still don't) have the time to fully implement it.chowchow wrote:That is to say, you implement VSM in this demo?nullsquared wrote:Nope, it stores linear depth to the eye in the red channel, and a squared version in the green channel (for VSM).chowchow wrote:Is your implementation traditional shadow map in the show_cast.material?
This way you can filter the shadow map and compute the variance between the squared depth and the "real" squared depth. Thus, variance shadow mapping.Why did you store a squared depth value into green channel for?
I use a texture_unit with "content_type shadow" to pull in the shadow texture directly into the lighting shader - thus, no need for a receiver, the lighting shader automatically makes use of the shadow map.And, I cannot see any code of shadow reciever. How did you deal with it?
-
- Gnoblar
- Posts: 4
- Joined: Wed Mar 05, 2008 9:48 am
-
- Halfling
- Posts: 55
- Joined: Sat Dec 22, 2007 6:56 pm
- x 1
-
- OGRE Retired Team Member
- Posts: 3335
- Joined: Tue Jun 21, 2005 8:26 pm
- Location: Rochester, New York, US
- x 3
-
- Halfling
- Posts: 55
- Joined: Sat Dec 22, 2007 6:56 pm
- x 1
-
- Old One
- Posts: 3245
- Joined: Tue Apr 24, 2007 8:23 pm
- Location: NY, NY, USA
- x 11
Well, actually now that I look back on it, it's not really all that awesome. I mean, I didn't really take the time to make it very polished or anything, and the code can really be expanded. The 'soft shadows w00t!' part is a bit exaggerated as well, you can get nice anti-aliased/soft edges but it's not 'real' soft shadows. Though, if I do say so myself, it's a nice little base to work off of if you're looking for an Ogre-based implementation of VSM. LVSM would be really neat, or even ESM.dustbin1_uk wrote:Meaning....?Praetor wrote:Option #2
EDIT:
OH! I GET IT!! Sorry, Well done on this awesome work then! LOL
-
- Halfling
- Posts: 55
- Joined: Sat Dec 22, 2007 6:56 pm
- x 1
-
- Gremlin
- Posts: 166
- Joined: Fri Jun 30, 2006 1:04 pm
Apricot uses the PSSM technique ( as far as I know ), which is probably the best solution for doing soft-shadows on large scale environments with a single main light source. You can do this in the latest release of ogre, but its not that easy to set up. The results are worth it though.
For internal environments with several light sources nullsquared's solution is probably better.
For internal environments with several light sources nullsquared's solution is probably better.
Was here
-
- Halfling
- Posts: 55
- Joined: Sat Dec 22, 2007 6:56 pm
- x 1
-
- Halfling
- Posts: 55
- Joined: Sat Dec 22, 2007 6:56 pm
- x 1
So this link here:
http://www.ogre3d.org/index.php?set_alb ... _photo.php
Is this a demo or a part of the SDK that I missed? Because this is pretty impressive.
http://www.ogre3d.org/index.php?set_alb ... _photo.php
Is this a demo or a part of the SDK that I missed? Because this is pretty impressive.
-
- Gnoblar
- Posts: 6
- Joined: Thu Jan 15, 2009 1:39 pm
Re: Ogre Soft Shadows Demo
I want.
Can somebody please put a download link that works, none of them work or you must pay.
Thanks
Can somebody please put a download link that works, none of them work or you must pay.
Thanks
-
- Goblin
- Posts: 264
- Joined: Thu Aug 21, 2008 4:48 pm
Re: Ogre Soft Shadows Demo
The rapidshare link works just fine for me. Without paying.Bluntspoon wrote:I want.
Can somebody please put a download link that works, none of them work or you must pay.
Thanks
-
- Orc Shaman
- Posts: 707
- Joined: Sun Apr 02, 2006 7:51 pm
- Location: Sacramento, CA
- x 1
Re: Ogre Soft Shadows Demo
We finally got these shadows working in Flow3D. Look great, had a problem in Eihort using a DX9 card in vista. We just updated flow to shoggoth and now the shadows work perfectly in both GL and DX9.
Really made my day and thanks for showing the way
Here's a quick screenshot of the Flow Soft shadows example.
Were going to add a helper function to make these really easy to set up in flow.
fG.enableSoftShadows(...)
You will still be able to set it up manually for those that want to of course .
Really made my day and thanks for showing the way
Here's a quick screenshot of the Flow Soft shadows example.
Were going to add a helper function to make these really easy to set up in flow.
fG.enableSoftShadows(...)
You will still be able to set it up manually for those that want to of course .
-
- Halfling
- Posts: 55
- Joined: Sat Dec 22, 2007 6:56 pm
- x 1
Re: Ogre Soft Shadows Demo
Nice work!!! Well done!!!