Glass

General mapping discussions
User avatar
Reaper{DKMs}
Posts: 12
Joined: Mon Sep 26, 2011 4:33 am

Glass

Post by Reaper{DKMs} »

Okay I have been doing a ton of reserch to find a good glass shader and can't seem to find one and I am not very good with writting my own scripts unfortunately. The one I have makes the glass glow and I would like just a normal clear glass.

User avatar
Delirium
Posts: 366
Joined: Sat Aug 27, 2011 8:37 am
Location: Auckland, New Zealand

Re: Glass

Post by Delirium »

textures/reapers_map_name/glass
{
qer_editorimage textures/effects/tinfx.tga
qer_trans 0.7

surfaceparm nolightmap
surfaceparm trans
surfaceparm nodlight
surfaceparm lightfilter

nopicmip
{
map textures/effects/tinfx.tga
blendfunc blend
alphagen const 0.6
rgbGen vertex
}
}
Image

User avatar
Reaper{DKMs}
Posts: 12
Joined: Mon Sep 26, 2011 4:33 am

Re: Glass

Post by Reaper{DKMs} »

Very cool, thank you. Now when I compile and go into the game, its showing as a missing texture.
Attachments
shot0005.jpg

User avatar
Reaper{DKMs}
Posts: 12
Joined: Mon Sep 26, 2011 4:33 am

Re: Glass

Post by Reaper{DKMs} »

And as you can see, I have a white ring around the texture with a working script.
Attachments
texture.jpg

User avatar
Rayne
Site Admin
Posts: 624
Joined: Wed Aug 17, 2011 5:22 pm

Re: Glass

Post by Rayne »

Add tcGen Environment to the last stage of the shaders.
If you want the glass to be brighter, change rgbGen from vertex to identity, and if you want to reduce the visibility of the reflection change the vaule in alphaGen Const from 0.6 to a lower value, 0.2 should give a more subtle reflection.

User avatar
Reaper{DKMs}
Posts: 12
Joined: Mon Sep 26, 2011 4:33 am

Re: Glass

Post by Reaper{DKMs} »

Like I said, I'm not that great at this, but you meant like so?

textures/reapers_map_name/glass
{
qer_editorimage textures/effects/tinfx.tga
qer_trans 0.7

surfaceparm nolightmap
surfaceparm trans
surfaceparm nodlight
surfaceparm lightfilter

nopicmip
{
map textures/effects/tinfx.tga
blendfunc blend
alphagen const 0.6
rgbGen vertex
tcGen Environment
}
}

User avatar
Rayne
Site Admin
Posts: 624
Joined: Wed Aug 17, 2011 5:22 pm

Re: Glass

Post by Rayne »

yep like that

User avatar
Reaper{DKMs}
Posts: 12
Joined: Mon Sep 26, 2011 4:33 am

Re: Glass

Post by Reaper{DKMs} »

Same problem

User avatar
Reaper{DKMs}
Posts: 12
Joined: Mon Sep 26, 2011 4:33 am

Re: Glass

Post by Reaper{DKMs} »

Here is something weird. I compiled the map. Sent a copy to a clan member and he can't see some of the default textures. But he can see the glass. But I can't. Same copy. Why is this?

User avatar
Rayne
Site Admin
Posts: 624
Joined: Wed Aug 17, 2011 5:22 pm

Re: Glass

Post by Rayne »

OK I'm starting to think you and ReSnappa have the same problem. Something is messing up the shaders, you got any pk3's left in that folder?
Cause i tried that shader and it works flawlessly.

Post Reply