Welcome to CMM

We've created a Custom Map Makers Discord channel, if you'd like to join us on the CMM Discord Channel, click here

Glass

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

Glass

Postby Reaper{DKMs} » Mon Sep 26, 2011 10:00 pm

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

Postby Delirium » Tue Sep 27, 2011 3:04 am

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

Postby Reaper{DKMs} » Wed Sep 28, 2011 11:19 pm

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

Postby Reaper{DKMs} » Thu Sep 29, 2011 3:18 am

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

Postby Rayne » Thu Sep 29, 2011 5:00 am

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

Postby Reaper{DKMs} » Thu Sep 29, 2011 9:11 pm

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

Postby Rayne » Thu Sep 29, 2011 9:27 pm

yep like that

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

Re: Glass

Postby Reaper{DKMs} » Thu Sep 29, 2011 11:50 pm

Same problem

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

Re: Glass

Postby Reaper{DKMs} » Fri Sep 30, 2011 4:01 am

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

Postby Rayne » Fri Sep 30, 2011 4:39 am

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.


Return to “Mapping Discussions”

Who is online

Users browsing this forum: No registered users and 2 guests