Jump to content

Home

Adding Dynamic Lights through .txi files?


Recommended Posts

Alright, so which *.txi files cover the lightsaber blades? Trying to make lightsabers give off dynamic lights. Also, does the TSL Engine (Odessey, I believe?) support cubemaps? If that's what CM_ maps are.

 

From what I can tell, the game does use txi files, but it seems to have them merged with the texture itself, ergo the .tpc(as you can see the effects a texture uses when viewing it in KOTOR Tool, in the white box in the lower left), in the vanilla game. But for the lighsaber blades, they only use two options by default, which are:

 

blending additive

decal 1

 

While the decal 1 simply looks for any black in the blade texture and makes it invisible, I'm not too sure what the Blending Additive does. Though unlike Jedi Academy, I don't think the blades can be made to cast light. Most you can do is make the blade glow. Which just involves adding some lines to the .txi, and editing the texture to have frames(just making a new texture which is doubled, tripled, etc, in one image).

Link to comment
Share on other sites

Alright, and what code would I have to add to the *.txi file? And how would I add frames to the texture?

 

Also, If the blaster shots can be set to give off red dynamic lights, would it be possible to use the coding from them to make the lightsaber blades glow?

Link to comment
Share on other sites

Alright, and what code would I have to add to the *.txi file? And how would I add frames to the texture?

 

For the txi:

 

proceduretype cycle

defaultwidth 256 (width of single frame)

defaultheight 256 (height of single frame)

numx 2

numy 2

fps 24 (how fast the animation goes)

blending additive

decal 1

 

For the texture:

 

You'll need photoshop, though Gimp might be usable as well.

 

The total size of the texture depends on what size your blade texture is. If you want to use the game's default(which is a 128x128), the texture size you want is 512x512. Copy the 128 texture into the 512, four times. Each of them makes up one frame. If you want more frames, you just need to multiply the size of the texture by the number of frames you want (ie. 128x4=512), though its best to stick with even numbers, else the texture won't appear correctly.

 

As for the animation itself, the way of doing that can vary. But all you really need to do is change how much "glow" there is on the white core. The method I used, is to create four circles(equal in size to the existing ones), and center them over the existing ones. Then I use the "Outer Glow" effect to change the intensity of the glow on each frame. There might be a better method for this, but I can't say I know it.

 

Edit: You might want to look at this as well: http://knightsoftheoldrepublic.filefront.com/file/Flickering_Lightsaber_Blades;104551

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...