XEffects - Reloaded - New Release (V 1.4)

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
ACE247
Posts: 704
Joined: Tue Mar 16, 2010 12:31 am

Post by ACE247 »

You probably also need the .lib [This includes dll and lib]
Irrlicht 1.7.2 lib and dll

Also when you earlier recompiled Irrlicht yourself did you maybe forget to set the

Code: Select all

#define _IRR_COMPILE_WITH_DIRECT3D_9_
line in IrrCompileConfig.h ?
Belajar
Posts: 15
Joined: Mon Nov 15, 2010 3:50 am

Post by Belajar »

ACE247 wrote:You probably also need the .lib [This includes dll and lib]
Irrlicht 1.7.2 lib and dll

Also when you earlier recompiled Irrlicht yourself did you maybe forget to set the

Code: Select all

#define _IRR_COMPILE_WITH_DIRECT3D_9_
line in IrrCompileConfig.h ?

Whoaaa...it's work..:D..

Thankyou very-very-very-very much...

About my problem earlier..mmm, i forget to copying my irrlich.lib from my irrlicht folder that i use to recompiling, to my original irrlicht folder that i include in my MSVC. Newbie mistakes..ehehehehe..shame on me..:D

Once again..thank you very much..:D
Valmond
Posts: 308
Joined: Thu Apr 12, 2007 3:26 pm

Post by Valmond »

Hello!

A bit late I'm trying out this delicious piece of code and I have just a one single question :P

Is there a parallel light that you could use with the shadow mapping (on a big outdoor terrain)?
The directional light works but a parallel would be more accurate/less prone to artefacts I guess?


I even haven't checked out all the other features, I just love this kind of situation!

Cheers

Valmond
Nova
Competition winner
Posts: 99
Joined: Mon May 09, 2005 10:32 am

Post by Nova »

Hi BlindSide,

I just added Visual Leak Detector to my project and it detects two memory leaks in your code.

You create these two callbacks without deleting them.

Code: Select all

depthMC = new DepthShaderCB(this);
shadowMC = new ShadowShaderCB(this);
So I added these two lines at the end of the destructor

Code: Select all

if(depthMC)
	depthMC->drop();

if(shadowMC)
	shadowMC->drop();
I am not very familiar with your code so there may be a more sensible way but this at least pleased VLD, so I thought I would share it.
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Thanks Nova, I'll take a look at it!
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
SG57
Posts: 66
Joined: Fri May 18, 2007 5:51 am

Post by SG57 »

Hmm I'm trying to get XEffects to work as a 'sun' source for my map/terrain.

I've been messing with using just 1 light, really far away with a small field of view and the proper near/far values, as well as multiple lights, but I just can't seem to get shadows that A.) don't flicker/cull as you pan the camera around and B.) aren't really blocky.

I tried to make use of the directional boolean but I cant get a directional light to work period ;\ Anyone got an XEffect directional shadow light working?
__________________________________
...you'll never know what it's like, living your whole life in a dream...
stefbuet
Competition winner
Posts: 495
Joined: Sun Dec 09, 2007 4:13 pm
Location: france

Post by stefbuet »

Code: Select all

// Reject vectors outside the unit sphere to get a uniform distribution.
do {randVec = vector3df((f32)rand() / (f32)RAND_MAX, (f32)rand() / (f32)RAND_MAX, (f32)rand() / (f32)RAND_MAX);}
while(randVec.getLengthSQ() > 1.0f);
This is faster to go with spheric coordinates, isn't it?

Code: Select all

f32 a=((f32)rand()/(f32)RAND_MAX)*2.0*PI;
f32 b=((f32)rand()/(f32)RAND_MAX)*PI-PI/2.0;
f32 r=((f32)rand()/(f32)RAND_MAX);

randVec=vector3df(cos(a)*cos(b)*r, sin(a)*cos(b)*r, sin(b)*r);
SG57
Posts: 66
Joined: Fri May 18, 2007 5:51 am

Post by SG57 »

Is there a way to prevent the whitewash outline of invisible nodes?

I tried manipulating the shadow mode flag to 'exclude' and 'cast none' but it still shows this 'white wash' outline of the invisible model.

I might pick around the XEffects source and add a check for scene node visibility to prevent this unless there is another way.

Also - if a shadow is flickering when you are in it looking around, is that due to too small a shadow map resoultion and/or too big of a casted shadow? How big can the resolution get? I have a very large terrain, would it be better to have 1 smaller closer shadow light following the camera and 1 very big shadow light covering the whole terrain?

One last thing - how does adding more shadow lights affect performance? 9 shadow lights for example?

EDIT

Ok, I added a check if a scene node is invisible, seems to work now. Not sure if that is a bug (scene node visibility not affecting shadow visibility?)
__________________________________
...you'll never know what it's like, living your whole life in a dream...
mengzhu
Posts: 28
Joined: Fri Jul 17, 2009 7:00 am

Post by mengzhu »

