RebelChum Posted April 21, 2014 Posted April 21, 2014 Seems I've tried a dozen different variations to try and make a colored .tga design look like a stained glass window. I've tried mapping in a Tcgen environment, mapping in a reflective glass. Even tried making the colored texture transparent and putting a pane of base glass behind it. The best I've come up with is a surface light shader but then it just looks like a glowing wall rather than a window with light coming from behind it. Any ideas? Best iteration so far: textures/the_enclave/stglass{q3map_material Glasssurfaceparm nonopaquesurfaceparm transsurfaceparm alphashadowcull twosidedqer_trans 1.0 { map textures/the_enclave/stglass alphaFunc GE128 blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA depthWrite } { map $lightmap rgbGen identity blendFunc GL_DST_COLOR GL_ZERO depthFunc equal } { map textures/the_enclave/stglass blendFunc GL_ONE GL_ONErgbGen identityglow }} Just looks like a glowing wall. Is this the best I can hope for with the engine?
Solution MoonDog Posted April 21, 2014 Solution Posted April 21, 2014 surfaceparm lightfilter Causes the Q3Map2 light stage to use the texture's RGB and alpha channels to generate colored alpha shadows in the lightmap. For example, this can be used to create the colored light effect cast by stained glass windows. This can be used with surfaceparm alphashadow.
RebelChum Posted April 21, 2014 Author Posted April 21, 2014 surfaceparm lightfilterCauses the Q3Map2 light stage to use the texture's RGB and alpha channels to generate colored alpha shadows in the lightmap. For example, this can be used to create the colored light effect cast by stained glass windows. This can be used with surfaceparm alphashadow. So far as I can tell that didn't change anything. I even removed alphashadow to see if it was conflicted at all. Current .shader settings textures/the_enclave/stglass{q3map_material Glasssurfaceparm nonopaquesurfaceparm transsurfaceparm lightfiltercull twosidedqer_trans 1.0 { map textures/the_enclave/stglass alphaFunc GE128 blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA depthWrite } { map $lightmap rgbGen identity blendFunc GL_DST_COLOR GL_ZERO depthFunc equal } { map textures/the_enclave/stglass blendFunc GL_ONE GL_ONErgbGen identityglow }}
MoonDog Posted April 21, 2014 Posted April 21, 2014 Much like a shadow casting grate, you'll need a lightsource behind the material pointing in the desired direction. Is your source material setup properly for transparency? I imagine it'd have to be for lightFilter. I've never used lightFilter tbh. RebelChum likes this
RebelChum Posted April 21, 2014 Author Posted April 21, 2014 Thanks for all your help, moondog. I think it's fine the way it is. I coupled it with some nice entity lights and decals and it looks fairly convincing. Appreciate your help!
MoonDog Posted April 22, 2014 Posted April 22, 2014 No problem! I wouldn't mind seeing a shot or two of your results. I've never used lightFilter, curious to see how it turns out.
RebelChum Posted April 22, 2014 Author Posted April 22, 2014 No problem! I wouldn't mind seeing a shot or two of your results. I've never used lightFilter, curious to see how it turns out. Not sure if I should keep the light ray in there. RAILBACK likes this
RAILBACK Posted April 22, 2014 Posted April 22, 2014 Have you tried using ShaderED? I find it helps sometimes.
RebelChum Posted April 22, 2014 Author Posted April 22, 2014 Have you tried using ShaderED? I find it helps sometimes. Never heard of it/seen it.
MoonDog Posted April 22, 2014 Posted April 22, 2014 Never heard of it/seen it. It's a deprecated shader preview utility, that is supremely out of date.
RAILBACK Posted April 23, 2014 Posted April 23, 2014 ShaderED should be in your tools folder with the JK editing tools and/or Radiant 1.4 or 1.5 etc.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now