XEffects - Reloaded - New Release (V 1.4)

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
stefbuet
Competition winner
Posts: 495
Joined: Sun Dec 09, 2007 4:13 pm
Location: france

Post by stefbuet »

How could I use both XEffect shadow mapped lights and ligths without any shadow? Because if I just use a point light shader or anything, the model will still be covered by XEffect shadows. I'm assuming that as it's a post processing effect, the only way to do what I want would be to compute it thought XEffect... but the SShadowLight seems to be for shadows only :(
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

You can use excludeSceneNodeFromLightingCalculations (Or something like that) and then do your own lighting for it. Also you can set the shadow mode so it doesn't receive or give shadows.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
MikeDee
Posts: 35
Joined: Wed Nov 18, 2009 11:41 pm

Post by MikeDee »

so one can use the shadows without having to use the xeffects lights ? That would be great, that would mean the spot light limitation is no more !
MikeDee
Posts: 35
Joined: Wed Nov 18, 2009 11:41 pm

Post by MikeDee »

Nobody answered my question. So is it possible to use the x effects shadows while disabling the xeffects lights (and using irrlicht lights instead) ?
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Sorry that is not possible because of the way additive lighting works. Instead of making things darker, shadows in XEffects work by only lighting things that are not in shadow. This produces the realistic yellow tone in the 2 light demo.

Also, the spot light limitation is due to lack of cube-map support for the shadow map, so it's unrelated to lighting.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
omaremad
Competition winner
Posts: 1027
Joined: Fri Jul 15, 2005 11:30 pm
Location: Cairo,Egypt

Post by omaremad »

I made a small modifcation to xeffects which increases speed, quality, hw compatibility and decreases vram allocation and texture thrashing.

This image is 512x512 x32bit in r8g8b8a8 shadow map with NO PCF filtering or floating point textures, edge anitaliasing is standard bilinear. Also no acne funky offsets or anything

You can also apply Gaussians directly on the shadow map without decoding or actual multiple shifted z tests, this will be added soon.

The modifcation is like 5 lines of code.

Image

Edit: shifting down to 24/bit depth + alpha in the r8g8b8a8 allows for alpha shadows as well works fine.
"Irrlicht is obese"

If you want modern rendering techniques learn how to make them or go to the engine next door =p
ACE247
Posts: 704
Joined: Tue Mar 16, 2010 12:31 am

Post by ACE247 »

It would be really cool if you could post you're code here. :D
I especially would like that.
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Are we playing a guessing game, Omar? :D

EDIT:
You can also apply Gaussians directly on the shadow map without decoding
This sounds interesting, go on...

EDIT2: I don't see any filtering though, the bilinear is just creating rounded edges rather than smooth edges, it's still a binary cutoff. But I am curious!
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
omaremad
Competition winner
Posts: 1027
Joined: Fri Jul 15, 2005 11:30 pm
Location: Cairo,Egypt

Post by omaremad »

I still haven't added the Gaussian but since you can use hardware bilinear without corrupting the depth values gauss will be fine too.

Also its smooth because there is no binary cutoff, i dont use an if statement. Ill add the blurring on Xeffects and post you the code, i dont have any windows pcs so ud have to compile it sorry.

The lighting system will be used in my GPU radiosity system, i hope the gpu approach will allow some sort of realtime radisity that updates every x number of frames.
"Irrlicht is obese"

If you want modern rendering techniques learn how to make them or go to the engine next door =p
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Ah I see, but you would need point lights for your lighting system right, are you going to integrate cubemaps or use another method?

This sounds awefully similar to VSM but with a twist. Are these based on "Exponential Shadow Maps" by any chance?
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
omaremad
Competition winner
Posts: 1027
Joined: Fri Jul 15, 2005 11:30 pm
Location: Cairo,Egypt

Post by omaremad »

yeah its exp on packed depth get online =p, as for point lights, ill just use your demo trick of 6 projections.
"Irrlicht is obese"

If you want modern rendering techniques learn how to make them or go to the engine next door =p
omaremad
Competition winner
Posts: 1027
Joined: Fri Jul 15, 2005 11:30 pm
Location: Cairo,Egypt

Post by omaremad »

Ok, here it is with blur applied (just used your vsm screen space blur stages)

The following image is on a 256x256 map 0_0 yet looks good with no artefacts. I also added some texture clamping code to your stuff to prevent those seams You get with point lights.

Image

One thing that i dont like about xeffects is how many indirect texture fetches you use... all of these offsets can be calculated in the vertex shader and the .w divide can be done on a per pixel level for free if you use the texture2Dproj command hlsl has it too. All those tex reads can be direct!

I like the flexbility of the framework though, easy to use and modify.
"Irrlicht is obese"

If you want modern rendering techniques learn how to make them or go to the engine next door =p
Tihtinen
Posts: 76
Joined: Fri Jan 08, 2010 3:12 pm
Location: Finland

Post by Tihtinen »

It seems this library is not very friendly when using multiple scene managers. Shadownodes, lights and ambient color are all shared regardless of active manager. I've made some changes to get around this (attach optional scenemanager-information on each of those and only the ones attached to active manager are considered). Ambient color issue still remains to be solved, but I think the solution will be to create std::map<smgr,SColor> container to hold all possibilities.

Just to let you know this has become an issue : ) Does anyone know any better solutions?
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Hi Tihtinen, that seems to be a flaw I have overlooked. I will probably not fix this issue officially as any free time I get for shadow mapping (Which is almost nothing at the moment as I have exams + work) will be spent on integrating into Irrlicht, which will not have that problem because of the different design.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
stefbuet
Competition winner
Posts: 495
Joined: Sun Dec 09, 2007 4:13 pm
Location: france

Post by stefbuet »

excludeSceneNodeFromLightingCalculations will remove shadows also. Is there a way to keep only shadows, and compute ourself within a shader the lighting of nodes ? Anyway, is there a way to the only the shadow render target, and compute the lighting nodes render target ourself ?
Thanks
Post Reply