rgoer Posted July 7, 2003 Share Posted July 7, 2003 Ok, ok, this is a real pain in the ass. I've got a four-step shader and it just isn't working out the way I predicted. Here are two shots of it in-game, illustrating the problem: shot 1 and shot 2 See how, in the second shot, the "words" start getting alpha-added again over the "back" of the bottom? Here's my shader code: textures/roger/round_ad { surfaceparm nomarks surfaceparm nonsolid q3map_nolightmap q3map_onlyvertexlighting cull disable { map textures/roger/round_ad blendFunc GL_ONE GL_ONE tcMod scroll 0.3 0 } { map textures/roger/text_1 blendFunc GL_ONE GL_ONE tcMod scroll 0 -0.1 } { map textures/roger/text_1_alpha blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA detail } } and here is a shot that shows what the various images for the different steps are. Can anybody tell me what I need to do to fix this shader? Link to comment Share on other sites More sharing options...
Lil Killa Posted July 7, 2003 Share Posted July 7, 2003 I might be wrong but I don't think there is a way to fix this. The grates have that same problem that your shader is having if they are on top of each other. I would suggest putting in a cylinder that is covered in black on the inside but then again you loose that "transparent" effect . I have had the same problem with some of my shaders before too and it sucks...... maybe Leslie knows some shader stuff:D all we need now is for him to see your helpless pless for help;) Link to comment Share on other sites More sharing options...
Leslie Judge Posted July 7, 2003 Share Posted July 7, 2003 map maker 101 is right in a way. But if you take a look at LDJ's original of DOTF there the beams in the reactor have four transparent layers and they are correct. As I'm at work now I can't try things out, but there is a thing I can suggest. Why do you have the text itself and the alpha in separate textures? I think you could give the text_1_alpha's alpha channel to text_1 itself and leave out the 3rd stage like: textures/roger/round_ad { surfaceparm nomarks surfaceparm nonsolid [b]surfaceparm trans[/b] q3map_nolightmap q3map_onlyvertexlighting cull disable { map textures/roger/round_ad blendFunc GL_ONE GL_ONE tcMod scroll 0.3 0 } { map textures/roger/text_1 [b]blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA[/b] tcMod scroll 0 -0.1 } } I added surfaceparm trans too to be sure that it is transparent. At home I'll try to do these because I'm not quite sure I'm right about the 2-stages-only solution if I'll not forget. Link to comment Share on other sites More sharing options...
rgoer Posted July 7, 2003 Author Share Posted July 7, 2003 The reason for the alpha being separate is this: the "words" texture is 2048 pixels tall and it tcMod scrolls vertically. However, I want the "words" to fade away as they fall down, so I needed an alpha map that was separate from the image. The alpha map is only 512 pixels tall. Am I making sense? Link to comment Share on other sites More sharing options...
wedge2211 Posted July 7, 2003 Share Posted July 7, 2003 Do you have two cylinders there? You only need one (doesn't matter which way the matrix faces) if you use the keyword cull disable. But you probably already knew that. LJ knows a bit more about shaders and alphas than I do... Link to comment Share on other sites More sharing options...
rgoer Posted July 7, 2003 Author Share Posted July 7, 2003 nope, just the one cylinder. I think I'm going to have to just give up on this effect... here is a .pk3 of a little test map that shows off, sort-of, the effect I was trying to get. You also can see the error. Maybe if you devmap the map you'll have a better idea of what I'm trying to do, and maybe somebody will know if it's fixable? Link to comment Share on other sites More sharing options...
Leslie Judge Posted July 10, 2003 Share Posted July 10, 2003 Originally posted by rgoer The reason for the alpha being separate is this: the "words" texture is 2048 pixels tall and it tcMod scrolls vertically. However, I want the "words" to fade away as they fall down, so I needed an alpha map that was separate from the image. The alpha map is only 512 pixels tall. Am I making sense? Hehh, sorry, I wasn't able to get online since my last post. And of course I didn't recognize that the words scroll vertically. Again: if I'll have time at home today I'll play with it a little to see if I can find out something. Link to comment Share on other sites More sharing options...
lauser Posted July 12, 2003 Share Posted July 12, 2003 Bah!! I'm just trying to get the silly shader to work period!! All I get is a solid brush when I play the map. I made the shader file and stuck it in the shader folder. The shader I made is the forcefield from doomgiver. All I did was change the color of it. Any help would be greatly appreciated. Should I try doing a devmap or? Link to comment Share on other sites More sharing options...
rgoer Posted July 12, 2003 Author Share Posted July 12, 2003 Ging, until you pak your stuff up into a .pk3, you have to make sure you "set sv_pure 0" before you "devmap <yourmap>" Link to comment Share on other sites More sharing options...
lauser Posted July 12, 2003 Share Posted July 12, 2003 Yes I know that I was just checking thanks buddy!! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.