Page 8 of 12

Posted: Sun Mar 23, 2008 5:08 pm
by Nadro
NPOT textures works on Radeon 9800 and newer, but this textures is slower than POT, so We should do test, what will be better: NPOT vs. POT (with higher resolutions of texture sometimes)

Posted: Mon Mar 24, 2008 7:14 am
by BlindSide
Another update,

- Fixed a bug where shadows were lagging behind the camera projection.
- Now supports setting of a custom scene manager using setActiveSceneManager().
- effectHandler initialisation now takes an additional, fourth parameter to specify the resolution of the screen post processing filter. If passed a value of (0,0), it just uses the current screen resolution. This parameter is useful if you need to support older cards by specifying a low resolution, or want to create your own fullscreen anti-aliasing routine by rendering to a high resolution buffer then filtering.
- Fixed the bloom shader on ATI cards.

Posted: Mon Mar 24, 2008 12:43 pm
by Dorth
might I suggest also supporting (-1,-1) and (-2,-2)
(-1,-1) Next pow of 2 for each side
(-2,-2) Next square pow of 2 based on longest side
:)

Posted: Mon Mar 31, 2008 12:22 am
by GrigoriosSokratis
Hi, this addon looks great, but since my project has some features that don't work with Irrlicht 1.4, could anyone please tell me how could I implement this addon in 1.3.1?

I've tried everything with no success.

Thank you

Posted: Sun Apr 06, 2008 7:39 pm
by radubolovan
I've downloaded the source code and used it.
Without adding shadows to nodes all is fine; here is a snapshot:
http://dsflake.darkstarlinux.ro/~radubo ... nap018.png
But if I add a shadow to scene node it seems like I can't move around the scene node; here is a snapshot:
http://dsflake.darkstarlinux.ro/~radubo ... nap019.png
And nothing happens if I try to move (forward, backward, etc).
Here is general code:

Code: Select all

m_efHandler = dsnew effectHandler( device, dimension2d<s32>( 1024, 1024 ), m_appDir, driver->getScreenSize() );
m_efHandler->setMaxShadowDistanceFromLight( 10000 );

m_efHandler->setShadowDarkness( 1.0f );
m_efHandler->setClearColour( SColor( 0, 0, 0, 255 ) );
the update:

Code: Select all

m_efHandler->update();
and scene node specific stuff:

Code: Select all

node->setMaterialType( EMT_SOLID );
node->setMaterialFlag( EMF_LIGHTING, true );
node->setMaterialFlag( EMF_BACK_FACE_CULLING, false );
m_efHandler->addShadowToNode( node, EFT_16PCF, ESM_BOTH );//this line of code is the only difference between those two snapshots
m_efHandler->addNodeToDepthPass( node );
What have I do wrong?

Posted: Mon Apr 07, 2008 2:16 am
by BlindSide
Sorry but your screenshots aren't loading (Maybe its because I am on the university network :? )
I can't move around the scene node
What exactly do you mean by this? The camera doesn't move around or what? The effects shouldn't really effect gameplay dynamics... (Is that a pun? :P )

Keep in mind that in the new version "m_efHandler->update();" should REPLACE your call to "smgr->drawAll();", not come before or after it. (This is due to the newly supported post-processing effects.)

Posted: Mon Apr 07, 2008 12:12 pm
by radubolovan
The images aren't loading because that server has stoped for some reason ... I don't know exactly right now ...
BlindSide wrote:The camera doesn't move around or what?
Something like that ... all I can see it's that node from inside of it. And anything i do (rotate/move) nothing change what I see. I think that the next two lines affects this:

Code: Select all

effectWrapper.cpp:
void effectHandler::update()
{
	if(shadowsUnsupported)
		return;

	if(!shadowNodeArray.empty())
	{
	driver->setTransform(ETS_VIEW, lightCam->getViewMatrix());
	driver->setTransform(ETS_PROJECTION, lightCam->getProjectionMatrix());
        ...
}
I commented thos and everythig is good now (I guess). Of course I replaced the smgr->drawAll() with m_efhandler->update() !!!

One other think that I don't understand ... I have some lights in my scene, but seams like the shadows is ignore them ... is this correct?
I've forgat to tell you ... I am using Linux and OpenGL on an nVidia Geforce 6600 GTX and irrlicht 1.4 from svn

Posted: Mon Apr 07, 2008 12:49 pm
by BlindSide
Yes sorry X-Effects wrapper shadow maps currently only support one light. One suggested technique is to render multiple passes with no texture, and combine them in a post processing pass.

Posted: Mon Apr 07, 2008 5:36 pm
by radubolovan
BlindSide wrote:Yes sorry X-Effects wrapper shadow maps currently only support one light. One suggested technique is to render multiple passes with no texture, and combine them in a post processing pass.
How can I control that light? I don't want it to follow camera!

Posted: Mon Apr 07, 2008 10:44 pm
by BlindSide
The light can usually be controlled by using setLightPosition and setLightTarget. You have however removed the parts that the set correct view and projection matrices for the depth map render so I don't think this will help.

Back to your previous problem, what kind of camera are you using for the main scene, are you rendering some kind of custom scene nodes or custom cameras? It seems that your view and projection matrices are not being reset upon drawAll(), which they should be. Are you using a custom scene manager? Its possible to set a custom one if you need to.

Posted: Tue Apr 08, 2008 5:24 pm
by radubolovan
I am using CameraSceneNodeFPS and I have a sun made by me, but is not a scene node ... is a simple class which has update and draw ...
And the server is up and you can see the snapshots :)

That house is a .x mesh and I load with this code:

Code: Select all

SAnimatedMesh* mesh = (SAnimatedMesh*)smgr->getMesh( "./data/objects/house/house.x" );
IAnimatedMeshSceneNode* sceneNode = smgr->addAnimatedMeshSceneNode( mesh );
sceneNode->setMaterialType( EMT_SOLID );
sceneNode->setMaterialFlag( EMF_LIGHTING, true );
sceneNode->setMaterialFlag( EMF_BACK_FACE_CULLING, false );

Suggestion ;)

Posted: Wed Apr 16, 2008 7:02 am
by lantis
Subj ;)
Append to library method initialize() which reinit all sladers and camera
Its required when need clear scene and load another scene ;)

Posted: Wed Apr 16, 2008 3:30 pm
by BlindSide
Yes thanks for the tip, I've been awefully negligent of common sense stuff like deconstruction etc in this wrapper.

Yoran has done a wonderful job of optimizing this wrapper to use binary searches, const iterators, just good old textbook C++, (And it includes the necessary methods for cleaning up and reinitialising.), so I'll probably release it with these improvements soon.

Cheers

Posted: Sun Apr 27, 2008 1:09 pm
by Xplod
So, what about these improvements ? :)

Also, when I add the RealisticWaterSceneNode, the screens don't render (screen is black), and I can't found out why. What's the problem ?

Posted: Tue May 13, 2008 6:20 pm
by Xplod
Up.
News ?