XEffects - Reloaded - New Release (V 1.4)

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

XEffects - Reloaded - New Release (V 1.4)

Postby BlindSide » Tue Oct 14, 2008 11:45 am

XEffects - RELOADED

UPDATE: V 1.4 Uploaded to github and fixed the TexVar issue.

It's finally time for a new release of XEffects.

New features and API changes include:

cpp Code: Select all
 
Important API changes:
 - effectHandler is now called EffectHandler.
 - EffectHandler constructor does NOT take shadow map resolution anymore, this can now be set per-light, and is changeable at runtime.
 - You can now just include "XEffects.h" in your projects, not "EffectHandler.h" or anything.
 - Other minor changes. (Ask me if you run into problems with the new API)
 
New features.
 - Smooth Round Spot Light cones. You can pass a boolean parameter to the EffectHandler constructor to specify whether you want round smooth edges on the shadow lights or basic square hard edges. See Example1 for usage.
 - Improved Bloom shader, bloom shader now requires 4 passes, an additional Brightness Pass is taken to enhance the bright colors. See Example1 for usage.
 - SSAO Effect. Heavy duty ambient occlusion done in world space, in DirectX and OpenGL. See Example3 for usage.
 - Multiple shadow maps and shadow map caching. Now you can create multiple shadow lights with multiple shadow map resolutions. If the shadow lights share the same square shadow map resolution then the same shadow map is used, saving video memory. At runtime you have the ability to delete and free the resources of all shadow maps in use, then they will be recreated automatically by XEffects when they are needed again.
 


Here is a screenshot showing the new soft round spotlights (In Example1):

Image

Here is a screenshot showing 3 stages of the new SSAO effect. Top is no SSAO, Middle is SSAO with full noise, and Bottom is SSAO with full noise after a blur pass (In Example3):

Image

You can see that the main parts touching between the spheres are darker.

cpp Code: Select all
Example3 SSAO Demo controls: 'S' Enables/Disables SSAO, 'B' Enables/Disables blurring, 'P' Enables/Disables pure SSAO output.


(You can download this new release from the updated link at the bottom)

Older info/screenshots:

A whole new wave of terror shall sweep the Irrlicht graphics world... (Dum dum dum)

Image

Whether you like it hard...

Image

Or soft...

Image

Dunununununu... (Que action music)...

Multiple infinite additive lights...

Image

Image

And a twist that will shock everyone...

Image

Coming to scene-namas near you! XEffects RELOADED.

(Actually viewing now, download link below.)

GitHub Page (Includes source code and downloads):
https://github.com/monstrobishi/xeffects

Edit: Thanks Nadro for the new download link, I destroyed my old VPS and forgot this was still hosted on there :P
Last edited by BlindSide on Sun May 16, 2010 1:00 pm, edited 9 times in total.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
BlindSide
Admin
 
Posts: 2820
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Postby D-Eagle » Tue Oct 14, 2008 1:16 pm

HOOLY CRAP
Testing it right now!
D-Eagle
 
Posts: 25
Joined: Fri Jan 25, 2008 11:03 pm

Postby JP » Tue Oct 14, 2008 1:20 pm

Looking nice blindside! I'm thinking i'll have to use this if i do another proper irrlicht project!

not sure what's special about the last screenie though... is it because of the way the shadows loom?
Image Image Image
User avatar
JP
 
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK

Postby Luke » Tue Oct 14, 2008 1:29 pm

very nice :) amazing work

not sure what's special about the last screenie though


I think it's showing the point lighting?
Luke
Admin
 
Posts: 449
Joined: Fri Jul 14, 2006 7:55 am
Location: Australia

Postby JP » Tue Oct 14, 2008 1:39 pm

hmm possibly, thought the previous ones used point lights too but perhaps they're directional...
Image Image Image
User avatar
JP
 
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK

Postby D-Eagle » Tue Oct 14, 2008 1:53 pm

