XEffects - Reloaded - New Release (V 1.4)

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Sudi wrote:But ur still using the direct shadow method...
I'm trying really hard to get screen shadowing to work......so that i don't have to change the shader of each model which should receive shadows.
Hmm, are you sure about this? I think that I am using "the screen shadowing method". You don't really have to change the shader of anything. The shadows are calculated in a different pass then overlayed on the screen, so it is independent of the scene's materials.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
sudi
Posts: 1686
Joined: Fri Aug 26, 2005 8:38 pm

Post by sudi »

Ok i might be wrong but to me it looks like ur setting the material for each node urself in XEffects.

Code: Select all

ShadowNodeArray[i].node->getMaterial(m).MaterialType = 
						(ShadowNodeArray[i].shadowMode == ESM_CAST) ? (E_MATERIAL_TYPE)WhiteWash
						: (E_MATERIAL_TYPE)Solid[ShadowNodeArray[i].filterType];
haven't checked the references ur using there yet.

i guess the method i mean is called deffered shading so that u only render the depthmap twice. once from the point of the cam and then from the light. transform both into camspace and compare. then shade the already rendered scene.
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Sudi wrote:Ok i might be wrong but to me it looks like ur setting the material for each node urself in XEffects.

Code: Select all

ShadowNodeArray[i].node->getMaterial(m).MaterialType = 
						(ShadowNodeArray[i].shadowMode == ESM_CAST) ? (E_MATERIAL_TYPE)WhiteWash
						: (E_MATERIAL_TYPE)Solid[ShadowNodeArray[i].filterType];
haven't checked the references ur using there yet.

i guess the method i mean is called deffered shading so that u only render the depthmap twice. once from the point of the cam and then from the light. transform both into camspace and compare. then shade the already rendered scene.
Hmm yeah but to render the depth map you still need to temporarily change the material like I do unless you had direct access to the depth buffer or something. So in the end it's the same thing (Except filtering becomes screen space, which might not be as accurate).

This is a touch-and-go method, I change it, render, then change it back, so it's transparent to the user. I do this in the depth render pass and in the shadow mapping pass.

I do like the performance aspect of the deferred idea, I will definately try it some time when I look more into deferred shading.
Last edited by BlindSide on Wed Oct 15, 2008 2:20 pm, edited 1 time in total.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

BlindSide wrote:What video card you using? You're referring to just the point light demo right? Keep in mind that the point lights even at the lowest res/filter still offer pretty decent quality since you're using 6 shadowmaps instead of one, and there is no wasted space so the resolution is used sparingly.
It's a geforce 59XX (can't remember the XXs!) and it's much below 20fps on both so fairly unusable for anything unfortunately :(
Image Image Image
fmx

Post by fmx »

Sudi wrote: i guess the method i mean is called deffered shading so that u only render the depthmap twice. once from the point of the cam and then from the light. transform both into camspace and compare. then shade the already rendered scene.
wait a minute, isn't this how projective shadows work anyway?
what is xeffects doing if not this method?! I really need to have a look at the code :P

just some stats for you, on my P4 2GHz geforce 7300GT (latest drivers, DX9) I get:

Example 1:
- OGL: with best settings max FPS = 13
- OGL: with crapest settings max FPS = 17

- DX: with best settings max FPS = 11
- DX: with crapest settings max FPS = 16


Example 2:
- OGL: with best settings max FPS = 2
- OGL: with crapest settings max FPS = 7

- DX: with best settings max FPS = 1
- DX: with crapest settings max FPS = 7


OGL generally seems to perform a tad better (not by a lot tho').
No ATI machine I can test it on unfortunatly ;)
xDan
Competition winner
Posts: 673
Joined: Thu Mar 30, 2006 1:23 pm
Location: UK
Contact:

Post by xDan »

Hi again,

You seem to have fixed all my shader compile errors, great.

Direct3D still runs fine... but for OpenGL, the included binary crashes! (the previous one did too, after I attempted to fix the errors myself)

Here's the output with my graphics card info etc: http://pastebin.com/m42b0a204

It says GLSL version is 0.0

Now I tried compiling it myself. Using Irrlicht 1.4.2.

And it runs without crashing! also this time reports that GLSL version is 1.0

It seems getVendorInfo is not defined. So I commented out the line you say (so ScreenRTT is screen sized), which gives this

http://xzist.org/temp/xeffects1.png

setting the screenRTT size to (512,512) fixes the size problem, but it's still not right:

http://xzist.org/temp/xeffects2.png

My graphics card (ATI mobility radeon 9700) drivers are a few years old, it's an acer laptop and they don't provide updated ones. (and I have never managed to update them myself)

Hmm! :)

Direct3D notes:
- I get about 30-40 FPS on the lower settings. As high as it will go @2048x2048 and 16 PCF it's about 20 FPS.
That's for the first example. Example 2 is about 20 fps on the lowest settings, 4 on the highest!
- when setting the shadowmap resolution too high for my card (4096x4096), it gives lots of "Error: Could not set render target." messages. Is it possible to automatically fall back to a lower size if that is not supported?
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

Blindside has done it again.

U da man.

Laudamus magnus.
Image
L_Draven
Posts: 21
Joined: Sun Mar 07, 2004 11:36 am

Post by L_Draven »

Deleted
Last edited by L_Draven on Wed Oct 15, 2008 9:02 pm, edited 1 time in total.
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

amigo, por favor, open up a new thread in the beginner section. gracias.

by the way, please delete the post above, it doesn't belong in there.

thanks.
Image
L_Draven
Posts: 21
Joined: Sun Mar 07, 2004 11:36 am

Post by L_Draven »

Ok sorry, i have deleted the post and created a new thread in Beginners section.

Thansk anyway.
torleif
Posts: 188
Joined: Mon Jun 30, 2008 4:53 am

Post by torleif »

I got it working, however shadows can't be seen (will work a bit harder soon though)

Question: does the pixel size have to be 2^n? I use resolutions in my game that are 3:4 (and thus not 2^n). The stretching is really bad.
asparagusx
Posts: 81
Joined: Thu Oct 16, 2008 6:50 am

Ambient light

Post by asparagusx »

Blindside - does this support ambient light?

Thanks

Anton
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Why did you make another account aheymann? :S

Currently it supports global ambient color through effectHandler::setAmbientColor() and also you can set individual material properties if you want to effect the color in a diffuse manner. Please look at the tutorial for more information.

torlief, what problems are you encountering now? There is nothing restricting any of the resolutions to be 2^n except for hardware and Irrlicht limitations. These include problems with ATI in OpenGL and lack of large RTT support in DX in Irrlicht.

Cheers
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
asparagusx
Posts: 81
Joined: Thu Oct 16, 2008 6:50 am

Post by asparagusx »

Forgot my password :)
sudi
Posts: 1686
Joined: Fri Aug 26, 2005 8:38 pm

Post by sudi »

Totally forgot to say that it works great over here.
I'm using a laptop with geforce8600gt. well framerate is really when using the pointlight.


btw i have done some research and found some really nice article about deffered lightning. but none about shadowing which is kinda making me believe that its not something u should do or maybe no one has simply done...or i'm to stupid to find it. anyway keep up the good work.
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.
Post Reply