Joe_18 Posted June 5, 2002 Share Posted June 5, 2002 I'm trying to make a japaness style paper light. But.. i need to make a texture that is colored but will also let the light through. anyone help me with this? i tried to change the color of glass but that didn't work. Link to comment Share on other sites More sharing options...
Grudge Posted June 5, 2002 Share Posted June 5, 2002 Hmm, I have been curious about that too. If you only want to let the light of the lightsource through, then you should just use the 'surfaceparm trans' in your shader. If you want the light to be colored by the glass it's shining through it gets a lot more complicated. For starters; I do not think it's possible in JKII (at least, I havent found a way to do it yet). You can do it in Q3 though, if you use ydnars q3map2 compiler. In Quake III Arena using q3map2: In Jedi Knight II using sof2map: As you see, it doesn't work in JKII. There is a way to do it with the old q3map though, if you're using 'vlight'. But I don't think vlight is in sof2map. Does anyone know? So for you, it's probably easier to just use an ordinary colored light and ordinary glass. There is a possibility perhaps to compile the map without entities with q3map2, and then to do an onlyEnts compile with sof2map, but I have no idea if that works. It's probably not worth the trouble. If you want to know how the shader could look for q3map2, here it is (alphaglass.tga is just an ordinary plain jpg filled with just the color you want): textures/grudge/alphaglass3 { qer_editorimage textures/grudge/alphaglass.tga qer_trans 0.40 surfaceparm lightfilter surfaceparm trans surfaceparm playerclip q3map_nolightmap { map textures/grudge/alphaglass.tga blendFunc GL_DST_COLOR GL_ZERO } } Well, that was a long answer to a simple question... // Grudge Link to comment Share on other sites More sharing options...
Joe_18 Posted June 6, 2002 Author Share Posted June 6, 2002 ok i figured out the basics. can you give the the script command i need to put in to just make light pass through what ever texture it is. i need it for jk2 though not quake. Link to comment Share on other sites More sharing options...
Grudge Posted June 6, 2002 Share Posted June 6, 2002 Yeah sure. The key here is surfaceparm trans. Applied to any shader it will always let light through. If you also want to see through the material use a blendFunc GL_DST_COLOR GL_ZERO stage for example. It will add the color or the texture you're blending to the background. This is an example for JKII: textures/grudge/alphaglass { qer_editorimage textures/grudge/grudgeglass.tga qer_trans 0.40 surfaceparm noimpact surfaceparm nomarks surfaceparm trans surfaceparm playerclip q3map_nolightmap { map textures/grudge/grudgeglass blendFunc GL_DST_COLOR GL_ZERO } } You can use any texture to blend with. If you use just a plain color, it will look like ordinary tinted glass (it won't "shine" like glass though - you'll need another blendFunc stage for that). I used this texture for example: Hope that helps. // Grudge Link to comment Share on other sites More sharing options...
Joe_18 Posted June 6, 2002 Author Share Posted June 6, 2002 i'm doing something dumb and i can't tell what it is. i have "grudgeglass.jpg" in the folder base\textures\joe1 now for the script i made a new txt document and copied what you said for the script and put it in there and changed it to this textures/joe1/alphaglass { qer_editorimage textures/joe1/grudgeglass.tga qer_trans 0.40 surfaceparm noimpact surfaceparm nomarks surfaceparm trans surfaceparm playerclip q3map_nolightmap { map textures/joe1/grudgeglass } } i then put that txt in the shaders dir AND then when that didn't work the scripts dir. i have added both joe1 AND grudgeglass to the shaderlist.txt and all i get in radiant is the texture grudgeglass and no shader. *sigh* man this is getting old. thanks for you help though no one else knows what i'm talking about. am i missing something to make it read it as a shader file and not a txt? i can't figure out a way to change it. Link to comment Share on other sites More sharing options...
Grudge Posted June 6, 2002 Share Posted June 6, 2002 Hmm... let's see. What's the name of the shader script? "joe1.shader" should be a correct name. It should be placed in the base\shaders dir. You have added the line "joe1" to the shaderlist.txt, right? Does it show in the textures menu in Radiant when you have the "Shaderlist only" option checked? (Sometimes there also has to be an empty row at the bottom of the shaderlist.txt file. Check that that is the case). "grudgeglass" should not be added to the shaderlist.txt. You only have to add the name of the shader script file (minus the .shader extension). Always do "Textures >> Flush and reload shaders" in Radiant when you have done something with a shader file or the "shaderlist.txt" file btw. If everything is set up like above it should work, if not I don't really know what the problem could be. And you need the "blendFunc GL_DST_COLOR GL_ZERO" line in your shader if you want it to be transparent (but maybe you don't want that?). // Grudge Link to comment Share on other sites More sharing options...
Joe_18 Posted June 6, 2002 Author Share Posted June 6, 2002 radiant is giving me this error: Unable to read shaderfile shaders/joe1.shader this is a screen shot of what i have http://members.truepath.com/yoffeed/Joe1.jpg i've done everything you have said and it still isn't working. i only added grudgeglass as a shot in the dark. i did put in the blank line but it didn't change anything. btw this is what i'm trying to make: http://www.garden-gifts.com/party_lanterns.htm again thanks for being patient with me. i've tried everything i can think of and none of the tutorials i have red have helped either. Link to comment Share on other sites More sharing options...
Grudge Posted June 7, 2002 Share Posted June 7, 2002 That's really strange. I can't understand why it's not working... Hmm, I see that you're not displaying the file extensions in Windows Explorer. Go to the "Tools >> Folder Options" dialogue in Windows Explorer, and uncheck the box "Hide file extensions for known file types" under the "View" tab. Sometimes Windows adds .txt after a text file that you create, so that it's "joe1.shader.txt". That is possybly the problem. If so, just remove the ".txt" in the file name. // Grudge Link to comment Share on other sites More sharing options...
Joe_18 Posted June 8, 2002 Author Share Posted June 8, 2002 http://members.truepath.com/yoffeed/shot0014.jpg you were correct grudge. you have earned a place in my "thanks to" read mes for life all my created shaders are now working. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.