XEffects - (Indoor Soft-Shadows + Post-Processing)

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Post 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)
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post 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.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Dorth
Posts: 931
Joined: Sat May 26, 2007 11:03 pm

Post 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
:)
GrigoriosSokratis
Posts: 34
Joined: Wed Apr 25, 2007 3:48 am

Post 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
radubolovan
Posts: 60
Joined: Tue Nov 13, 2007 7:03 pm
Location: Bucharest - Romania
Contact:

Post 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?
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post 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.)
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
radubolovan
Posts: 60
Joined: Tue Nov 13, 2007 7:03 pm
Location: Bucharest - Romania
Contact:

Post 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
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post 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.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
radubolovan
Posts: 60
Joined: Tue Nov 13, 2007 7:03 pm
Location: Bucharest - Romania
Contact:

Post 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!
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post 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.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
radubolovan
Posts: 60
Joined: Tue Nov 13, 2007 7:03 pm
Location: Bucharest - Romania
Contact:

Post 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 );
lantis
Posts: 64
Joined: Thu Jun 17, 2004 2:46 pm

Suggestion ;)

Post by lantis »

Subj ;)
Append to library method initialize() which reinit all sladers and camera
Its required when need clear scene and load another scene ;)
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post 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
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Xplod
Posts: 32
Joined: Sat Mar 29, 2008 5:48 pm
Contact:

Post 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 ?
Xplod
Posts: 32
Joined: Sat Mar 29, 2008 5:48 pm
Contact:

Post by Xplod »

Up.
News ?
Post Reply