Glass Refraction Demo

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
sio2
Competition winner
Posts: 1003
Joined: Thu Sep 21, 2006 5:33 pm
Location: UK

Glass Refraction Demo

Post by sio2 »

I've posted a demo of dynamic glass refraction on my website: http://sio2.g0dsoft.com

Image

From the Readme:
Glass Refraction Demo for Irrlicht 3D Engine
===============================================

sio2 'at' users.sourceforge.net

This is a demo of realtime dynamic glass refraction.
The scene - minus any refraction geometry - is rendered into an Irrlicht-managed rendertarget. When rendering the refraction geometry an HLSL shader takes the rendertarget, refraction texture, diffuse texture and calculates the per-pixel refraction.

Usage
=====
WASD keys or arrow (cursor) keys to move camera.
Alt-F4 or Escape key to exit.
Space - Move refracting window to just infront of the camera's current position.

Requirements
============
Drivers:
Latest DirectX 9.0b drivers [www.microsoft.com/directx],
Latest DirectX9 drivers for your graphics hardware [from your HW vendor].

Graphics hardware with:
Vertex Shader 2.0 support, or better
Pixel Shader 2.0 support, or better.

Notes
=====
1. This demo may require the Visual Studio 2005 Redistributable Files installed on your machine. These can be obtained from http://www.sio2.g0dsoft.com in the "Misc" section in "Downloads".

2. The background scene is the PerPixelLighting sample from the Irrlicht SDK. Since the refraction shader requires PS2.0, the PerPixelLighting scene is fixed to use the best normal mapping (parallax normal mapping).

3. This Irrlicht build is based on Irrlicht Subversion revision 467.

Credits
=======
1. The base scene for this demo is the PerPixelLighting sample from the Irrlicht SDK.
2. The stained-glass window texture and bumpmap are from the ATI Treasure Chest demo.
3. The HLSL refraction shader was written by myself (SiO2).
RapchikProgrammer
Posts: 279
Joined: Fri Dec 24, 2004 6:37 pm

Post by RapchikProgrammer »

Awesome stuff sio2! Its gr8 to see you releasing such eye candy for irrlicht, irrlicht really does need em!
Midnight
Posts: 1772
Joined: Fri Jul 02, 2004 2:37 pm
Location: Wonderland

Post by Midnight »

that is awsome stuff man keep it up 8)
JPulham
Posts: 320
Joined: Sat Nov 19, 2005 12:06 pm

Post by JPulham »

SWEET! :shock:
that web page is possibly THE best Irrlicht page about at the moment! :D
pushpork
belfegor
Posts: 383
Joined: Mon Sep 18, 2006 7:22 pm
Location: Serbia

Post by belfegor »

Are you going to release the source?
Small FPS demo made using Irrlicht&NewtonDEMO
InfoHERE
Its at very early stage but i think im crazy enough to finish it all alone.
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

cool effect :)
I guess refraction would also look on a particle system to create a heat wave effect
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

OMG Sio! :shock: :shock: :shock:
Will it run on a 486? :wink:

EDIT:superb fine work! :D Had 3 more examples to catch up.
sio2
Competition winner
Posts: 1003
Joined: Thu Sep 21, 2006 5:33 pm
Location: UK

Post by sio2 »

afecelis wrote:OMG Sio! :shock: :shock: :shock:
Will it run on a 486? :wink:
Yes, of course! You'll need to overclock it though. :twisted:

I originally used your "giroom" b3d mesh for the background scene, but it didn't have enough "noise" - the flat grey walls didn't give much of a distortion effect. So I switched to the PerPixelLighting room.

I also had three "windows": stained glass; an embossed Irrlicht logo (a bumpy logo I threw together); and a heat-haze effect. I couldn't fit them nicely in the PerPixelLighting room so I just went with stained glass. Then I added the ability to move the glass around with the space bar.

I may go back to the "three window" demo sometime. It's neat seeing them interact with each other; Irrlicht sees them as standard transparent primitives. They all share a single rendertarget which makes it cheap to render more than one - cheaper than if they all needed their own rendertarget, anyway. :wink:
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Haha this is too much good stuff in a very short amount of time sio2. I wish we can organize all of this quickly so we can all start using it in our projects :D Would you mind sticking some example code in code snippets if you are planning on releasing the code that is? (If you are not that I would like to hear about the project you will be using it in, because it must look stunning by now 8) )
Virion
Competition winner
Posts: 2148
Joined: Mon Dec 18, 2006 5:04 am

Post by Virion »

my only get 13-14fps >_<"
my card is Nvidia fx5200 :oops:
hope to get a better graphic card lol
Julian
Posts: 5
Joined: Sun Feb 04, 2007 1:22 am
Location: Holland

Post by Julian »

nice sio2 :)
noreg
Posts: 158
Joined: Fri Jun 23, 2006 6:01 pm
Location: continental europe

Post by noreg »

nice. could you mark on your website where there is source included and where not? Much better for people on dial-up.
sio2
Competition winner
Posts: 1003
Joined: Thu Sep 21, 2006 5:33 pm
Location: UK

Post by sio2 »

noreg wrote:nice. could you mark on your website where there is source included and where not? Much better for people on dial-up.
Every demo that has source code is clearly marked "Source code included" in the description on the Download page.
noreg
Posts: 158
Joined: Fri Jun 23, 2006 6:01 pm
Location: continental europe

Post by noreg »

Thanks for answering my rant. You are right, i have even seen that. The reason why i am ranting is, that i am such a bad programmer that i have to rely to a certain amount on sourcecode supplied from others more gifted. You simply did not mark the examples with no source code as such and i (evil-minded like @ssholes are) picked that up. Nevertheless, your work is remarkable.
Hope you don't get my drunk writing in the wrong throat, mate. :P
cypher543
Posts: 78
Joined: Sat Apr 15, 2006 5:24 pm
Location: Missouri, USA
Contact:

Post by cypher543 »

That is amazing! Now all it needs are light beams that pass through the glass and it'll be just like something from The Elder Scrolls: Oblivion! :D
Post Reply