Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

KOTOR bumpmapping?

Page: 1 of 1
 luc500
05-21-2010, 11:19 AM
#1
I've already asked this before. But is it possible to add/change bumpmaps for K1 and TSL? I've tried everything and somehow i KNOW it's possible. I think you just need to create a texture file with the right information.
 DarthParametric
05-23-2010, 5:01 AM
#2
How do you have them set up at the moment?

Looking at a vanilla K1 bump map for the Ebon Hawk (V_EHawk01b.tga), it seems it is somewhat akin to Dragon Age's implementation of normal maps in that it appears to use X and Y information, although I'm not sure if Odyssey interpolates Z information on the fly like Eclipse. The Red and Alpha channels are white and the Green and Blue channels have greyscale maps. It would seem that G is X and B is Y:

http://i374.photobucket.com/albums/oo185/DarthParametric/th_Ebon_Hawk_Bump.jpg) (http://i374.photobucket.com/albums/oo185/DarthParametric/Ebon_Hawk_Bump.jpg)
(The contrast of the bump map channels has been cranked way up for clarity)

Judging by the TPC, you need a TXI with the lines:

isbumpmap 1
bumpmapscaling X

I'm unsure of what value X should be. The Ebon Hawk map uses 0.5, but others apparently use 1. I'd try both and see what happens.

It's odd, but there doesn't seem to be much that actually uses it. Perhaps due to the hardware limitations of the Xbox. It would be interesting to try it with things like weapons and heads and see what happens.
 luc500
05-23-2010, 8:21 AM
#3
I did create my own texture files wich didn't work.

UPDATE: Yours didn't work either I just get a Invalid bumpmap message. I managed to replicate a bumpmap as it appears when i ecxtract one in Ktool. We just need another TXI with more/different information. :mad:
 redrob41
05-26-2010, 3:36 AM
#4
well, I was curious, so I gave something a try. Awhile ago, I made a skin of the Droid Construction Boss. When I look at the original (C_CONDRDBOSS.tga) in-game next to mine (C_CONDRDBOSS01.tga), they both have the same bump mapping going on. This leads me to believe that they are both accessing the same bump map texture (C_CONDRDBOSSB.tga), and that the name of the texture file doesn't have to match the skin name. I didn't alter the mdl or mdx, and used it for both.

I tried putting a new bump map (saved in Photoshop CS2 = 4.00Mb) with the same name (C_CONDRDBOSSB.tga) into the override directory, but I wound up with the "Invalid Bumpmap" message, and the game froze. I then tried putting and un-alterred copy (exported from Kotor Tool = 5.33Mb) into the override, and same thing.

I'm looking at it again in KT, and the C_CONDRDBOSS.tpc has a lot more text embedded:
bumpyshinytexture CM_baremetal

bumpmaptexture C_CONDRDBOSSB
clamp 3

xbox_downsample 256
so I exported that as a .txi file. I'll try playing around with that for a bit.

Edit: :argh: Nope. I tried it with a different model that I'm working on, with a different name. All I succeded in doing, is it knew which texture to look for (my new bump map), and gave me the "Invalid Bumpmap" and froze again. It must be a problem with the way the .tga gets saved, vs the .tpc that comes with the game (partly due to the loss of info 5.33Mb - 4Mb = 1.33Mb I'd guess).

Since I'm no expert with bump or normal maps, I'm stumped. I was just taking random shots in the dark anyway. I hope my experiaments will help you out :whacked:
 Canderis
05-26-2010, 7:38 AM
#5
Try converting it back to a TPC maybe?
 redrob41
05-26-2010, 10:33 AM
#6
Try converting it back to a TPC maybe?

I don't know how to, or even if it's possible. Any program suggesions?

Edit: hmm, I'm wondering if the bump map texture also needs a .txi file (example C_CONDRDBOSSB.txi), but I have no idea what it should contain. When I look at one in KT, the txi info isn't in english (is it hex?).

Edit 2: When I get home, I'll have to try something from this tut:
http://www.lucasforums.com/showthread.php?t=175937)
 VarsityPuppet
05-27-2010, 12:42 AM
#7
I don't know how to, or even if it's possible. Any program suggesions?
Talked to stoffe about this one awhile ago. Nothing.


Edit: hmm, I'm wondering if the bump map texture also needs a .txi file (example C_CONDRDBOSSB.txi), but I have no idea what it should contain. When I look at one in KT, the txi info isn't in english (is it hex?).


Try this, it's taken directly from the C_CONDRDBOSSB.tpc (thank God for hex editors).


isbumpmap 1

bumpmapscaling 2.5

clamp 3

xbox_downsample 256
 redrob41
05-27-2010, 11:45 AM
#8
Thanks VP, I'm using that in my bumpmap's txi (minus the xbox line).

So, yesterday I was too busy to mod, and all I had was 10 minuits this morning before rushing out to go to work. Because of that, I haven't re-tested or confirmed anything (so maybe someone else can give it a try).

What I tried this morning:
1 - saved bumpmap as a tga in RGB format with a white alpha 1 channel (it is similar to the in-game normal maps, pink, blue, green etc - made with the nvidia plug in for photoshop) = gave me an "Invalid bumpmap" & crash

2 - resaved without the alpha 1 channel = "Invalid bumpmap" & crash

3 - got rid of the colour version, and went back to the original grey version (that I ran through the nvidia plug in). Saved it in RGB format with alpha 1 = "Invalid bumpmap" & crash

4 - resaved without the alpha 1 channel = "Invalid bumpmap" & crash

5 - resaved as greyscale instead of RGB (it automatically deleted the alpha 1 channel) = it actually ran in-game without the crash.

6 - turned off the computer without confirming or re-trying anything. Ran out the door for work.

I couldn't tell if the model looked any more bumpy. Maybe there is a conflict with the appearance.2da where I have the envmap column set to CM_baremetal against the .txi that has bumpyshinytexture CM_baremetal? Maybe I need to set the bumpmapscaling higher, or have greater contrast in the greyscale bumpmap.tga? Maybe the main texture's alpha 1 channel needs to be less detailed?

Anyway, I've still got things to try, but at least I got it to stop crashing by saving as a greyscale tga . If anyone else can give it a try today, and help me confirm it, that'd be great :D
 luc500
05-27-2010, 12:03 PM
#9
I tried the above... No lcuk game crashed for me. Did ecxactly as stated above. Made a bumpmap for the selkath made it black n white then copied it with and without the TXI file, the game still crashes. :(
Page: 1 of 1