The first example, is it possible to make the shadow lights cast black shadows instead of colored shadows (but still have colored lighting)?
I don't really like those colored shadows so much..
D-Eagle
 
Posts: 25
Joined: Fri Jan 25, 2008 11:03 pm

Postby JP » Tue Oct 14, 2008 2:00 pm

they're not really coloured shadows, that's the result you get from coloured lighting.... there's 3 lights of different colours and the colour of the shadows is created by the two lights which aren't being blocked.
Image Image Image
User avatar
JP
 
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK

Postby xDan » Tue Oct 14, 2008 2:31 pm

Cool. It works perfectly in DirectX, but not OpenGl... (which I only ever use...) As with the last XEffects.

But now I will finally bother to report the problems :)

The main things seems to be my graphics card or whatever not recognising "gl_FragData". Is there a way to get around this and not require gl_FragData? Or is it the end for me? :(

I know very little about shaders :)

Aside from that, there's lots of little issues like: it complaining of integers being divided by floats, wanting them cast to a float first. (e.g. SCREENY), not liking an "f" at the end of a float value ("256.0f"). I could fix them all, but there's not much point if I still need this "gl_FragData" thing.

I suppose is this all because my graphics card is not very good?
User avatar
xDan
Competition winner
 
Posts: 673
Joined: Thu Mar 30, 2006 1:23 pm
Location: UK

Postby fmx » Tue Oct 14, 2008 3:16 pm

awesome stuff as usual BlindSide!
really useful to have (theoretically) infinite shadow-casting ability, not to mention the nice end results

xDan, it might be your complier thats a little weird too, what are you using?
and whats your graphics card? OpenGL seems to work fine for me (geforce7)
User avatar
fmx
 
Posts: 559
Joined: Wed Dec 06, 2006 9:28 am
Location: UK

Postby JP » Tue Oct 14, 2008 3:35 pm

Just started having a little play around with the source and i got a compile error in CShaderPre.cpp; driver->getVendorInfo doesn't exist apparently... I'm using 1.4.2.. apparently this function was added in 1.4, has it now disappeared? I replaced it with what i thought was possibly the closest function name now; driver->getName()... compiles but not sure if it will work in the same way :lol:
Image Image Image
User avatar
JP
 
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK

Postby torleif » Wed Oct 15, 2008 1:34 am

JP wrote:Just started having a little play around with the source and i got a compile error in CShaderPre.cpp; driver->getVendorInfo doesn't exist apparently... I'm using 1.4.2.. apparently this function was added in 1.4, has it now disappeared? I replaced it with what i thought was possibly the closest function name now; driver->getName()... compiles but not sure if it will work in the same way :lol:


I'd like to see it that's an answer too, Originally I just deleted that part. I could get the original version of Xeffects to compile on my game, but I couldn't this version to compile (I was getting hopeful it would work). I get a array out of index error with this version in:

Code: Select all
if(shaderFolder[shaderFolder.size() - 1] != '/')
      shaderFolder += "/"; on line 35 in effectWrapper.cpp


I'll probably find a solution if I go comb the example code, but I can't be effed right now
torleif
 
Posts: 188
Joined: Mon Jun 30, 2008 4:53 am

Postby BlindSide » Wed Oct 15, 2008 12:33 pm

Thanks for the feedback guys, one of the joys of posting something on a forum like this is you get free QA. ;)

I updated the wrapper to try and address everyone's individual issues.

xDan wrote:The main things seems to be my graphics card or whatever not recognising "gl_FragData". Is there a way to get around this and not require gl_FragData? Or is it the end for me? Sad

I know very little about shaders Smile

Aside from that, there's lots of little issues like: it complaining of integers being divided by floats, wanting them cast to a float first. (e.g. SCREENY), not liking an "f" at the end of a float value ("256.0f"). I could fix them all, but there's not much point if I still need this "gl_FragData" thing.

I suppose is this all because my graphics card is not very good?


Ok I fixed everything I could find and changed all the gl_FragData to gl_FragColor. It should work fine now. What kind of video card do you have? ATI 9550? NVidia FX?

