Crazy34

New Lightsaber Blade Model

Recommended Posts

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!

Share this post


Link to post
Share on other sites

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.

 

Vader_test.png

Vader_test2.png

Vader_test3.png

Vader_test4.png

  • Like 3
  • Light Side Points 1

Share this post


Link to post
Share on other sites

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!

2020-04-19 13_59_03-Window.png

  • Like 1

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
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?

  • Like 1

Share this post


Link to post
Share on other sites

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?

dbl_test.png

dbl_test2.png

  • Like 4

Share this post


Link to post
Share on other sites

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! 

  • Like 1

Share this post


Link to post
Share on other sites

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.

dbl_test3.png

dbl_test4.png

dbl_test5.png

Vader_test5.png

 

Vader_test6.png

Vader_test7.png

Test Ambient Light Lightsaber v1.rar

Edited by Crazy34
Update picture and File
  • Like 2
  • Light Side Points 2

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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. 

  • Thanks 1

Share this post


Link to post
Share on other sites
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.

  • Thanks 1

Share this post


Link to post
Share on other sites
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: 

730307113_swkotor22020-04-1923-38-22.thumb.png.6ff7119ff9396cb83894e618a44b5103.png

1754524393_swkotor22020-04-1923-38-37.thumb.png.9da443264ac4555973ca473ae7a4402e.png

2031431838_swkotor22020-04-1923-38-59.thumb.png.7bca37a0fd2edd0a37bd0c0fde151b15.png

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!

  • Like 1

Share this post


Link to post
Share on other sites

@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

Share this post


Link to post
Share on other sites
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:

994769286_swkotor22020-04-2019-16-30.thumb.png.a1781adffe69da121177a2df17505de1.png

off (look at the bottom dark wall texture)

1833308947_swkotor22020-04-2019-16-40.thumb.png.5b13154003668eafea6d997ad2832fab.png

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 

 

  • Thanks 1

Share this post


Link to post
Share on other sites

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

 

Share this post


Link to post
Share on other sites
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...

2001145777_swkotor22020-04-2021-42-01.thumb.png.a9fae6efcc7d4b01e5cbb0d7e1b2e3ad.png

same texture, slightly different location:

427463978_swkotor22020-04-2021-42-07.thumb.png.06130607d58b6dd2ed5509cb35afcdbf.png

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..

  • Thanks 1

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

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. :cheers:

  • Thanks 1

Share this post


Link to post
Share on other sites

@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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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.

blade.png

blade2.png

Share this post


Link to post
Share on other sites
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:

1780107316_LS2DPlane.thumb.jpg.b95072b6f07b7e72b803c52f6f6a770d.jpg

 

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.  

 

  • Thanks 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.