Glass in Game Engine

Hi yawll…I am quite a newbie when it comes to the game engine.
Can u guys solve this one for me.
I’m using Blender 2.49.
I have the default cube and have applied Ray Mirror and Ray Transparent to it and dropprd down the alpha ro 0.1 to give it a glassy look…Now this thing renders proprely but how can I have the same glassy look in the game engine?:eek:
Please help me guys.
-Thanx in advance.

Umm srry but ray mirror and transparent are only for render. But you could make a texture in gimp with what you consider a glassy look but mostly nothing in the background and only what you drew in the texture would show and not the background.

dont listen to arbiter 410. sounds like he never tried… http://www.tutorialsforblender3d.com/Game_Engine/Tutorials_index.html
first thing there, select which one applys to you.

You obviously don’t know what your talking about because no tutorials on there tell you how to make realistic glass in the BGE…

Please check your sites before you post them.

That tutorial proves you wrong.

if you want to make a glass look then set the specular to high ish and use an alpha map to make the corners look dirty(which also requires a colour map).

what Tutorial?!?!

Heres a pretty rubbish window i made, took me only a few mins to make the textures and set up.
http://www.pasteall.org/blend/820

The alpha tutorial

Thanx for the prompt replies guys…:slight_smile:

Hey moffboffjoe,Which tutorial r u talkin bout on this site
http://www.tutorialsforblender3d.com…als_index.html ? :confused:

Checked out the realtime mirror example dudes…its pretty cool… :smiley:
I’m guessing the transparency thing will work out fine…will give it a shot…:yes:

@Kryolite: Seems you have this pretty sorted, but the glsl alpha tutorial (Z transparency) will give you the transparent window and the realtime mirror can be applied for reflection. The mirror can be partially transparent so you can still see through the window.

If you want to get really technical, you could try to apply a fresnel shader so the reflectivity of the mirrored image depends on camera orientation to the window for more realism. This is not mundane, but there are a few examples scattered around the forums if you’re feeling ambitious or just curious. :slight_smile:

Something you could do is add a plane or whatever you want to look like glass, then get a grey picture from Gimp or Paint, then go to the UV image editor, Add your grey texture then unwrap your Plane ,in edit mode by pressing U<Unwrap , (and I would sugest GLSL Materials, but it works both ways) put the texture to your unwraped plane in the Uv image editor, Now go to the buttons window, while in edit mode, and go to the TEXTURE FACE tab, and hit ADD. That should do it, and if you want the window darker or clearerer just change the texture more black or white, and if you want to get really fancy you could have white streaks drawn on your texture, or dirt marks on the edges, over a greyish backround then you will have cooler glass. Hope this helps, heres a .blend file for you to look at.

Attachments

Glass.blend (149 KB)

@Inferno: Nice. Dirt textures and smears applied sensibly could add much to realism. :slight_smile:

@Inferno
uhhh… i created the same thing earlier in this thread but with a dirt texture(kinda).

Hey I’m pretty new to Blender GE…so umm…wuz GLSL?:stuck_out_tongue:

OpenGL Shading Language

Thanks mate…:cool:

BTW moffboffjoe…y the long face?
Any probs wid ATI card?
My onboard graphics card is ATI 1100 series…is there going to be a problem?:confused:

It depends realy, some ATi cards are OK with the BGE, but some just don’t like it at all. I think most custom GLSL scripts wont work with old ATi cards. Luckily i bought a Ati radion 4890 and as far as i know runs most of them nicely. I cant be bothered to change my little message thing, and i also don’t know what to put there.

uhhh… i created the same thing earlier in this thread but with a dirt texture(kinda).

Ok, I wasn’t reading many of the other posts, I just answered as best as I new how.
[qoute]
@Inferno: Nice. Dirt textures and smears applied sensibly could add much to realism. :slight_smile:
[/quote]
Thanks, I’m happy to know somone likes my work :slight_smile: