XEffects - Reloaded - New Release (V 1.3)

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki

Postby 3DModelerMan » Fri Jan 28, 2011 12:31 am

Will the raytracing work with meshes (not just spheres)? And also, does it do shadows?
That would be illogical captain...

My first full game:
http://www.kongregate.com/games/3DModelerMan/replicator#tipjar
User avatar
3DModelerMan
 
Posts: 1691
Joined: Sun May 18, 2008 9:42 pm

I got a trouble.

Postby bayofxyz » Fri Jan 28, 2011 11:28 am

Is there anyone got trouble like me?
- all of texture that I draw as button are invert(they are "unknow" button).
- Text font changed(noticed at green), I can't read them :p
Image
bayofxyz
 
Posts: 5
Joined: Sun Sep 28, 2008 5:58 pm

Re: I got a trouble.

Postby tinhtoitrangtay » Sat Feb 12, 2011 2:31 pm

bayofxyz wrote:Is there anyone got trouble like me?
- all of texture that I draw as button are invert(they are "unknow" button).
- Text font changed(noticed at green), I can't read them :p
Image

Great! You can upload your source code? I and somebody need your source code fix bug. Thank you.
tinhtoitrangtay
 
Posts: 70
Joined: Tue Oct 28, 2008 12:59 pm

Postby ACE247 » Sat Feb 12, 2011 8:16 pm

Can someone explain what this has to do with XEffects?
H8L6L5M4G3H5M7N8S7N9O1R8J1P5M7N9O4P2Q5R6T7U4M3N8X6S5T8W (If you want the secret, why not 'TRY' decrypting it? )
This Door's lock doesn't need a key, the Lock is the key to open the Lock and you don't know how to turn the key...
Link: My Blog :)
User avatar
ACE247
 
Posts: 701
Joined: Tue Mar 16, 2010 12:31 am
Location: Namibia

Postby Tihtinen » Sat Feb 12, 2011 8:51 pm

Actually that happens in XEffects in OpenGL. I had similar problems (though it has almost been a year since then and I don't know if it has been fixed). Read it and the solution here: http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=38356
Tihtinen
 
Posts: 76
Joined: Fri Jan 08, 2010 3:12 pm
Location: Finland

Postby bayofxyz » Sat Feb 12, 2011 11:22 pm

Wow, Thank you for solution :D
bayofxyz
 
Posts: 5
Joined: Sun Sep 28, 2008 5:58 pm

Postby tinhtoitrangtay » Sat Feb 19, 2011 10:41 am

bayofxyz wrote:Wow, Thank you for solution :D

Hi bayofxyz! You can upload your project using Xeffects. Thank you.
tinhtoitrangtay
 
Posts: 70
Joined: Tue Oct 28, 2008 12:59 pm

Postby DarkMarkZX » Sat Feb 19, 2011 9:58 pm

I managed to get around the problem with no shadows being cast by nodes with EMT_TRANSPARENT_ALPHA_CHANNEL_REF material type in Direct3D9. To keep it short, i found the following piece of code in EffectHandler.cpp:
Code: Select all
      DepthT = gpu->addHighLevelShaderMaterial(
         sPP.ppShader(SHADOW_PASS_1V[shaderExt]).c_str(), "vertexMain", video::EVST_VS_2_0,
         sPP.ppShader(SHADOW_PASS_1PT[shaderExt]).c_str(), "pixelMain", video::EPST_PS_2_0,
         depthMC, video::EMT_TRANSPARENT_ALPHA_CHANNEL_REF);

and changed it to this:
Code: Select all
      DepthT = gpu->addHighLevelShaderMaterial(
         sPP.ppShader(SHADOW_PASS_1V[shaderExt]).c_str(), "vertexMain", video::EVST_VS_2_0,
         sPP.ppShader(SHADOW_PASS_1P[shaderExt]).c_str(), "pixelMain", video::EPST_PS_2_0,
         depthMC, video::EMT_SOLID);

It's not perfect though, but satisfactory.

I still haven't found a solution for the other problem - does anyone know how to make anti-aliasing work in D3D9?
Image
User avatar
DarkMarkZX
 
Posts: 10
Joined: Sat Nov 20, 2010 10:48 pm
Location: Poland, Europe

Postby BlindSide » Sun Feb 20, 2011 3:50 am

But DarkMarkZX, that won't support on/off transparency, it will just draw the whole scene node regardless of the alpha on the texture. I think you need to check your materialTypeParam (In the SMaterial struct) as it controls the threshold with which an object is drawn or not based on the alpha value, perhaps this value is too low/high and is causing issues with the current alpha values you are using?

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

Postby DarkMarkZX » Sun Feb 20, 2011 2:20 pm

Thanks for the quick reply!
For testing purpose. I restored the original EffectHandler.cpp and created a simple box mesh with a partly transparent texture only to find out that the shadow it casts is completely wrong:
Image

Here's the code fragment:
Code: Select all
   node = smgr->addAnimatedMeshSceneNode(smgr->getMesh("Data/cube.X"));
   node->setMaterialTexture(0, driver->getTexture("Data/test.png"));
   node->setMaterialType(video::EMT_TRANSPARENT_ALPHA_CHANNEL);
   node->setScale(core::vector3df(0.5f, 0.5f, 0.5f));
   node->getMaterial(0).NormalizeNormals = true;
   node->setPosition(core::vector3df(50,50,100));
   effect->addShadowToNode(node, EFT_NONE, ESM_BOTH);

And here's the textured model:
http://www.sendspace.com/file/uwod17

I tried setting materialTypeParam to different values, but doesn't seem to change anything. What am I doing wrong?
Image
User avatar
DarkMarkZX
 
Posts: 10
Joined: Sat Nov 20, 2010 10:48 pm
Location: Poland, Europe

Postby BlindSide » Wed Mar 16, 2011 10:33 pm

Hi DarkMark, you have to use TRANSPARENT_ALPHA_CHANNEL_REF, transparency is not supported with TRANSPARENT_ALPHA_CHANNEL.

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

Shadow problem

Postby AW111 » Wed Mar 23, 2011 8:51 pm

Does XEffects ever use per-triangle shadowing (rather than the more realistic pixel-esque patterns)? It didn't used to do that in my program and I didn't think it was ever supposed to, but for some reason my program now only has shadowing on a triangle-by-triangle basis. At first I thought I had mistakenly enabled the default Irrlicht shadowing, but explicitly disabling it didn't clear up the problem. I would add that it clearly seems to be XEffects doing it, since changing the shadow resolution for XEffects changes the way the shadows are drawn - but they are always drawn per-triangle regardless.
Last edited by AW111 on Wed Mar 23, 2011 8:58 pm, edited 1 time in total.
AW111
 
Posts: 82
Joined: Fri Jul 16, 2010 4:49 pm

Postby stefbuet » Wed Mar 23, 2011 8:56 pm

Lighting is per vertex.
Shadowing is per pixel, it can't be per vertex with shadow maps, it's a post process effect! (not including depth buffer)
User avatar
stefbuet
Competition winner
 
Posts: 494
Joined: Sun Dec 09, 2007 4:13 pm
Location: france

Postby AW111 » Wed Mar 23, 2011 10:36 pm

I've found my problem, although I'm not sure how to solve it - I was using enormous distances for the "nearplane" and "farplane" values for the light representing the sun, since I'm using a large landscape rather than a small room (as in the XEffects demos). Reducing the scale greatly improves the shadowing, but the sun is far too close to the landscape now. Any suggestions? I suppose I'd need a variable-scale (LOD) shadowing system...
AW111
 
Posts: 82
Joined: Fri Jul 16, 2010 4:49 pm

Postby stefbuet » Wed Mar 23, 2011 10:43 pm

There are multiple solutions for this problem, using for exemple more than 1 shadow map per light : Cascaded Shadow Mapping, Perspective Shadow Mapping... I have never implemented those thought, you can study all that mostly in GPU gems books. XEffect dosn't provide such solution for now.
User avatar
stefbuet
Competition winner
 
Posts: 494
Joined: Sun Dec 09, 2007 4:13 pm
Location: france

PreviousNext

Return to Project Announcements

Who is online

Users browsing this forum: No registered users and 1 guest