Glass Pane and Rain Drop refraction demo - Source Included

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

What do you like better?

The glass pane.
73
88%
The rain drops.
10
12%
 
Total votes: 83

MasterGod
Posts: 2061
Joined: Fri May 25, 2007 8:06 pm
Location: Israel
Contact:

Post by MasterGod »

Maybe you should all just update your drivers cause my specs are little below Virion's and it runs fines for me..
Image
Dev State: Abandoned (For now..)
Requirements Analysis Doc: ~87%
UML: ~0.5%
benny53
Posts: 131
Joined: Fri May 26, 2006 10:21 pm
Location: Ohio

Post by benny53 »

I don't think its the drivers, I have the latest driver for my 8800gts from nvidia. Oh, and I'm getting the black lines and what not as well. The rain drops act fine though.
xDan
Competition winner
Posts: 673
Joined: Thu Mar 30, 2006 1:23 pm
Location: UK
Contact:

Post by xDan »

Wow, a shader from BlindSide that actually runs on my old laptop :P

Those rain drops would look nice dripping down the glass plane!
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

xDan wrote: Those rain drops would look nice dripping down the glass plane!
Yes that was the original plan, expect to see something like this soon ;)

@Everyone with problems, I'm sure I already fixed those problems, maybe you are downloading a cached version from the ftp or something? Can you try downloading again Virion and see if it works.

Make sure that line 40 of "GlassP.glsl" is:

Code: Select all

spec = clamp(pow(spec,16.0),0.0,1.0);
BTW: Has anyone actually tried/read the tutorial? I spent some effort commenting the code and making it easy to understand. :P

PS: Who thinks the raindrops look better like this?

Image

To try it change line 23 of DropP.glsl to:

Code: Select all

projCoord.xy += ((TexOff.xy - vec2(0.5,0.5)) / 5.0);
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Halifax
Posts: 1424
Joined: Sun Apr 29, 2007 10:40 pm
Location: $9D95

Post by Halifax »

I was going to have a look at it when I get more time, and XEffects. But to be honest, I have been very busy lately, and cannot do anything programming related.

I do like the fact that you took the time to comment it out though, kudos.
TheQuestion = 2B || !2B
jingquan
Posts: 222
Joined: Sun Aug 20, 2006 4:10 am
Contact:

Post by jingquan »

Yes I did read it, good job. Close to 200fps on my ATI 3850 looking at the glass plane. I didn't knew there was a bug with setting particles visibility, thought my code was malfunctioning...Anyway, nice thinking with the alpha trick.

Too bad it's another scene.render() that made me drop glass rendering.
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

jingquan wrote: Too bad it's another scene.render() that made me drop glass rendering.
But it sure does look pretty doesn't it? :D Maybe you can enable it only for high settings. I mean theres always gonna be someone with a 8800GTS that can run your game way too fast anyway.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
monkeycracks
Posts: 1029
Joined: Thu Apr 06, 2006 12:45 am
Location: Tennesee, USA
Contact:

Post by monkeycracks »

Blindside you're my hero :p
This looks amazing
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Ok this last update should fix it on most machines. Can anyone thats been having trouble download it again and see if it works correctly now?

@Arras: Oh yeah I just realised this ones dynamically runtimed so you need the MSVC 2005 Runtime pack (Yes it crashes sometimes without it, Microsoft, go figure eh :P ).
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!

Post by BlindSide »

Did anyone try sticking an animated mesh in there? :

Image

Image

I've updated the executable and the source to include this ;)
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
FuzzYspo0N
Posts: 914
Joined: Fri Aug 03, 2007 12:43 pm
Location: South Africa
Contact:

Post by FuzzYspo0N »

i actually laughed out loud. u and that dwarf blinside... one of these days.

It looks awesome though. well played
agi_shi
Posts: 122
Joined: Mon Feb 26, 2007 12:46 am

Post by agi_shi »

Looks very nice, good job! :)

Just a little nitpick (you've probably seen this already, though), you'll need a custom clipping plane (especially with large objects; rain drops don't artifact too badly). Otherwise, you'll get ghost refractions from occluders in the frame buffer (same concept as reflection/refraction/portals). Just shear the near clip plane before rendering to the rtt, or take advantage of today's cards user clip planes.
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Yep, well spotted agi_shi. I was thinking of adding a clip plane to the glass pane's refraction but I figured its going a bit far for this tutorial (And I also hear that something is wrong with Irrlicht's classifyPointRelation function for plane3df (I think), so I would have to use my own methods to calculate which side of the glass the viewer is on).

Cheers
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
vectorcorpse
Posts: 86
Joined: Thu Feb 14, 2008 7:30 pm
Location: Portugal

Post by vectorcorpse »

running very nicely on linux 30fps on a GF6200LE :D
i can't wait to see the progress of u'r water demo and the metaball demo.
JDHunter
Posts: 17
Joined: Tue Jun 20, 2006 6:15 am
Location: Germany
Contact:

Post by JDHunter »

Hey BlindSide,

thx for nice tutorial, very nice work...
very helpful... big thx for release the source :D

currently successful tested on laptop with a Radeon XPRESS200 SERIES :wink: 8FPS, all shader run correctly

later i will test it on 8800gts
Post Reply