RecklessJames Posted February 24, 2018 Posted February 24, 2018 Yup that's right! Another question thread by yours truly! Today's question is...... whether or not it is possible to enable "dark" RGB colors? I don't know if there's a term for this, but basically a way to include the spectrum of RGB that produces darker colors (dark brown, black, etc). Normally for the various RGB saber mods I've seen, lowering the numbers down to a certain point doesn't make it darker but instead it changes the transparency until the glow is completely invisible. I understand this is most likely done on purpose, but regardless it also means that this isn't true RGB... in reality it is only half RGB imo. That being said... is it possible to change this? If so, would this be a bad idea? It must be possible to some extent, since I've added darker saber colors myself manually the old fashioned way in the past... and of course there's those black sabers floating around in many different mods so it must be possible based on this right? If anyone has any good input, please let me know!
AshuraDX Posted February 24, 2018 Posted February 24, 2018 have you ever seen dark brown light?A darker light color means a less intense and therefore less visible light.The saber glows are drawn onto the scene additively, which means that it basically adds the color of the pixels that shape the lightsaber glow ontop of what it has allready drawn. A dark saber core would be subtracted from the scene. SaimonJ likes this
RecklessJames Posted February 25, 2018 Author Posted February 25, 2018 Hmm, while that makes 100% perfect sense IRL... on the other hand have you ever seen black light? I haven't seen IRL, but I have seen in JK3 mods cause apparently that's perfectly fine lol! But dark blue or dark brown? Holy S**T that's just too much!! Point is, its unofficial mods for a videogame based on a non-fictional magical sci-fi movie series... I don't think that it has to be completely realistic haha!
AshuraDX Posted February 25, 2018 Posted February 25, 2018 Hmm, while that makes 100% perfect sense IRL... on the other hand have you ever seen black light? I haven't seen IRL, but I have seen in JK3 mods cause apparently that's perfectly fine lol! But dark blue or dark brown? Holy S**T that's just too much!! Point is, its unofficial mods for a videogame based on a non-fictional magical sci-fi movie series... I don't think that it has to be completely realistic haha!you can get full RGB colorable sabers. But the darker variants won't support dynamic glow.All you'd need to do is setup new pure white saber textures and put the original, desaturated saber texture into your new texture's alpha channel. Once that is done all you'd have to do is write the accompanieing shader to rely on the alpha channel instead of luminance for transparency and voila, you got full RGB sabers RecklessJames likes this
RecklessJames Posted February 26, 2018 Author Posted February 26, 2018 Ah okay that makes sense, I'll try that out. Thank you very much for the info!
RecklessJames Posted February 28, 2018 Author Posted February 28, 2018 @@AshuraDX A little unrelated to the original question of this thread but since its still RGB colors + shaders I may as well throw this here too, since I'm having a bit of trouble atm (instead of making an entirely new thread lol.) I'm also using AJL's SFX Lightsabers and I'm trying to create a 2nd selection of RGB colors, but with a black core instead of a white core. I'm very very close to succeeding after tons of trial and error with setting everything up withinthe source code and having to go back and forth with my shader file settings... atm I have this: Very close to working, except that the glow seems to disappear when over certain textures and surfaces... I have yet to figure out a proper way to fix this.The shader is setup like this: gfx/effects/sabers/black/blackrgbglow { nopicmip cull twosided { map gfx/effects/sabers/rgb_glow2.tga blendFunc GL_DST_ALPHA GL_ONE_MINUS_DST_COLOR alphagen vertex rgbGen vertex glow } } gfx/effects/sabers/black/blackrgbline { notc nopicmip cull twosided { map gfx/effects/sabers/black/black_line.tga blendFunc GL_DST_COLOR GL_ONE_MINUS_SRC_ALPHA alphagen vertex rgbGen vertex } }My ultimate goal (and related to this thread) is to have two sets of RGB blade colors; one with black core and the other with white core, both with full RGB range! (so that if you also wanted pure 100% black or pure 100% white, you can do that too) AfterI fix this issue here and also enable full RGB colors, I'll be two steps closer! Maybe a bit too ambitious for me, considering I'm still very new to coding and modding in general... but hey I'm trying to learn as I go I guess! lol Asgarath83 and TheWhitePhoenix like this
TheWhitePhoenix Posted February 28, 2018 Posted February 28, 2018 @@AshuraDX A little unrelated to the original question of this thread but since its still RGB colors + shaders I may as well throw this here too, since I'm having a bit of trouble atm (instead of making an entirely new thread lol.) I'm also using AJL's SFX Lightsabers and I'm trying to create a 2nd selection of RGB colors, but with a black core instead of a white core. I'm very very close to succeeding after tons of trial and error with setting everything up withinthe source code and having to go back and forth with my shader file settings... atm I have this: Very close to working, except that the glow seems to disappear when over certain textures and surfaces... I have yet to figure out a proper way to fix this.The shader is setup like this: gfx/effects/sabers/black/blackrgbglow { nopicmip cull twosided { map gfx/effects/sabers/rgb_glow2.tga blendFunc GL_DST_ALPHA GL_ONE_MINUS_DST_COLOR alphagen vertex rgbGen vertex glow } } gfx/effects/sabers/black/blackrgbline { notc nopicmip cull twosided { map gfx/effects/sabers/black/black_line.tga blendFunc GL_DST_COLOR GL_ONE_MINUS_SRC_ALPHA alphagen vertex rgbGen vertex } }My ultimate goal (and related to this thread) is to have two sets of RGB blade colors; one with black core and the other with white core, both with full RGB range! (so that if you also wanted pure 100% black or pure 100% white, you can do that too) AfterI fix this issue here and also enable full RGB colors, I'll be two steps closer! Maybe a bit too ambitious for me, considering I'm still very new to coding and modding in general... but hey I'm trying to learn as I go I guess! lolYou should share this with KOTF, JKA Enhanced and even MD2 Remastered. I mean, you're being very LEGENDARY here with your ambitions, so don't give up! RecklessJames likes this
RecklessJames Posted February 28, 2018 Author Posted February 28, 2018 You should share this with KOTF, JKA Enhanced and even MD2 Remastered. I mean, you're being very LEGENDARY here with your ambitions, so don't give up! Thank you very much I appreciate that! I was determined to edit aspects of the game that you normally couldn't without coding, especially cause merging aspects of my favorite mods became difficult cause you couldn't combine things like .dlls and .exes. Meaning I couldn't have my NPC limits increased mixed with the most recent OpenJK, or increased dismembering, or RGB Lightsabers, and many other things. So I simply decided to learn how to build/compile from scratch within a month lol! Rapidly I've learned alot, and I definitely want to keep pushing to see what else I'm capable of adding into the game. JKA Enhanced is actually the main source code I'm editing. I'll most likely share my edits when done! While on the subject, I even experimented with colored cores too at one point. lol TheWhitePhoenix and Penekowski like this
Droidy365 Posted February 28, 2018 Posted February 28, 2018 Very close to working, except that the glow seems to disappear when over certain textures and surfaces... I have yet to figure out a proper way to fix this.The shader is setup like this:It seems to be doing that whenever the glow goes over a patch or a model in the map. Patches are mostly used for round surfaces like you showed in your screenshots. It's also used for the water in Yavin. RecklessJames likes this
RecklessJames Posted February 28, 2018 Author Posted February 28, 2018 Yeah unfortunately I'm still relatively new when it comes to shaders. Normally I try to use this website to help me in the past but no luck so far regarding this one. At this point I've now been reduced to throwing random shader settings at it and seeing what happens, lol.... I wish there was a program or something that lets you preview exactly what certain shader settings do, instead of me having to load up the game and exit over and over which is what I've been doing so far.
AshuraDX Posted February 28, 2018 Posted February 28, 2018 Yeah unfortunately I'm still relatively new when it comes to shaders. Normally I try to use this website to help me in the past but no luck so far regarding this one. At this point I've now been reduced to throwing random shader settings at it and seeing what happens, lol.... I wish there was a program or something that lets you preview exactly what certain shader settings do, instead of me having to load up the game and exit over and over which is what I've been doing so far.There is a toold called ShaderED - it serves well as a shader viewer, allthoguh it doesn't like the "glow" parameter and removes it on loading the file. about your shader, try this: gfx/effects/sabers/black/blackrgbglow { nopicmip cull twosided { map gfx/effects/sabers/rgb_glow2.tga blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA //alphagen vertex should not be needed, I'd suspect that this will again link transparency and color rgbGen vertex glow } } gfx/effects/sabers/black/blackrgbline { notc nopicmip cull twosided { map gfx/effects/sabers/black/black_line.tga blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA //alphagen vertex should not be needed, I'd suspect that this will again link transparency and color rgbGen vertex } } I have never messed with RGB sabers from a mod so this may or may not work. but: blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA This is what I commonly use when I need soft edged alpha/transparency, so I think it might work here. RecklessJames likes this
RecklessJames Posted February 28, 2018 Author Posted February 28, 2018 I have never messed with RGB sabers from a mod so this may or may not work.I appreciate the help, but unfortunately it did not work...
AshuraDX Posted February 28, 2018 Posted February 28, 2018 I appreciate the help, but unfortunately it did not work...interesting. send me the images and your modified .exe, I'll need to mess around with this
RecklessJames Posted February 28, 2018 Author Posted February 28, 2018 interesting. send me the images and your modified .exe, I'll need to mess around with thisAh, just the .exe? Sure I'll do that... lol, but I might also need to include other files too tbh (like .dlls) along with the shaders. As I mentioned earlier, the source code I'm working on uses ASL's SFX Lightsabers... and specifically a version of JA: Enhanced by Redsaurus. For the black core to be enabled, it uses a special command "sabercrystal 1 blackrgb" to activate it, and then "sabercolor 1 a" to give it a red RGB color (but any will do). The fact that it uses a special SFX setting is most likely why I'm having trouble, haha. But if you're fine with all that, I'll PM a zip in a short moment. Meanwhile, I'll also take a look at that program you mentioned! Thanks for the info on that btw
AshuraDX Posted March 1, 2018 Posted March 1, 2018 Ah, just the .exe? Sure I'll do that... lol, but I might also need to include other files too tbh (like .dlls) along with the shaders. As I mentioned earlier, the source code I'm working on uses ASL's SFX Lightsabers... and specifically a version of JA: Enhanced by Redsaurus. For the black core to be enabled, it uses a special command "sabercrystal 1 blackrgb" to activate it, and then "sabercolor 1 a" to give it a red RGB color (but any will do). The fact that it uses a special SFX setting is most likely why I'm having trouble, haha. But if you're fine with all that, I'll PM a zip in a short moment. Meanwhile, I'll also take a look at that program you mentioned! Thanks for the info on that btwthe files you sent me just end up crashing instantly on loading up a map, I bet I'mm issing more files but I don't really feel like piecing those together from whatever code mods you bashed together into this Anyway, I did take a look at your imagefiles and I have a question: Did you want to try to achieve full RGB colorisation with no effect on transparency with these? If so your textures are setup incorrectly. When I suggested those changes to your shader, I went with the assumption that you would and suggested a blendfunc the requires an alpha channel (transparency) on your textures - which they currently don't have.
RecklessJames Posted March 2, 2018 Author Posted March 2, 2018 the files you sent me just end up crashing instantly on loading up a map, I bet I'mm issing more files but I don't really feel like piecing those together from whatever code mods you bashed together into this Anyway, I did take a look at your imagefiles and I have a question: Did you want to try to achieve full RGB colorisation with no effect on transparency with these? If so your textures are setup incorrectly. When I suggested those changes to your shader, I went with the assumption that you would and suggested a blendfunc the requires an alpha channel (transparency) on your textures - which they currently don't have. Oh wow... that's odd. I even tested mine without any other mods and I didn't have any issues like that. Sorry about that. Well I'll keep at it I guess.... thanks anyways, lol
RecklessJames Posted March 2, 2018 Author Posted March 2, 2018 Did you want to try to achieve full RGB colorisation with no effect on transparency with these? If so your textures are setup incorrectly.Oh yeah I forgot to respond to this. In relation to this, I haven't tested what you had recommended yet cause I was trying to get the other stuff to work first.
RAILBACK Posted March 7, 2018 Posted March 7, 2018 Bring up the console. It should tell you the errors. Try reversing your ALPHA? And yes ShaderED is my favorite to preview shaders.
RecklessJames Posted March 7, 2018 Author Posted March 7, 2018 @RAILBACK oh really? interesting... cause these issues are visual ones, but no errors pop up at all on the console.
AshuraDX Posted March 7, 2018 Posted March 7, 2018 Bring up the console. It should tell you the errors. Try reversing your ALPHA? And yes ShaderED is my favorite to preview shaders.No. There are no "errors" with the shader. The images @@RecklessJames uses simply lack alpha channels, which my shader suggestion depends on. The fact that these glows render behind other semi-transparent surfaces could be a depth issue, which a depthFunc may solve.
RecklessJames Posted March 8, 2018 Author Posted March 8, 2018 @AshuraDX Hmm I should try that next. Maybe I'll try converting the images to .tga so they'll have those alpha channels. Relatively easy to do... I guess I'll try that out when I get the chance and will let people know. :3
RecklessJames Posted March 10, 2018 Author Posted March 10, 2018 No. There are no "errors" with the shader. The images @@RecklessJames uses simply lack alpha channels, which my shader suggestion depends on. The fact that these glows render behind other semi-transparent surfaces could be a depth issue, which a depthFunc may solve. Okay so here's an update. I took the RGB glow texture and made it into a .tga format with an alpha channel, but it still gives issues when using the shader settings you gave me. Here is what those settings look like for that: gfx/effects/sabers/black/blackrgbglow { nopicmip notc cull twosided { map gfx/effects/sabers/black/blackrgb_glow2.tga blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA rgbGen vertex glow } }However, in this screenshot I'm holding two colors as you can see..... on the right is red RGB glow and black core, but on the left is red glow with black core (but not RGB) which is using different shader settings entirely: As you can see, I'm able to accomplish what I want if I make individual shaders for each color which has always been the case. But not when using RGB. It's really confusing... and yes, I've tried swapping the settings from the two different colors and that doesn't work either sadly. Here is the shader settings for the color on the left, just as a reference: gfx/effects/sabers/black/bredglow { nopicmip cull twosided { map gfx/effects/sabers/black/bred_glow2 blendFunc GL_ONE GL_ONE_MINUS_SRC_COLOR rgbGen vertex alphagen vertex glow } } Just for the sake of showing everything I've tried, I also went back and tried to use my previous shader settings for black core RGB: gfx/effects/sabers/black/blackrgbglow { nopicmip notc cull twosided { map gfx/effects/sabers/black/blackrgb_glow2.tga blendFunc GL_DST_ALPHA GL_ONE_MINUS_DST_COLOR rgbGen vertex alphagen vertex glow } } And this is currently the result (same issue as earlier in this thread): So that's all for now.... lol. Also, all examples featured here used the same blackcore texture and shader settings.
AshuraDX Posted March 10, 2018 Posted March 10, 2018 @@RecklessJames would you mind posting your tga textures?
RecklessJames Posted March 14, 2018 Author Posted March 14, 2018 @AshuraDX Sorry for the delay, but sure! I'll share the two glow textures included in the above examples, as well as the core texture used. Note that only the rgb texture is currently a .tga file, while the others are not. https://drive.google.com/file/d/1Dk04EIuGc2Cdj5xvBKa60ec0t4B8rd8f/view?usp=sharing
SaimonJ Posted July 9, 2019 Posted July 9, 2019 Hello! Sorry to bother you, but I need your help, I want to make a colored core for lightsaber
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