Simulating Windows with Refraction

Some months ago I was approached by the Berlin-based Window-Manufacturing-Company “ISOGON” to help them program an app that let’s you configure orders for new windows (In case you want to build a house or modernize your current windows to waist less energy). Get it for free on the app-store.

So, for people mostly interested in 3D-Gems, I did some shader-programming in this app.

We were able to scan our structured windows so I could get some 3D-Meshes of those. Then I had a look into OpenGL ES 2.0 Shader-Programming and the “refract(vec3, vec3, float)” function to calculate the refraction of the scanned surface.

Later I just had to set the iPhone’s Camera Video Images as the current background texture and the result looks like this:

And the corresponding undistorted picture (featuring my beautiful Hagström Super Swede 😉 )

If you guys are interested in the technical details I highly recommend PowerVR’s OpenGL programming SDK. They have some tutorials on how to program Shaders, and a C++-framework to import Blender-exports into your iOS project that were really helpful to me.

2 Responses to “Simulating Windows with Refraction”

  1. Hi, I have been googling everywhere for a good OpenGL refract example. Would you mind sharing some code example?


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: