How does one create a glass texture for use in video games? I ask this because I am struggling to create anything that looks even mildly like glass without the use of ray tracing (which would be too slow for games).
Well the big things about “realistic” glass are transparency and reflections (a pane of glass is too thin for significant reflection effects), therefore;
*Z transparent, alpha around 0.300.
*A reflection map
(Reflection map from http://www.openfootage.net/)
You will need GSGL shaders to see it in action in realtime…
Thanks a lot, that example works fine. However, doesn’t a reflection map only provide reflections for one particular location (i.e. for stationary objects)? What if I wanted to provide reflections for an object that was animated? For example: the reflections on a car. I’m actually just asking this for curiosity’s sake as the glass I need to make will remain stationary, thus my needs are already met.
I don’t think there would be a simple way to do that… You could possibly use an animated reflection texture.
unreal tournament handled realtime reflections by using a reflection map of the scene… youd build you room, screen dump the 6 sides of the ‘cube view’ and then map those to a cube in the world. youd then assign it to the mesh needing reflections as a reflection map.
blender could do something similar with the way it handles environment maps perhaps, using a null object to ‘see’ a cube mapped reflection of the box. of set up a node material that has the reflection texture as a cube map input to the reflection? not sure, ive been playing with nodes a bit lately and so far they’ve been rather cool for things this complex
HOw do you use a reflection map in Blender? THis would be very helpful for speeding most renders!