Page 23 of 56

Posted: Wed Aug 12, 2009 6:59 am
by Skomakarn
Yeah, I think this looks a lot better to me. The shadows are working. On my statue, the shadow of the stick it is holding is casted very strangely onto the body.

Yes, I am still using the computer with that video card.

Posted: Wed Aug 12, 2009 12:14 pm
by BlindSide
That may have to do with your far value and frustum. It can be tricky to get looking correct.

If you want you can check this out: http://www.ambiera.com/forum.php?t=484

You can copy the values from IrrEdit into your application (The fov, etc is stored in the scale values), and you should get the result you desire from that.

(Note that you have to use irrEdit 1.4.2 but it's not a big deal, the frustum values are what you're looking for.)

I may add proper irrEdit scene loading at a later stage.

Still that's not the main problem here, we should fix the aliasing first, do you get ok results if you just compile the example code yourself and run that?

Posted: Thu Aug 13, 2009 6:43 am
by Skomakarn
I compiled this myself:

Image

Looks good to me, so I guess it must be something wrong with my setup.
I will try using your plugin to get the right values, and see if it helps. Thanks.

EDIT: ... In your video tutorial, the cube is affected by the lighting of your node as soon as you add it, but I can't seem to make the cube, or anything else, get affected.

I am using the right version of irrEdit. Is the shaders folder supposed to be in the same directory as irrEdit.exe? Otherwise I don't know what might be causing the problem.

Posted: Sat Aug 15, 2009 4:26 pm
by kovacevic
I am using XEffects and trying to get weapon flash working.
For weapon mesh, which is made up of weapon itself and quad for flash
I use material EMT_TRANSPARENT_ADD_COLOR.

When I use addShadowToNode for the weapon node, I get this:
(tried all these: ESM_CAST, ESM_RECEIVE, ESM_BOTH)

Image

When I don't use addShadowToNode for the weapon node, I get
part of flash lightened and part of flash darkened, because it is covered by shadows:

Image

Posted: Sun Aug 16, 2009 9:12 am
by BlindSide
Hi kovacevic. Actually I think I fixed this in a recent update, which I haven't put on the first page yet (The precompiled examples exes haven't been compiled with the new dll so they won't work, don't bother running them).

This update allows the use of transparent materials. With this you have to use "excludeNodeFromLightingCalculations()" on any transparent nodes that you don't want conflicting with the lighting calculations.

You can get it here: http://irrlichtirc.g0dsoft.com/BlindSid ... _1_2_1.zip

Tell me if it fixes your problem.

Cheers

Posted: Sun Aug 16, 2009 11:18 am
by kovacevic
I found this thing working only if I use billboard node like this:

IBillboardSceneNode *bsn = smgr->addBillboardSceneNode(0, core::dimension2d<f32>(20, 20));
bsn->setMaterialFlag(video::EMF_LIGHTING, false);
bsn->setMaterialFlag(video::EMF_ZWRITE_ENABLE, false);
bsn->setMaterialType(::EMT_TRANSPARENT_ALPHA_CHANNEL);
bsn->setMaterialTexture(0,driver->getTexture("weap/gun_flash.png"));
bsn->setVisible(true);
camera->addChild(bsn);


But if I use AnimatedMeshSceneNode, result is like on second picture of previous post.

Posted: Sun Aug 16, 2009 12:54 pm
by BlindSide
So is the billboard method ok or do you have to use an AnimatedMeshSceneNode for the flash?

Are you combining the flash and the gun in one scene node? That might be the issue.

Posted: Sun Aug 16, 2009 1:05 pm
by kovacevic
With IAnimatedMeshSceneNode I have tried node with flash quad only
and also node with weapon mesh+flash quad.


Otherwise, billboard method is ok.

Posted: Wed Aug 19, 2009 1:44 am
by wildrj
Hmm is it possible to disable a shadow light? Other then completely removing it?

Posted: Wed Aug 19, 2009 3:05 am
by BlindSide
Hmm you'd think that would've been an obvious feature. :P

I'll add it.

Maybe I should make SShadowLight into a scene node of some kind? But then you get dependent on one scene manager... hmm.

Posted: Wed Aug 19, 2009 6:44 am
by wildrj
Hey blindside i made a temporary fix to get the desired "activate/deactive" fix.

New parameter on SShadowLight bool value "active"

Two new functions:
void setActive(bool) sets shadow light on and off
bool isActive() returns if shadow light is on or off

EffectHandler.h patch: http://dl.deathtouchstudios.com/patches ... lerh.patch
EffectHandler.cpp patch: http://dl.deathtouchstudios.com/patches ... rcpp.patch

P.S: this is my first attempt at releasing patches so..hope its right.

Posted: Sat Aug 22, 2009 11:37 pm
by Geomaster
It looks like this:
http://img38.imageshack.us/img38/9416/badglitch.jpg
It should look like this:
http://img268.imageshack.us/img268/2296/goodpic.jpg

I'm using a red light from example.cpp (I was too lazy to move it and change the color :P) but you can see something is terribly wrong here.

I just use EffectHandler::addShadowToNode() on each mesh scene node with ESM_CAST.

Any ideas?

Posted: Sun Aug 23, 2009 11:54 am
by BlindSide
No idea, need more information. Best advice is to get a very simple scene working first.

Posted: Sun Sep 06, 2009 8:23 pm
by Antaka
wildrj wrote:Hey blindside i made a temporary fix to get the desired "activate/deactive" fix.

New parameter on SShadowLight bool value "active"

Two new functions:
void setActive(bool) sets shadow light on and off
bool isActive() returns if shadow light is on or off

EffectHandler.h patch: http://dl.deathtouchstudios.com/patches ... lerh.patch
EffectHandler.cpp patch: http://dl.deathtouchstudios.com/patches ... rcpp.patch

P.S: this is my first attempt at releasing patches so..hope its right.
I've been looking your patch, and I have doubt,
Does this deactivate the all the processesing of the shadow or just the visual effect of the light?
this is my first attempt at using a patch for these kind of files, so maybe I missunderstand what you wrote :(
Thanks.

I had really a lot of problems to get XEffect running on Irr 1.5 and 1.5.1, I just could did it with and old version, 1.1 I think... I'm the only one with troubles, wich Irrlicht version does the rest of you use?
Another thing giving troubles is trying to add new post processing effects :(
any help will be really appreciated :D Thanks to all.

Posted: Mon Sep 07, 2009 1:00 am
by BlindSide
It's best to use a new SVN version of Irrlicht.

1.6 will be out soon and I will release a fully compatible version of XEffects with the stable version.