Hi.
I'm trying to make a shader that makes the texture below transparent in the black parts.
I've seen it done in Quake 3 and thought I would experiment, but my script attempts were not working.
Thanks.
I took this shader from imperial.shader, it should do what you need:
lets assume your texture is called "grate" and is in a folder called "mymap" which is in the textures folder
textures/mymap/grate { surfaceparm nonopaque surfaceparm trans q3map_material HollowMetal q3map_nolightmap q3map_onlyvertexlighting cull twosided { map textures/mymap/grate alphaFunc GE128 blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA depthWrite } }
That should make the black transparent, make it sound like metal when you walk on it, and render it two sided. I didnt have time to test it so im not 100% sure but its a start.
What part of that shader makes the texture sound like metal? How does a shader even do that?
i believe its the line:
q3map_material HollowMetal
Which makes it so when you walk on it it makes a metal sound.
Thanks, I'll try it in a bit.
Hmmm, I did something wrong.
The console says that it can't find the texture in the shader.
I checked the paths and everything is fine in the editor.
Fixed the path problem but I can't see through the texture. Maybe because it's jpg?
All the textures I have that have transparency (in game) are either .PNG or .TGA files. Then again, this shader isn't the one I use, so I'm not sure whether or not the filetype even matters. Paste your shader file here, so we can have a look at it.
And thanks Cloudfint, obviously didn't read through it well enough the first time :P
I just used the one above. I might also mentions I'm using Quake 3 and not JKA, but their engines are pretty much the same so the script should work either way. I have JKA still but I'm experimenting.
Something about an Alpha Layer. I think. You need to make one in GIMP and make the bits you want invisible black.
- 1
- 2