CactusCole 2 Posted February 22, 2018 I want to convert an entire erf into tga files. This would be the only way to do it besides doing it by hand no? Quote Share this post Link to post Share on other sites
DarthParametric 3,777 Posted February 22, 2018 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 1 1 Quote Share this post Link to post Share on other sites
ndix UR 218 Posted February 23, 2018 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. Quote Share this post Link to post Share on other sites
DarthParametric 3,777 Posted February 23, 2018 the KOTORTool 'mostly red' form ABGR? You sure that's not a consequence of your fruity OS? I don't recall seeing that. You have any specific examples? Quote Share this post Link to post Share on other sites
ndix UR 218 Posted February 23, 2018 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. Quote Share this post Link to post Share on other sites
DarthParametric 3,777 Posted February 24, 2018 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? Quote Share this post Link to post Share on other sites
CactusCole 2 Posted February 24, 2018 Thanks a lot! Quote Share this post Link to post Share on other sites