SG57 wrote:Hmm I'm trying to get XEffects to work as a 'sun' source for my map/terrain.

I've been messing with using just 1 light, really far away with a small field of view and the proper near/far values, as well as multiple lights, but I just can't seem to get shadows that A.) don't flicker/cull as you pan the camera around and B.) aren't really blocky.

I tried to make use of the directional boolean but I cant get a directional light to work period ;\ Anyone got an XEffect directional shadow light working?

You (and I ) need PSSM or PSSM+VSM;I PMed BlindSide yesterday ,asked him would he add PSSM to Xeffects someday... I'm waiting the answer~
There's also a wrapper "IrrCg" by Nadro,it has a PSSM shadow demo,you can try it but .... I show some words from him:

PostPosted: Thu Dec 02, 2010 3:27 pm
Hi,
In last time I was fully switched to OpenGL 3.x + GLSL (integrated with Irrlicht of course), so I have less time for develop irrCg, but project isn't dead, I will try add new features to it in winter holidays.

So,you and I will have many good choice.
yaten
Posts: 41
Joined: Tue Nov 16, 2010 4:57 pm
Location: /home/yaten on a server somewhere East of Asia
Contact:

Post by yaten »

hi sir blindside,

i'm a fan of your xeffect project, really great! ^_^
i just have a teensy bit question, it must be very trivial so please forgive me my noobishness. I'm using your postprocessing effects, namely:

Code: Select all

I.eff->addPostProcessingEffectFromFile(core::stringc("shaders/BrightPass") + shaderExt);
				I.eff->addPostProcessingEffectFromFile(core::stringc("shaders/BlurHP") + shaderExt);
				I.eff->addPostProcessingEffectFromFile(core::stringc("shaders/BlurVP") + shaderExt);
				I.eff->addPostProcessingEffectFromFile(core::stringc("shaders/BloomP") + shaderExt);
and i really like them all ^_^ however, i'm wondering how i can selectively apply these effects only to models that I wanted. Or if that's not possible, how about excluding 1 model such as the skybox?

The solution might be very trivial but i'm probably too noob too understand how it is done at the moment. I would be very grateful to any hint even small that you can spare me ^_^

thanks so much and happy new year!
Radikalizm
Posts: 1215
Joined: Tue Jan 09, 2007 7:03 pm
Location: Leuven, Belgium

Post by Radikalizm »

A post-processing effect takes the output of your rendered scene, and then applies the post-process shader to it, so singling out nodes is pretty much impossible since it's a screen-wide effect
yaten
Posts: 41
Joined: Tue Nov 16, 2010 4:57 pm
Location: /home/yaten on a server somewhere East of Asia
Contact:

Post by yaten »

hi sir rad, that's my expected answer so i'm not really disappointed ^_^ thanks anyway for reaffirming the case ^_^ i asked just to make sure that it isn't really possible and not just because of my being noob ^_^ now i'm assured that i'm a noob and it isn't really possible ^_^ lol.

nevertheless, sir blindside's xeffect is still useful on shadow effects so i'm still using it, only without the post effects, or probably at least with a blur effect ^_^

anyway thank sir rad for the info, i really appreciate it ^_^
stefbuet
Competition winner
Posts: 495
Joined: Sun Dec 09, 2007 4:13 pm
Location: france

Post by stefbuet »

Hi,

I don't understand why you draw caster nodes into the shadowmap, and the receiver when comparing depth to produce shadows. For me, occluders (casters) are seen from the light view (shadowmap render) and shadowed areas (receivers) are seen by the user camera view (comparing shader) so I would do it the other way. What did I miss ?

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

Post by BlindSide »

stefbuet wrote:Hi,

I don't understand why you draw caster nodes into the shadowmap, and the receiver when comparing depth to produce shadows. For me, occluders (casters) are seen from the light view (shadowmap render) and shadowed areas (receivers) are seen by the user camera view (comparing shader) so I would do it the other way. What did I miss ?

Thanks.
Sorry I have no idea what you just said, it sounds like you're contradicting yourself!
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
DarkMarkZX
Posts: 10
Joined: Sat Nov 20, 2010 10:48 pm
Location: Poland, Europe
Contact:

Post by DarkMarkZX »

Hi BlindSide,
Thank you for your hard work, it really makes my game look so much better!
Unfortunately, there are a few issues I couldn't solve and I was wondering if you could help me.

First of all, is there a way to remove an existing ShadowLight? Since I couldn't find such a function in the EffectHandler class, I thought I could create a few lights (tried both malloc and "new" operator) and store pointers to them in an array, but it didn't work - either the program crashed, or the lights didn't show up.

Secondly, there are 2 minor problems when using Direct3D9:
1. Nodes with transparent materials cast bright shadows (when their E_SHADOW_MODE equals ESM_BOTH) or don't cast shadows at all (when any other shadow mode is applied to them).
2. Anti-aliasing doesn't seem to work.

Any help would be greatly appreciated.

P.S.
I'm using Irrlicht 1.7.2
Image
Post Reply