Iffo Posted August 2, 2016 Share Posted August 2, 2016 Hi All, Maybe a bit of an odd one. I'm looking for a way of making glass solid as in can't see through it? As if a shutter is down of some sort? In particular this glass in the windows and doors: https://jkhub.org/images/74920LR.png Can this be done through a shader? I know it will effect all glass in the game, but I'm not concerned about that. As I can just remove the updated shader pk3 from my base after I've done what I need in that office. Hope this makes sense, if not lemme know and I'll try to explain clearer! Cheers Iffo/Grav yeyo JK and Lazarus like this Link to comment
Kualan Posted August 2, 2016 Share Posted August 2, 2016 The trouble is that the source glass textures (found in assets1.pk3 -> textures -> common) are incredibly small-scale, which makes it very hard to replace them with a solid surface texture that won't look absolutely dreadful, deformed and/or stretched in-game. Lazarus likes this Link to comment
The Punisher Posted August 3, 2016 Share Posted August 3, 2016 I'm looking exactly for the same thing. I use a saber hilt with a crystal and a second hidden blade for the crystal color but i need to make it look like an almost solid (or even completely solid) crystal that still reflects the color of the second blade. Link to comment
Iffo Posted August 3, 2016 Author Share Posted August 3, 2016 @@Kualan Can these textures be made better quality if I maintain the aspect ratio? Like in skinning where things need to be to the power of 2 I believe? (so 512 x 512, 1024 x 512 etc etc)? Link to comment
Lazarus Posted August 3, 2016 Share Posted August 3, 2016 textures/common/glass { qer_editorimage textures/common/glass2.tga q3map_tesssize 48 qer_trans 0.5 surfaceparm nonopaque surfaceparm trans q3map_material Glass q3map_nolightmap { map textures/common/glass2 blendFunc GL_ZERO GL_ONE_MINUS_SRC_COLOR } { map textures/common/glass2 blendFunc GL_ONE GL_ONE tcGen environment } } This is what the glass tics, I checked the texture but it doesnt have an alpha channel, what you migth be able to do, and this is pure hypothetical, is that you simply use an alpha channel in the texture, add an alphaGen Const on it in the shader (create a new shaderfile, i would suggest, dont tear the old one appart), with the transparancy you want (varying between 1 for comepletly closed, to 0 for completely see through) and add a rgbGen wave sin to it for making the colors flow better. An instance like blendFunc GL_ONE GL_ONE alphaGen const 0.4 rgbGen wave sin 0.75 0.05 0 5 Again, this is pure hypothetical and you have to play with this. Link to comment
Iffo Posted August 3, 2016 Author Share Posted August 3, 2016 Thanks @@Lazarus. Something hypothetical is better than nothing. Now that you've identified where the glass pulls from I should be able to figure something out Thanks. Will post what I find out. Link to comment
AshuraDX Posted August 3, 2016 Share Posted August 3, 2016 but beware - the base game reuses glass shaders all the time so your changes might effect things you don't want to be changed. Link to comment
Iffo Posted August 3, 2016 Author Share Posted August 3, 2016 @@AshuraDX Cheers for pointing that out . Although I only need those windows in that room blocked out for the scene I'm doing. It won't move from that location so fingers crossed it should be fine. Then I can just pull the change out of by base. Link to comment
The Punisher Posted August 4, 2016 Share Posted August 4, 2016 textures/common/glass { qer_editorimage textures/common/glass2.tga q3map_tesssize 48 qer_trans 0.5 surfaceparm nonopaque surfaceparm trans q3map_material Glass q3map_nolightmap { map textures/common/glass2 blendFunc GL_ZERO GL_ONE_MINUS_SRC_COLOR } { map textures/common/glass2 blendFunc GL_ONE GL_ONE tcGen environment } } This is exactly the shadder I am using. It looks fine from the SP Saber selection menu but once in the game, it is barely visible. Link to comment
Lazarus Posted August 5, 2016 Share Posted August 5, 2016 This is exactly the shadder I am using. It looks fine from the SP Saber selection menu but once in the game, it is barely visible. That is the standard shader from the common shaderfile. I put down the things below on how you you may need to change it. Have you attempted to create a new shader file? This is what the glass tics, I checked the texture but it doesnt have an alpha channel, what you migth be able to do, and this is pure hypothetical, is that you simply use an alpha channel in the texture, add an alphaGen Const on it in the shader (create a new shaderfile, i would suggest, dont tear the old one appart), with the transparancy you want (varying between 1 for comepletly closed, to 0 for completely see through) and add a rgbGen wave sin to it for making the colors flow better. Asgarath83 likes this Link to comment
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