Page 4 of 6

Posted: Sat Mar 31, 2007 5:41 pm
by hanswurst
OK, sorry.

I put that switch/case thing at the wrong place. it has to be called directly after beginScene().

Now the screen is not turning black anymore, instead nothing happens when trying to use on of the effects. :roll:

Posted: Sat Mar 31, 2007 5:54 pm
by 7h0mm4y
I did a couple of runs with the debugger, to learn that the method: "CQuadSceneNode::OnAnimate()" ("CQuadSceneNode::OnPreRender()") is never called. :?

Posted: Sat Mar 31, 2007 5:59 pm
by hanswurst
Found that out too.
I even commented it out....doesn't change anything.
As far as i understand it, OnAnimate() is called before everything is rendered (like OnPreRender() did). So, what is the argument for? I don't get it :?

Posted: Sat Mar 31, 2007 6:43 pm
by hanswurst
To be sure, i tried all available renderer, used a "fresh" FPS-Camera, but no Effect appears. There are 3 possibilities left:
- either my code is wrong,
- effects are incompatible with 1.3 (actually impossible), or
- i don't understand that OnAnimate() function right, and that this is the function causing this problem, although it is never used.

Posted: Wed Apr 04, 2007 11:29 am
by mrcdrc
In order to get this code working with Irrlicht 1.3 i replaced OnPreRender() with the new method called OnRegisterSceneNode() (instead of OnAnimate() which actually isn't meant to be used for registering scene nodes for rendering anyways) and the code at least works. Allthough i am using my own ICameraSceneNode so the effects currently do not show up as expected...still looking for an idea how to fix that transformation stuff the right way...

bye
mrc

Posted: Wed Apr 04, 2007 7:14 pm
by 7h0mm4y
Thank you :D it works now, but sometimes the effect just stops and after i move a bit around it continues :roll:

Posted: Thu Apr 05, 2007 7:16 am
by mrcdrc
Ok, i fixed that transformation problem just by adding a 'setRotation(vector3df(RotX, RotY, 0));' to my camera animation code.

The usual behavior is to just construct a temporary rotation matrix and update camera position and target accordingly. The position of the ICameraSceneNode was updated too (setPosition) but 'setRotation' was missing. At least in my code.

Now the transformation of the quads relative to the camera is correct.

The only strange thing left is that the effect seems to be heavily 'overdozed'. Looks like and endless feedback loop...
hmmm.

bye
mrc

Posted: Wed Jun 13, 2007 10:50 am
by allked
1>e:\myworkirr\glowworks\demo_n3\ceffects.h(17) : error C2011: 'EffectsLibrary::CQuadSceneNode' : 'class' type redefinition
1> e:\myworkirr\glowworks\demo_n3\ceffects.h(17) : see declaration of 'EffectsLibrary::CQuadSceneNode'



i only got 1 error but i don't know what's wrong ,any help? thanku al

Posted: Sat Jun 16, 2007 5:00 am
by linkoraclehero
Okay, I've figured it out. And yes, it runs fairly well on 1.3.

Follow these steps:

Add a deconstructor to the CPP and H files:
CPP: CQuadSceneNode::~CQuadSceneNode() {}
H: ~CQuadSceneNode();

Change onPreRender() to OnRegisterSceneNode():
CPP: void CQuadSceneNode::OnRegisterSceneNode()
H: virtual void OnRegisterSceneNode();

Call a create BEFORE the main loop:
EffectsLibrary::CreateGlow(cam,smgr,20);

Call Render AFTER endScene():
driver->endScene();
EffectsLibrary::RenderGlow(smgr,128,128,128,128,20);

I'll work on bettering the code and making it more advanced.

[Edit]
Here's a screenshot, running smooth on 1.3 :]
Image

I'll have the updated setup at http://bladestrife.net/downloads.php soon enough :]
Fixes a few code problems (Defaults being in CPP, not H), and I'll translate it into english. Also, allow you to possibly set the resolution of the effects.

Posted: Sat Jun 16, 2007 6:53 am
by linkoraclehero
I added a CreateSwimEffect, gives the effect of swimming underwater :]

Posted: Sat Jun 16, 2007 1:52 pm
by Virion
cool... can these be added into the core?

Posted: Sun Jun 17, 2007 3:49 am
by linkoraclehero
There's no point in putting them into the engine... I'm going to look into a way to draw without the scene node, as well as looking for a way to hook into DX9's render device and be able to apply fullscreen effects there too. I'm not an expert, I just seem to stumble on good and useful ideas. If things go well, you'll see some of these findings in 1.4 8)

Posted: Mon Nov 19, 2007 9:24 pm
by porcus
The download link is not correct.
Can someone upload this again, PLEASE ?

Posted: Wed Nov 21, 2007 11:52 am
by kiranmaya

Posted: Thu Nov 22, 2007 7:13 pm
by porcus
Simson wrote:It's limited at Camera FPS because my level in maths is low and i don't know how to get the camera rotation.
If you find the solution, don't hesitate to post the code :).
Whats with getrotation() ?