Page 43 of 56

Posted: Wed Dec 01, 2010 4:19 pm
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 ?

Posted: Wed Dec 01, 2010 7:14 pm
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

Posted: Tue Dec 14, 2010 10:26 pm
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

Posted: Sat Dec 18, 2010 3:06 pm
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.

Posted: Mon Dec 20, 2010 11:04 am
by BlindSide
Thanks Nova, I'll take a look at it!

Posted: Thu Dec 23, 2010 10:55 am
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?

Posted: Thu Dec 23, 2010 1:32 pm
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);

Posted: Wed Dec 29, 2010 2:03 am
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?)

Posted: Sat Jan 01, 2011 9:34 am
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.

Posted: Sun Jan 02, 2011 7:54 am
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!

Posted: Sun Jan 02, 2011 9:51 am
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

Posted: Sun Jan 02, 2011 10:12 am
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 ^_^

Posted: Wed Jan 05, 2011 4:28 pm
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.

Posted: Fri Jan 14, 2011 5:15 am
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!

Posted: Sun Jan 23, 2011 12:13 am
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