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

dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

i know this is bordering fetishism already, but i can't stop testing this code. so far, it's holding up pretty well.

Image
Image
DtD
Posts: 264
Joined: Mon Aug 11, 2008 7:05 am
Location: Kansas
Contact:

Post by DtD »

Very nice :)
One thing I did notice: You can't refract a refraction (EG: If you look through the window, the dwarf just dissapears) its understandable, and wouldn't be a problem for most games, but just thought I should point it out.

Also, I think the water effect would be much nicer with something like meatballs, although I don't know if it is feasible to accomplish without ruining the speed.

~DtD
PS> Sorry for the bump, but it was discussed in here and I didn't want to get off topic there.
twilight17
Posts: 362
Joined: Sun Dec 16, 2007 9:25 pm

Post by twilight17 »

DtD wrote:Very nice :) Also, I think the water effect would be much nicer with something like meatballs...
:lol:
Post this userbar I made on other websites to show your support for Irrlicht!
Image
http://img147.imageshack.us/img147/1261 ... wernq4.png
sio2
Competition winner
Posts: 1003
Joined: Thu Sep 21, 2006 5:33 pm
Location: UK

Post by sio2 »

DtD wrote:Very nice :)
One thing I did notice: You can't refract a refraction (EG: If you look through the window, the dwarf just dissapears) its understandable, and wouldn't be a problem for most games, but just thought I should point it out.
Good point. Anything refractive isn't rendered when composing the render-target texture that's used in the refractive lookup. Can be solved via recursive rendering, but could get very expensive.

The other issue is the distortion of the refractive quad when it intersects the bottom edge of the viewport.
DtD wrote:Also, I think the water effect would be much nicer with something like meatballs, although I don't know if it is feasible to accomplish without ruining the speed.
Metaballs are more useful than meatballs I would guess (unless you're hungry). :lol:

Metaballs are easy when there's just two of them. When there are 60000 fluid particles it gets more involved. :wink: Blindside's raindrop shader may well be good enough for most people - and it's a relatively cheap shader.
DtD
Posts: 264
Joined: Mon Aug 11, 2008 7:05 am
Location: Kansas
Contact:

Post by DtD »

He he, oops. I don't even like meatballs (or ground meat for that matter.)

Yeah, I know refracting what was already refrected would be expensive, just thought I'd point it out.

Expensive? Yes. Very Cool? Yeser Yes.
Perhaps I'll do it somtime if I am bored :lol:

~DtD
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

sio2 wrote:it's a relatively cheap shader.
Theres room for improvement here. It wouldn't be too difficult to use a screenquad to copy the RTT to another, then use that second RTT to draw. When switching rendertargets you simply don't clear the ZBuffer and disable the ZWriteEnable flag on the screenquad material to preserve the ZBuffer state so that when the raindrops are rendered they are properly culled.

Cheers
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
stefbuet
Competition winner
Posts: 495
Joined: Sun Dec 09, 2007 4:13 pm
Location: france

Post by stefbuet »

Thank a lot for this refraction shader, really useful! :wink:
cr33
Posts: 22
Joined: Fri Mar 27, 2009 3:37 pm

Post by cr33 »

wooooooooooow!! :o
these are amazing effects!
^ just needed to show my appreciation
Cloudef
Posts: 123
Joined: Wed Dec 03, 2008 9:02 pm
Location: Finland

Post by Cloudef »

Was too lazy to compile so ran trough Wine 1.20,
Using Ubuntu Jaunty (9.04)

Image

Im impressed with the perfomance even when not running as native linux app, good work BlindSide! :wink:
When you go under the water drops, it reminds me of Bioshock, that gave me a idea... :idea:
cr33
Posts: 22
Joined: Fri Mar 27, 2009 3:37 pm

Post by cr33 »

haha... by the way, THIS burnt my graphics card... i mean i don't know if actually running the example program was the reason... but after 30 seconds( i was looking at glass dwarf) i saw green artifacts and my screen went black...
my card was GF 7600GS


now i'm too frightened to experiment with irrlicht. i think i'll learn basics first and then experiment with effects
FuzzYspo0N
Posts: 914
Joined: Fri Aug 03, 2007 12:43 pm
Location: South Africa
Contact:

Post by FuzzYspo0N »

That happens if your card overheats, which an happen for any number of reasons...
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Post by Nadro »

cr33 wrote:haha... by the way, THIS burnt my graphics card... i mean i don't know if actually running the example program was the reason... but after 30 seconds( i was looking at glass dwarf) i saw green artifacts and my screen went black...
my card was GF 7600GS


now i'm too frightened to experiment with irrlicht. i think i'll learn basics first and then experiment with effects
It wasn't cause by Irrlicht, it was Your graphic card defect...
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Yes I recently purchased a 9600GT and had to replace it for a 9800GT because of this dreaded bug: http://forums.nvidia.com/index.php?showtopic=61430

It's funny because a lot of people blamed lack of psu power, outdated drivers, etc, when in the end a 9800GT didn't even stutter once.

Anyway you might need a new card, or go easy on the overclocking. :P
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
cr33
Posts: 22
Joined: Fri Mar 27, 2009 3:37 pm

Post by cr33 »

BlindSide wrote:Yes I recently purchased a 9600GT and had to replace it for a 9800GT because of this dreaded bug: http://forums.nvidia.com/index.php?showtopic=61430

It's funny because a lot of people blamed lack of psu power, outdated drivers, etc, when in the end a 9800GT didn't even stutter once.

Anyway you might need a new card, or go easy on the overclocking. :P
i didn't overclock and my card worked fine for 2 years so i think I didn't do anything that could harm/overheat it. dunno but i updated drivers ~month before (one example of irrlicht working with newton required newest drivers) but also it seems there wasn't any negative effect - I could play e.g. bf2142 on high settings and it didn't burn.

Anyway, I still think what you did is amazing but I don't think i'll try running your demo on my new card(9600GT) :P i have no idea how these things work, maybe this was bad coincidence or i have bad luck or something... but still it's too big risk for me :o I guess i'll do it anyway, after i forget what happened to my previous card
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Watch out 9600GT does have that bug, you may want to stay clear. The brand I had was based on Palit I think, the 9600GT Sonic.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Post Reply