Crazy34 67 Posted April 16, 2020 Hi all, hope you are all healthy and safe in this crazy times. The lightsaber blades in Kotor really don't look that well in my opinion. The model is basicly planes with textures and the texture are taken from the top , such that you don't have full control over the final blades shape. @Sithspecter allready has new blades in his crossguard saber mod which I really like. Great work man! I am planning to update the blades myself. Before I start I have some question for the real experts out here. Do we have the shaders to change the planes into 3d zylinders? Asking since I did no follow the MdlEdit and shader news. Could we split the blade model and the hilt model bei using hooks, like some heads are split from the body meshes? So if yes how would we do that? I guess add hooks and then compile both against a new supermodel containing the animations? I think this would really help for future lighsaber blade moding. I appreciate any tips you can give me. Thank you! Quote Share this post Link to post Share on other sites
Crazy34 67 Posted April 19, 2020 The first stage is complete. The lightsaber blades have ambient light now, see pictures below. I played around with the way to animate it and I ended up to change the light radius for turning the blade on and off. Works like a charm. The ambient light color is set in the controllers, color in RGB in %. Since MDLEdit (Thanks allot this makes modeling so much easier) wonderfully compiles ASCII I can create all colors in no time. I also fixed an issue with changing the module. First the light was draw, although the blade was off. This bug I could fix by setting the radius in the geometry part of 0.0 and only make it non 0.0 in the animation part of the ASCII file. As a remark I got zero hits on FPS side. What do you think? Should I increase the radius even more? Should I increase the multiplier to make it brighter? Any suggestions? My final goal is to release this as a modders resource such that old lightsaber mods can be updated or new can use the new blades directly. Therefore, I would personally like to have the blade model separated from the lightsaber model itself. 3 1 Quote Share this post Link to post Share on other sites
DarthVarkor 384 Posted April 19, 2020 This looks great, it's something I long wondered if was possible. (Finally, I can re-create Vader's hallway scene with the lightsaber light up inside KOTOR!), I'd say personally maybe make the red blade a little brighter in dark areas. If you look at the screenshot from Rogue One, the glow of the blade really does light him and walls up quite a bit. But, that is also from a 2016 film with professional colour grading, versus a 2004 game that you're somewhat limited with what you can do with the in-game lighting. Either way, keep up the great work! 1 Quote Share this post Link to post Share on other sites
Crazy34 67 Posted April 19, 2020 Thank you very much. Quick question would you increase the area (radius of the light) so more of the room is luminated or the brightness itself? When I increase the area the brightness close to the lightsource is also increasd. Quote Share this post Link to post Share on other sites
Stormie97 253 Posted April 19, 2020 25 minutes ago, Crazy34 said: Thank you very much. Quick question would you increase the area (radius of the light) so more of the room is luminated or the brightness itself? When I increase the area the brightness close to the lightsource is also increasd. Well I'd say it's a matter of playing around with both values until it looks just right. Have you managed to make the blades actual 3d cylinders? 1 Quote Share this post Link to post Share on other sites
Crazy34 67 Posted April 19, 2020 So double blade works as well. Here both blades have their own light source such that one could in principle use a two colored double blade lightsaber. @DarthVarkor When I created the screenshoots I had the sceen from R1 in mind. Thats the reason I equiped Vaders armor. I will play around with the values, but keep in mind that the R1 corridor is tiny and therefore the lights bounds around more and seems brighter than it really is. @Stormie97 Not really one could use the emitter gas for the glow but I did not tryed that yet. The question is does this look better (and perform as well) as a updated versions of the 2 planes with a better UV layout? 4 Quote Share this post Link to post Share on other sites
DarthVarkor 384 Posted April 19, 2020 I pretty much agree with Stormie97, the saber itself should be the brightest obviously, as it's the source of the light emitting, and the glow on the environments could also possibly be a bit brighter to reflect it, guess it's just a matter of playing around with the two to find the right combo. But your second screenshot of the blue saber looks really good. Afraid I can't be much more help, module lighting stuff is outside my knowledge, but this is looking great, keep at it! 1 Quote Share this post Link to post Share on other sites
Crazy34 67 Posted April 19, 2020 (edited) So just to prove the concept I attached picture of a two colored double bladed saber. They are in generel brighter since they have two light sources. I can only say that a lightsaber throw with ambient light looks 1000 times better. I tried to caputre it on the pictures. Updated vader picture with different values. But why just speek about it. If you want to try it out. I also attached a test version of the standard red lightsaber of Kotor II. Have fun with it and I hope for feedback and maybe help with texturing (animating) lightsaber blades in the future. Test Ambient Light Lightsaber v1.rar Edited April 19, 2020 by Crazy34 Update picture and File 2 2 Quote Share this post Link to post Share on other sites
Kexikus 995 Posted April 19, 2020 This looks amazing! Looking forward to playing with these sabers. Quote Share this post Link to post Share on other sites
Stormie97 253 Posted April 19, 2020 Can confirm it works great. Spoiler 1 Quote Share this post Link to post Share on other sites
DarthVarkor 384 Posted April 19, 2020 Agreed, excellent work! 1 Quote Share this post Link to post Share on other sites
Crazy34 67 Posted April 19, 2020 Are you happy with the light brightness and the range? I had to balance the optic in daylight spots like dantooine and onderon against the harbinger and Malachor. I played around with the color for a bit and the color you have on the test saber is r 1.0 g 0.0 b 0.0 . More saturated colors tend to look better. I guess next step is to try to replace the damn blade itself. Quote Share this post Link to post Share on other sites
DarthVarkor 384 Posted April 19, 2020 I would say so personally, yeah. The blade reflects light really well in the darker environments like the Harbinger without being a literal flashlight, and the glow is still visible enough in the well lit areas. I think you've pretty much got the settings sorted. 1 Quote Share this post Link to post Share on other sites
Stormie97 253 Posted April 19, 2020 37 minutes ago, DarthVarkor said: I would say so personally, yeah. The blade reflects light really well in the darker environments like the Harbinger without being a literal flashlight, and the glow is still visible enough in the well lit areas. I think you've pretty much got the settings sorted. Agreed, the settings are pretty much spot on. 1 Quote Share this post Link to post Share on other sites
Jorak Uln 458 Posted April 19, 2020 3 hours ago, Crazy34 said: Are you happy with the light brightness and the range? I had to balance the optic in daylight spots like dantooine and onderon against the harbinger and Malachor. I played around with the color for a bit and the color you have on the test saber is r 1.0 g 0.0 b 0.0 . More saturated colors tend to look better. I guess next step is to try to replace the damn blade itself. first of all, congratz to the fantastic mod, didnt knew it was possible btw! In polished state it will be a must have addition to the game! Tested your blade tex, it looks very good in dark areas, but in daylight it somehow reacts with different intensity to the textures - apparently at those tex with more red color the blade shimmer ist most intense, and on white surfaces you dont see the shine that much though: is there any way to correct it? (probably mix other colors to it, so that the shine still appears red, but reacts to any kind of environment?) That said, amazing work so far, keep it up! 1 Quote Share this post Link to post Share on other sites
Crazy34 67 Posted April 20, 2020 @Jorak Uln I started this project to bridge time until you finish your movie texture pack which is awesome. I tested your findings myself and I get similar results. I don't know what the problem is. At some spot on Malachor for instance I don't get ambient light at all. My guess is that it has to do with the lightmap and that the lights only amplified and colors the original light in the lightmap? Atleast for the module area I have no clue how what works. The player models seem to be consistent. I wonder how many different lightsabers in the same scene work and one still gets all the different colors. I attached a v2 with the lightsabers blue red green yellow. I would appreciate if anyone could test it and give me feedback on how the light interacts if multiple lightsabers are involved. As Jorak Uln pointed out we should also test it with different texture packs. Any feedback would help me alot. Thank you very much and stay safe! Test Ambient Light Lightsaber v2.rar Quote Share this post Link to post Share on other sites
Jorak Uln 458 Posted April 20, 2020 2 hours ago, Crazy34 said: @Jorak Uln I started this project to bridge time until you finish your movie texture pack which is awesome. I tested your findings myself and I get similar results. I don't know what the problem is. At some spot on Malachor for instance I don't get ambient light at all. My guess is that it has to do with the lightmap and that the lights only amplified and colors the original light in the lightmap? Atleast for the module area I have no clue how what works. The player models seem to be consistent. I wonder how many different lightsabers in the same scene work and one still gets all the different colors. I attached a v2 with the lightsabers blue red green yellow. I would appreciate if anyone could test it and give me feedback on how the light interacts if multiple lightsabers are involved. As Jorak Uln pointed out we should also test it with different texture packs. Any feedback would help me alot. Thank you very much and stay safe! Test Ambient Light Lightsaber v2.rar 49.98 kB · 3 downloads Thanks! Its good to see that you actively doing things to improve this game- its often those subtle additions that have such a great impact to the game - i totally believe that its possible to shrug off the "rust" of this old engine to the point you cant believe the difference... About the mod: another thing i noticed - 1) when youre getting too close to a wall, then the shine is off: on: off (look at the bottom dark wall texture) 2) regarding your Malachor texture: it seems on textures which dont contain any similar color (in this case green) -> no shimmer is visible. (probably you could try sth. like r 0.1 g 1.0 b 0.1 to see if it has any effect ) 3) sometimes i noticed that the shimmer is not constantly shown, e.g. when running 1 Quote Share this post Link to post Share on other sites
Crazy34 67 Posted April 20, 2020 Thanks for the reply and the screenshots. Mhm in v2 I gave the green blade 0.01 1.0 0.01 so red and blue should be present even very small. If you increase it to 0.1 it did not help I already tried after you suggest it (thanks for the tip I appreciate it.) Can I ask you to reproduce your screen shots and try to get close to the wall but at the same panel as the first screenshot. It might not be the distance to wall but the specific part of the wall texture that change the glow. For me when i walked over a monotonic ground texture on dan for example on some spots the glow was really intense and on over it was normal. But this was on the same texture with the same distance to the ground. Only thing I can think of is the lightmap of the module itself but I have no expertise in Lightmaps at all. Does anyone have a documentation what these options are suppost to controll?: LightPriority: 5 Ambient Only: 0 Dynamic Type: 1 Affect Dynamic: 0 Shadow: 0 Flare: 0 Fading Light: 0 I welcome all help I can get and thank you for your patience with me. Stay safe Quote Share this post Link to post Share on other sites
Jorak Uln 458 Posted April 20, 2020 20 minutes ago, Crazy34 said: Thanks for the reply and the screenshots. Mhm in v2 I gave the green blade 0.01 1.0 0.01 so red and blue should be present even very small. If you increase it to 0.1 it did not help I already tried after you suggest it (thanks for the tip I appreciate it.) Can I ask you to reproduce your screen shots and try to get close to the wall but at the same panel as the first screenshot. It might not be the distance to wall but the specific part of the wall texture that change the glow. For me when i walked over a monotonic ground texture on dan for example on some spots the glow was really intense and on over it was normal. But this was on the same texture with the same distance to the ground. Only thing I can think of is the lightmap of the module itself but I have no expertise in Lightmaps at all. Yes, youre right - tested it again, and it doesnt seem to be the texture colors that are not reflective but sth. else, probably the lightmaps... same texture, slightly different location: about the settings - i dont know, but you could try to set the priority to max (dont know if 1 or 10 for example is the maximum) further, you might test set ambient =1 and disable dynamic type=0 but im just guessing here.. 1 Quote Share this post Link to post Share on other sites
Crazy34 67 Posted April 20, 2020 Thanks again, good to know that we can reproduce the artifacts with different textures. As I sad I have my own spot to test this behavior so in the next days I will play around with the seetings and update you when I know more or if it helped. So do you guess or know what the range of the settings are LightPriority: 1 -10 ? Ambient Only: 0 / 1 ? Dynamic Type: 1 / 0 ? Affect Dynamic: 0 /1 ? Shadow: 0 / 1 this I tested, one could use the lightsaber to cast the shadow but its buggy when you are not static so this will be 0. Flare: 0 /1 ? Fading Light: 0 /1 ? Thanks alot for the help! Quote Share this post Link to post Share on other sites
ebmar 893 Posted April 22, 2020 Cool findings, @Crazy34! Probably the best stuffs happened yet in 2020. 😛 I have tested your lightsabers, and they look great. You nailed the radiuskey value of the light [with the animations] quite seamlessly, and I really liked what I saw. I'm very grateful to that knowledge and had to thank you for that, really. While at it I also wanted to share what I could, particularly this one's with RGB value of the AuroraLight, especially for anyone that uses JC's Lightsaber Visual Effects for K2, for the ambient light to match the blade color -- Spoiler Blue // w_lghtsbr_001 color 0.52 0.80 0.92 Red // w_lghtsbr_002 color 0.96 0.10 0.12 Green // w_lghtsbr_003 color 0 0.98 0.38 Yellow // w_lghtsbr_004 color 0.96 0.92 0 Purple // w_lghtsbr_005 color 0.48 0.17 0.96 Hope that helps with anything. 1 Quote Share this post Link to post Share on other sites
Crazy34 67 Posted April 22, 2020 @ebmar Thank you for the comment and I am glade that you liked my tuning of the parameters. Thanks for the Auroralight values. This helps if I will make it compatible with @JCarter426 mod. But at the moment I would like to change the blade itself. The reason is simple. In order to add the light to the saber I need to change the model files. So if I have to do tha anyway I can also improve the blades even beyond great texture mods like JCs. I am experimenting with a 3d zylinder blade core (the white). But the changes are maginal compared with better blade planes uv layout. The orginial plane approch has the advantage that once they are out there, people can again do texture mods for them (I am a terrible texture painter (no artist really)). Also you can animate the core and the color glow of the blade. With a 3d Zylinder Core it would always stay the same size and you could not animate them. Also some people like to have thin blades like rebels or the OT and others prefer the PT style. With the 3d ones you would need to change the model itself with is much more work. Mhm I don't know what to do. What do you guys think about it? 3d or 2d? I have the 3d thing ready. Also is there another way then planes to get the color glow and animate it? Quote Share this post Link to post Share on other sites
Stormie97 253 Posted April 22, 2020 1 hour ago, Crazy34 said: What do you guys think about it? 3d or 2d? I have the 3d thing ready. Can you provide pictures of what the 3d blade currently looks like? Might help determine if it's worth continuing in that direction. Quote Share this post Link to post Share on other sites
Crazy34 67 Posted April 22, 2020 Here are some test pictures. On the first you see the model without the standard plane glow. On the second with lightsaber activated. I also have it animated but when you don't see the blade core at all, since it is smaller than the standard blades core texture. Quote Share this post Link to post Share on other sites
Jorak Uln 458 Posted April 23, 2020 14 hours ago, Crazy34 said: What do you guys think about it? 3d or 2d? I have the 3d thing ready. I think the most important part of the mod is to fix this right: So, - at least in my mind- you definitely should go for 3d - on the long run it would be the best choice, since it not only fixes this bug, but makes other things possible like darker (black) cores like in SWTOR etc. 1 Quote Share this post Link to post Share on other sites