torlief wrote:I get a array out of index error


How silly of me to overlook that, fixed.

JP wrote:Just started having a little play around with the source and i got a compile error in CShaderPre.cpp; driver->getVendorInfo doesn't exist apparently... I'm using 1.4.2.. apparently this function was added in 1.4, has it now disappeared? I replaced it with what i thought was possibly the closest function name now; driver->getName()... compiles but not sure if it will work in the same way Laughing


Commented it out now in CShaderPre.cpp. I use it in the example too but I added a note on what to do if it isn't defined. It's really not used anywhere. I only check in the example if the video card is an NVidia because alot of ATI cards have trouble with npot rtts in OpenGL (Yes hybrid, this is the latest revision :P ).

Infact, can anyone with an ATI card uncomment that line (To get the full screen resolution), and tell me what video card they have and if it works correctly in OpenGL or not?

D-Eagle wrote:The first example, is it possible to make the shadow lights cast black shadows instead of colored shadows (but still have colored lighting)?
I don't really like those colored shadows so much..


Tis' as the man (JP) said, the result is a side effect of realistic lighting. You can still get the result you desire however, the easy way would be to just use one light, like in the old XEffects, and you will have the same look. Another way for multiple lights is if you made the shadow light's colors full white, both of them, and then instead of disabling lighting in Irrlicht on the scene nodes like in the example you just do your own colored lighting, this should produce something along the lines of what you probably want.

JP wrote:not sure what's special about the last screenie though... is it because of the way the shadows loom?


Luke wrote:I think it's showing the point lighting?


Yeah :D , infact point lights in Irrlicht are no trivial thing. Theres no cube maps or anything to make it easy. In this case it's just a quick hack, rendering 6 spot lights at once to cover the entire sphere of view. This is not dis-similar to my virtual cube mapping technique, but is quiet a bit slower (12 passes per point light instead of 7). It does look pretty cool though, and I'm sure most people targeting higher end machines will make use of this nifty little trick. Also you can choose to cover a partial area, using 2 or 3 spotlights if the light is in the corner of the room or something.

I think that covers it all. I'd love to get some more feedback on performance for video cards and compatibility accross the ati range.

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

Postby JP » Wed Oct 15, 2008 12:48 pm

Cool, cool. Unfortunately the performance is horrific on my work PC (and won't be any better at home i shouldn't think). I get really low fps, completely unplayable, even with the lowest dimensions/filter :(
Image Image Image
User avatar
JP
 
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK

Postby BlindSide » Wed Oct 15, 2008 1:33 pm

What video card you using? You're referring to just the point light demo right? Keep in mind that the point lights even at the lowest res/filter still offer pretty decent quality since you're using 6 shadowmaps instead of one, and there is no wasted space so the resolution is used sparingly.

I get around 20 fps on my 6800 GT, and that's not exactly top of the line these days. Note that it's still 20 fps if I use a slightly better better/resolution, because with this many passes the delay/overhead of switching rtts adds a constant overhead that might as well be utilized for improved quality.

But yeah the point lights are just an easter egg more or less, I still expect most practical usage to consist of spot/directional lights.

If you have like a tall room, you can still place a spot light with a wide FOV like this, and still cover pretty much everything:
Code: Select all
______
|  o  |
| / \ |
|     |
|     |
|     |
|     |
--------

Infact most lighting fixtures if you look around (Well... up) are like this.

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

Postby Sudi » Wed Oct 15, 2008 1:48 pm

hmm really great stuff BlindSide. I was waiting for this.
But ur still using the direct shadow method...
I'm trying really hard to get screen shadowing to work......so that i don't have to change the shader of each model which should receive shadows.


Still i'm really impressed that u made it work with irrlicht.
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.
User avatar
Sudi
 
Posts: 1678
Joined: Fri Aug 26, 2005 8:38 pm

Next

Return to Project Announcements

Who is online

Users browsing this forum: No registered users and 0 guests