hi, I’m going to make some stained glass for a church. I was thinking of just getting some stained glass images and making a transparent shader for it, which i’m not sure how to do, but i can find out easily enought probably. but now i’m thiinking of making a solid framework and just having different colours of glass in that. I was just wondering whether it is easy to make glass of different colours or whether i have to go and make a load of shaders for it. Any suggestions much appreciated. cheerz
A question on stained glass
You would probably have to make more shaders for it, but it shouldn’t be too hard considering that you would only be changing the colors.
i can’t actually find a glass shader to refer to, can anyone point me to one in the main pak0.pk3 tree
The shader in the next post is much more helpful than the gibberish I posted earlier.
Here’s a lightfilter shader, I can’t find the original tut on it. (it’s in German)
textures/staines/staines //Name der Textur
{
qer_editorimage textures/staines/staines.tga //Name der Datei die im Radianten gezeigt wird
surfaceparm trans //Was hinter der Textur ist, wird berechnet
cull none // Textur kann von beiden Seiten gesehen werden
surfaceparm lightfilter // Unser Projektionsparamter
qer_trans 1.5 // Wie stark die Textur im Radianten durchsichtig ist
{
map textures/staines/staines.tga // Unsere Scheibentextur
blendfunc gl_dst_color gl_zero
}
}
You can change the transparency of it, maybe make it func_explosive too.
I can’t find the texture that goes with it, but here’s one from another tutorial. I am fairly sure it’s made by Fiesling.
http://www.zen23322.zen.co.uk/images/scheibe.zip
It makes a nice effect, it ‘filters’ the light going through the texture, projecting coloured shadows.
I wouldn’t make a lightfilter a func_explosive. Since the lightfilter effect gets baked into the lightmap, it would be pretty weird for the player to destroy the window, but still have the colorful shadows on the floor.
I’m having a couple of problems with my stained glass. here is my shader, pretty much the same as the one above
textures/sg/sgface
{
qer_editorimage textures/sg/sgface.tga
surfaceparm trans
cull none
surfaceparm lightfilter
qer_trans 5.5
{
map textures/sg/sgface.tga
blendfunc gl_dst_color gl_zero
}
}
The qer_trans value stands at 5.5, but I have tried it at many many values, and i still can’t get it to look transparent or cast a coloured shadow like it should. Could it be somehting to do with the fact that i made absolutely everything but the skybox detail. There is not even a hint of transparency or lightfilterage
file:/root/.etwolf/etmain/screenshots/2001-12-15-005309-testchurch.jpg
file:/root/.etwolf/etmain/screenshots/2001-12-15-005244-testchurch.jpg
dunno if these pics will work or not. It’s my first shader so i was quite happy to actually have it working as a straight texture. any help appreciated. I’ve also decided to go for making my own stained glass with an iron frame and coloured transparent sections in addition to the other method, any clues on how this would be achievable, is there any way to change it’s colour in the shader?
