XEffects - Reloaded - New Release (V 1.4)

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

That's correct stefbuet, I think you'll find that it won't really be any faster though... (Maybe more noticeable will be the precision, since you won't have to do those operations on the value first).
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
MontyTRC
Posts: 5
Joined: Tue Jun 29, 2010 11:16 am

Post by MontyTRC »

wing64 wrote:@MontyTRC:
Easy way to combine normal map with shadow ->
1. Rendering normal map to rt0
2. Rendering shadow to rt1
3. Then combine both rt0 and rt1.
Cheers. :D
Thank you :)

One more question... How can I combine multiple render targets in one final render?

:)
stefbuet
Competition winner
Posts: 495
Joined: Sun Dec 09, 2007 4:13 pm
Location: france

Post by stefbuet »

You put as texture 1 & 2 your both render target on a quad.
Then you render the quad only with the following shader:
(don't forget to send uniform data from the shader callback)

Code: Select all

varying vec2 textCoord;

void main() {
textCoord=gl_TexCoord0.xy;
}

Code: Select all

uniform sampler2D renderTarget1;
uniform sampler2D renderTarget2;
varying vec2 textCoord;

void main() {
    gl_FragColor=texture2D(renderTarget1, textCoord)+texture2D(renderTarget2, textCoord);
}
But it's exactly what is done by XEffetct.
The shader is called modulateLight or something similar.
If you look at my code I've done what you want.
If you are using your own normal mapped shaders, you can remove the dot product in the XEffect shader to go a [very] little faster.
christianclavet
Posts: 1638
Joined: Mon Apr 30, 2007 3:24 am
Location: Montreal, CANADA
Contact:

Post by christianclavet »

Hi would it there be a way to use XEFFECT to project textures? (So I could fake high detailed shadows) as from this link here:

http://udn.epicgames.com/Two/SpecialLig ... tures.html

Using this could create nice shadows and really fast render speed since there is no rendering of the scene. (I mean no RTT is needed since the shadow is pre-rendered).
Mister Bucket
Posts: 2
Joined: Tue Jul 27, 2010 4:04 pm

Post by Mister Bucket »

Hello, im sorry if this has been asked before, but is there some example on how to create directional lights/shadows? The kind that are used in "birdview" RTS games for example.

Image

I've tried to create shadow lights with all kinds of values (with directional = true), but nothing seems to work. Either i get just a veeeery small dot of light or no light at all.
porcus
Posts: 149
Joined: Sun May 27, 2007 6:24 pm
Location: Germany

Post by porcus »

@christianclavet:

That's easy. Just draw an image on the shadow camera's depth map.
(You would have to modify the update method and draw the image
directly after the depth map was rendered.)
The image must only contain black and white pixels and nothing
in between but it should get soft edges because of the filtering.
And I think you could do that also instead of rendering the depth map.
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Mister Bucket wrote:Hello, im sorry if this has been asked before, but is there some example on how to create directional lights/shadows? The kind that are used in "birdview" RTS games for example.

Image

I've tried to create shadow lights with all kinds of values (with directional = true), but nothing seems to work. Either i get just a veeeery small dot of light or no light at all.
I thought I fixed those at some stage. I guess I need to include an example in the SDK to make sure it works. There is an old tutorial in the FAQ section (Search for Diablo style) but it's using an old version of XEffects.

@christianclavet: You will need to alter some of the shaders for that. Maybe I should create an example for it, but it needs some changes.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Mister Bucket
Posts: 2
Joined: Tue Jul 27, 2010 4:04 pm

Post by Mister Bucket »

BlindSide wrote: I thought I fixed those at some stage. I guess I need to include an example in the SDK to make sure it works. There is an old tutorial in the FAQ section (Search for Diablo style) but it's using an old version of XEffects.
That would be really helpful. I remember seeing your old tutorial, but since the old XEffects seemed to be very different to the new one so that wasnt much of help to me..
ACE247
Posts: 704
Joined: Tue Mar 16, 2010 12:31 am

Post by ACE247 »

Maybe a dumb question, can I use XEffects with Normal/Parallax mapped scene nodes?
AW111
Posts: 82
Joined: Fri Jul 16, 2010 4:49 pm

Post by AW111 »

XEffects has a lot of features I've been looking for, but it only works correctly on my machine using Direct3D - when I run the examples using OpenGL, I get a slew of FBO errors or other problems - e.g., in the case of example4, the program runs but the water isn't displayed, only the terrain node. In example5, the OpenGL version displays correctly except for a number of random white dots or small squares which seem to be left behind by the spheres as I move the view.
It looks like someone else has had similar problems.
Is there any 'fix' for this, or any planned fixes in the future?
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Whats your video card?
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
AW111
Posts: 82
Joined: Fri Jul 16, 2010 4:49 pm

Post by AW111 »

BlindSide wrote:Whats your video card?
Well, I have a low-end notebook computer which has one of these "integrated" video controllers, described as "Mobile Intel(R) 4 Series Express Chipset Family". So the "video ram" is apparently virtual, borrowed as needed from system ram. Or something like that.
It was the cheapest notebook available with features that weren't entirely obsolete, purchased after my previous machine died an early death and I was on the brink of giving up technology entirely and living in a cave the rest of my life.
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

I'm fairly sure that one doesn't support the required render target formats, make sure to check the specs!

You may have to set a pow2 size for the screen RTT, and use 16 bit depth.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
AW111
Posts: 82
Joined: Fri Jul 16, 2010 4:49 pm

Post by AW111 »

I tried to add the water effect from example4 to my own program (which displays a custom terrain node made of procedurally-generated terrain, with a revolving "sun" in the form of a directional light). Nothing displays except the blue background color, even when I add the default TerrainSceneNode that was used in example4 itself. This terrain node (and the rest) are only displayed when I use the normal "smgr->drawAll();" rather than "effect->update();" - but oddly, the frame rate for my normal custom terrain is about three times faster than it used to be before I added XEffects. I'm not sure how it speeds up my own stuff even when I'm not using "effect->update();"
Any idea what might be preventing anything from rendering (except the blue background color)?
AW111
Posts: 82
Joined: Fri Jul 16, 2010 4:49 pm

Post by AW111 »

I've isolated the source of the above problem:
When using Direct3D, I get a large number of errors at run-time which all say:
"error X3506: unrecognized compiler target 'vs_3_0'"
The odd thing is that when I run the mouse pointer over "EVST_VS_3_0" in EffectHandler.cpp, VisualC++ recognizes it and gives a value of "3". Or isn't "EVST_VS_3_0" the same thing as the "vs_3_0" mentioned in the error message?
I noticed that when other people had this problem a few months ago, the only fix that was suggested was to recompile Irrlicht and see if that helps. Is there another fix?
When I use OpenGL, those errors disappear but I do get several "Unsupported texture format" errors and "FBO has one or several incomplete image attachments", "FBO error" and "FBO incomplete"
In OpenGL it does render the default terrain node and my own terrain, but the only shader effect is the underwater blue-green tint when you move below 0 in the Y axis.
Any help would be appreciated.
Post Reply