PDA

View Full Version : Lightsaber Crystal Mod problem


gamerlj
09-07-2009, 01:02 PM
Hello all,

I am working on my own lightsaber crystal mod for Kotor 2: TSL. Normally I would just download existing mods but I want to learn to make mods myself. Anyway, I've gotten my working for the most part, only two things remain:

1)An inventory/equipment icon for the inventory screen for my new color saber.

2)When I insert the crystal into the lightsaber, it changes the color but I get an unusual appearance in that I can see the saber blade but there is an unual rendering issue that makes the saber look like a hexehdron with triangular pieces missing. Here's a picture:

http://img4.imageshack.us/my.php?image=messeduplightsaber.jpg

Any help with these two issues would be great thanks.

--gamerlj

TriggerGod
09-07-2009, 02:32 PM
Hello all,

I am working on my own lightsaber crystal mod for Kotor 2: TSL. Normally I would just download existing mods but I want to learn to make mods myself. Anyway, I've gotten my working for the most part, only two things remain:

1)An inventory/equipment icon for the inventory screen for my new color saber.

2)When I insert the crystal into the lightsaber, it changes the color but I get an unusual appearance in that I can see the saber blade but there is an unual rendering issue that makes the saber look like a hexehdron with triangular pieces missing. Here's a picture:

http://img4.imageshack.us/my.php?image=messeduplightsaber.jpg

Any help with these two issues would be great thanks.

--gamerlj

1) Since you didn't change the hilt model, you don't have to edit anything except the color in the background of the icon. Just extract a lightsaber icon, then open it up in you image editor (GIMP, Photoshop, etc), then edit.

2) I see your problem. There are 2 ways you can fix it

1: If you have a custom color that doesn't have a black core, open up Notepad and copy this:

blending additive
decal 1


That will automatically make all black in your image invisible, including any black behind a gradient. (aka partial invisibility) Before you save, make sure you have "All files" selected, and call it [texturename].txi (replacing texturename with your blade's name)
Since your saber has a black core, you'll have to...

2: Open up your blade's texture in GIMP or Photoshop. Make a radial gradient (using black and white, white being in the middle, fading to black) about the size of your saber blade in your alpha channel. Before you save it, make sure you turn the alpha channel 'off', so that it'll work correctly. Save it as 32 bit, and test. You won't have to make a txi file for this.

gamerlj
09-07-2009, 03:27 PM
1) Since you didn't change the hilt model, you don't have to edit anything except the color in the background of the icon. Just extract a lightsaber icon, then open it up in you image editor (GIMP, Photoshop, etc), then edit.

2) I see your problem. There are 2 ways you can fix it

1: If you have a custom color that doesn't have a black core, open up Notepad and copy this:

blending additive
decal 1


That will automatically make all black in your image invisible, including any black behind a gradient. (aka partial invisibility) Before you save, make sure you have "All files" selected, and call it [texturename].txi (replacing texturename with your blade's name)
Since your saber has a black core, you'll have to...

2: Open up your blade's texture in GIMP or Photoshop. Make a radial gradient (using black and white, white being in the middle, fading to black) about the size of your saber blade in your alpha channel. Before you save it, make sure you turn the alpha channel 'off', so that it'll work correctly. Save it as 32 bit, and test. You won't have to make a txi file for this.

Thanks for the response TriggerGod. This really helps. Forgive me for soundong n00bish, but I don't completely understand how to do the radial gradiant in GIMP. I also do not fully understand the concept of an Alpha Channel. If you could explain these things in little more detail that would be great. Thanks for the help.

Achilles
09-07-2009, 03:49 PM
All textures use a minimum of three channels (R = Red, G = Green, and B = Blue). Everything you see is a combination of these three channels. Some textures utilize a 4th channel called an alpha channel which is used to apply some sort of effect to the texture as well (blending additive to make the lightsabers pretty. Baremetal to make the armors shiny. Etc).

The txi files is necessary to tell the game what to do with the alpha. Without it, all the game knows is that there is one. Including a corresponding txi file with "blending additive" tells the game to not make it funky like your screen shot.

That's the 30,000 "easy as I can make it without trying too hard" explanation.

If using GIMP (or photoshop etc) seems like it might be a little beyond your skill set at the moment, there is absolutely no shame in using the .txi method described above. You can look at any number of lightsaber mods for an example to follow.

I hope that helps.

gamerlj
09-07-2009, 07:57 PM
I appreciate the responses. The info really helped. However, I am still having issues getting my black saber to look normal (see my screen shot above). The txi method does not work because it makes all black in the tga invisible. In the case of my black saber it makes it see through. I have tried to understand what TriggerGod posted about using gradients on GIMP but, the concepts of doing such a thing escape me (the reason is because I am new to modding). If anyone can explain in detail this method (Method 2 in TriggerGod's post) I would very be grateful. Thanks.

@TriggerGod

Thanks for telling me about the txi method and gradient/alpha channel methods. These will definitely come in handy for future any future mods I make.

@Achilles

Thanks for explaining to me some of the concepts surrounding alpha channels and channels in general. It helped a lot.

--gamerlj

Achilles
09-07-2009, 08:02 PM
detailed method: use the gradient tool.

There.

I would recommend downloading svosh's black lightsaber mod to see how he did it.

singerjedi1024
04-25-2014, 09:12 AM
So I am having the same problem, but it is happening to every lightsaber. What exactly should i do to fix this problem? I installed a few mods to get a new experience for the game and now the lightsabers are all screwy and hexagonal. Any help would be appreciated!