XEffects - Reloaded - New Release (V 1.4)

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
Harch
Posts: 75
Joined: Wed Oct 08, 2014 9:01 pm

Re: XEffects - Reloaded - New Release (V 1.3)

Post by Harch »

Somebody repaired xEffects? What about other approaches?
christianclavet
Posts: 1638
Joined: Mon Apr 30, 2007 3:24 am
Location: Montreal, CANADA
Contact:

Re: XEffects - Reloaded - New Release (V 1.3)

Post by christianclavet »

Hi, This is Nadro answer about the transparency problem:
This is the best solution to handle alpha + shaders with Irrlicht from SVN:
- Use standard SOLID material as a base material.
- Set SMaterial::BlendOperation to EBO_ADD;
- Set SMaterial::BlendFactor to pack_textureBlendFunc(EBF_SRC_ALPHA, EBF_ONE_MINUS_SRC_ALPHA);
With this solution you don't need separate materialType for solid and transparent shaders, you can just change SMaterial::BlendFactor, however old solution should works too.
You can check this thread. Where I reported the problem.
http://irrlicht.sourceforge.net/forum/v ... =7&t=50805
Last edited by christianclavet on Tue Jun 23, 2015 12:58 pm, edited 1 time in total.
Harch
Posts: 75
Joined: Wed Oct 08, 2014 9:01 pm

Re: XEffects - Reloaded - New Release (V 1.3)

Post by Harch »

I do so. It turned out that all the shadows drawn EXCEPT the shadow from a cube with an alpha channel. I would like to and from the shadows drawn. So, I could not just the cube add processing shadows ... But I want to see the shadow, and from the letters of the cube.

Give a link to the thread, please. Because the old solution does not work. I will write to it...

Code:

Code: Select all

 
cube->getMaterial(0).MaterialType = video::EMT_SOLID;
    cube->getMaterial(0).BlendOperation = EBO_ADD;
    cube->getMaterial(0).BlendFactor = pack_textureBlendFunc(EBF_SRC_ALPHA, EBF_ONE_MINUS_SRC_ALPHA);
    effect->addShadowToNode(cube, filterType, ESM_CAST);
 
mongoose7
Posts: 1227
Joined: Wed Apr 06, 2011 12:13 pm

Re: XEffects - Reloaded - New Release (V 1.3)

Post by mongoose7 »

Harch wrote:While mongoose7 is preparing an example may be someone who understands the shaders, look, why xEffects not work with a transparent material, please?
Done: http://irrlicht.sourceforge.net/forum/v ... 36#p294636
mongoose7
Posts: 1227
Joined: Wed Apr 06, 2011 12:13 pm

Re: XEffects - Reloaded - New Release (V 1.3)

Post by mongoose7 »

Harch wrote:Somebody repaired xEffects? What about other approaches?
Hmm, I don't know that XEffects is broken.

Image

I'm actually not convinced that you have fixed EffectCB.h as previously suggested. That is, change

Code: Select all

irr::u32 TexVar = 0;
to

Code: Select all

irr::s32 TexVar = 0;
and change

Code: Select all

((irr:f32 *)&TexVar)
to

Code: Select all

&TexVar
Note that the screenshot was taken with Irrlicht Trunk. I tried with 1.8.1 and could only get one light to show (green) but there was no trouble with the transparent cube. Is there a problem with TRANSPARENT_ADD_COLOR in 1.8.1? This is what XEffects uses to combine the lighting passes.
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Re: XEffects - Reloaded - New Release (V 1.3)

Post by BlindSide »

Good question Mongoose. If someone wants to share an updated package, I can put the link on the main page. Or perhaps I can chuck it on github and link to that? I'm surprised people are still using this to be honest.

Cheers,
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Re: XEffects - Reloaded - New Release (V 1.3)

Post by BlindSide »

Hi all, I've updated the first post to link to the new github page and fixed the TexVar issue while I'm at it. :D
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
CuteAlien
Admin
Posts: 9628
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: XEffects - Reloaded - New Release (V 1.3)

Post by CuteAlien »

Yay, BlindSide is back!
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Harch
Posts: 75
Joined: Wed Oct 08, 2014 9:01 pm

Re: XEffects - Reloaded - New Release (V 1.4)

Post by Harch »

Mongoose7, is this OpenGL or DirectX? In DirectX all is OK, but in OpenGL shadows from transparent objects (ALPHA_CHANNEL_REF) don't work.

My irrlicht is Irrlicht 1.8.1 (not latest build 1.9).
mongoose7
Posts: 1227
Joined: Wed Apr 06, 2011 12:13 pm

Re: XEffects - Reloaded - New Release (V 1.4)

Post by mongoose7 »

You have to use 'trunk'. There appears to be a problem with 1.8.1. Fixes in trunk are not back-ported.
Harch
Posts: 75
Joined: Wed Oct 08, 2014 9:01 pm

Re: XEffects - Reloaded - New Release (V 1.4)

Post by Harch »

I'll try that, thanks.

I will write when checking this.

P.S. Please give me a link to "trunk".
CuteAlien
Admin
Posts: 9628
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: XEffects - Reloaded - New Release (V 1.4)

Post by CuteAlien »

Link to trunk: http://sourceforge.net/p/irrlicht/code/HEAD/tree/
You will need a svn client to download it (on Windows people mostly use TortoiseSVN).
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
mongoose7
Posts: 1227
Joined: Wed Apr 06, 2011 12:13 pm

Re: XEffects - Reloaded - New Release (V 1.4)

Post by mongoose7 »

You can download a ZIP file ("Download snapshot").
Harch
Posts: 75
Joined: Wed Oct 08, 2014 9:01 pm

Re: XEffects - Reloaded - New Release (V 1.4)

Post by Harch »

I downloaded a last irrlicht trunk. And also I downloaded the xEffects from the first post. I compiled Irrlicht in release-fast-math-dll(and accurate-math too) mode (Code::Blocks). I included xEffects. I compiled this. And I get the same error: with a transparent cube shadows is no all, but without a transparent cube all is works (with OpenGL driver).
kilbith
Posts: 1
Joined: Sat Aug 19, 2017 1:08 pm

Re: XEffects - Reloaded - New Release (V 1.4)

Post by kilbith »

Hello, Irrlicht newbie here.

I'm trying to add shadow mapping to a large mesh (a whole voxel terrain). But all I'm getting is some large "blinking" squarred shadows over the terrain. A screenshot explains better : http://imgur.com/MGWHgmf

Here is a code snippet :

Code: Select all

 
EffectHandler *effect = &(*(new PostProcess(device, driver))->m_effect);
 
effect->addPostProcessingEffectFromFile(core::stringc("client/shaders/postprocessing/BlurHP.glsl"));
effect->addPostProcessingEffectFromFile(core::stringc("client/shaders/postprocessing/BlurVP.glsl"));    
effect->addPostProcessingEffectFromFile(core::stringc("client/shaders/postprocessing/BloomP.glsl"));
 
scene::ISceneNode *m_map = smgr->getSceneNodeFromId(666);
 
m_map->setMaterialFlag(video::EMF_LIGHTING, false);
 
E_FILTER_TYPE filterType = (E_FILTER_TYPE)4;
effect->addShadowToNode(m_map, filterType, ESM_BOTH);
 
effect->addShadowLight(SShadowLight(512, v3f(-150, 500, -150), v3f(5, 0, 5), 
    video::SColor(255, 255, 255, 255), 20.0f, 60.0f, 30.0f * core::DEGTORAD));
 
What I'm doing wrong ?
Post Reply