Sign in to follow this  
CactusCole

Anyone still have the .tpc to .tga executable?

Recommended Posts

Use KOTORTool to extract all the TPCs from the texture pack ERF. Then, to quote myself:

 

KOTORTool will individually convert TPCs to TGAs. Someone (maybe tk102?) made a commandline batch converter, although I can't find a link for it at the moment.

 

However there is also a commandline converter as part of the Xoreos Tools:

 

https://github.com/xoreos/xoreos-tools/releases/download/v0.0.4/xoreos-tools-0.0.4-win64.zip or https://github.com/xoreos/xoreos-tools/releases for other versions.

 

On Windows you can use a batch file to mass convert TPCs. Put the TPCs in the same directory as the tools, then extract the BAT from this Zip:

 

https://www.darthparametric.com/files/kotor/misc/Batch_Convert_TPC.zip

 

into the same folder. Double click the BAT file and it should convert all the TPC files it finds.

 

The batch command, for those interested:

 

@echo off
for %%F in (*.tpc) do xoreostex2tga --tpc %%~nF.tpc %%~nF.tga
pause

 

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

I used this technique awhile ago and actually encountered some drawbacks. xoreostex2tga isn't equipped to read or output animated textures. All told, for TSL, I wound up 129 textures short when I used this mass conversion technique.

 

The other difference is a positive one, which is that they export normal maps in the standard 'mostly blue' form, instead of the KOTORTool 'mostly red' form. If you want the normal maps for use in other 3D packages, it is a very nice feature.

Share this post


Link to post
Share on other sites

My mistake, it must be a consequence of running KOTORTool through wine. I've never tried it on 'dows. I was unaware you first class citizens get blue normal maps from KOTORTool. For me, specific examples would be 'any'. I guess I'm not surprised though, you guys probably get real data in the TXI field too (I get truncated text or garbage. I pull my TXI text from the end of the TPC files w/ a text editor). I always thought it was odd too, because I had found a thread on LF where the author talked about figuring out how to process the channels properly... and yet it didn't match what my results. Thanks for clearing that up for me.

Share this post


Link to post
Share on other sites

The TXI data is a mixed bag. Some are perfectly fine, some are complete garbage, some are the data surrounded by garbage.

 

I've never seen KTool spit out an ABGR normal map. However, it quite often crashes when trying to display them. Maybe that's the difference?

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.

Sign in to follow this