• Advertisement
  • entries
    3
  • comments
    3
  • views
    36126

Glass Window Container

Sign in to follow this  

1278 views

[size="3"][font="Calibri"]When I was playing Portal 2 I was intrigued by the light window containers in the game.

lightbox.png[/font]


[font="Calibri"][size="3"][color="#0000ff"]
[/color][/font]
[font="Calibri"][size="3"](not my video)

So I made a shader in Rendermonkey to recreate the principle of this effect (See attachment light_glass_container.zip!).

lightboxxieie.png[/font]


[font="Calibri"][size="3"]Basically it is just simple Parallax mapping + texture coordinate distortion to simulate the refraction.
[size="3"]I still need to do some tinkering to have the same results but the basic idea [size="3"]is there[size="3"][font="Calibri"].[/font] (I haven't figured out how they blend the texture colors inside the shader yet, I quickly made up my refraction distortion up etc.)

Interesting resources:
[size="3"][color="#0000ff"]http://www.valvesoftware.com/publications/2004/GDC2004_Half-Life2_Shading.pdf[/color] [size="3"]page 91 about the refraction shader that Half-Life 2 uses.

[font="Times New Roman"][size="3"][font="Calibri"][size="3"][color="#0000ff"]http://snarf-life-2.googlecode.com/svn/trunk/src/materialsystem/stdshaders/SDK_Refract_ps20.fxc[/color][/font]

[size="3"]* The media in the attachment contains only programmer art and media from the examples of rendermonkey.
* [font="Calibri"][size="3"]Theresources of the real material in Portal 2 can be found in the main *.VPK:
[/font][font="Calibri"][size="3"]materials\glass\glasswindow_refract01.vmt
[/font][font="Calibri"][size="3"]materials\glass\refract_light_color.vtf
[size="3"]materials\glass\refract_light_normal.vtf [/font][/font]
[/font]
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement