PDA

View Full Version : Replace texture format



GimbalLock
06-13-2018, 04:33 PM
Hi forum,

I have a huge model with hundreds of textures, and I'd like to batch convert all those textures from TGA to PNG, to save hd space and ram.

However, Lightwave won't be able to find the textures although they have the same names, but different extensions. So is there a trick or a hack of some kind you guys know about?
I'm not prepared to relocate each and every map manually through the missing texture promp...

Cheers

Sensei
06-13-2018, 04:53 PM
You could try loading .lwo in some hex editor, and batch replace string .tga by .png and save file.

GimbalLock
06-20-2018, 04:00 PM
Thanks for the tip, it would probably work - I ended up chickening out though since I'm not familiar with hex editing and did it manually. Only 1 hours of pressing the same three keys repeatedly. Been through worse in vfx XD

erikals
06-20-2018, 05:07 PM
hex seems neat, might try it once.

there is also autohotkey.com for automation.

GimbalLock
06-21-2018, 02:17 AM
Thanks, I was just thinking (while doing this) that an operating system anno 2018 should be capable of repeating tasks!

Sensei
06-21-2018, 07:11 AM
hex seems neat, might try it once.

Make video tutorial to teach people.

raymondtrace
06-21-2018, 07:21 AM
Hex editing is not too different from text editing. I have personal knowledge that any idiot can do it. Just grab a free hex editor like "frhed" or "HxD", and press three hotkeys.

CTRL-O (file open)
CTRL-H (replace ".tga" -> ".png")
CTRL-S (file save)

Of course, backups help if you accidentally mangle a file with careless editing.

http://frhed.sourceforge.net/en/
https://mh-nexus.de/en/hxd/

ernpchan
06-21-2018, 08:00 AM
This is something you could do via scripting.

erikals
06-21-2018, 10:29 AM
http://forums.newtek.com/images/misc/quote_icon.pngerikals hex seems neat, might try it once.

http://forums.newtek.com/images/misc/quote_icon.pngSensei Make video tutorial to teach people.

might... might... :)


http://forums.newtek.com/images/misc/quote_icon.pngraymondtrace
Hex editing is not too different from text editing. I have personal knowledge that any idiot can do it. Just grab a free hex editor like "frhed" or "HxD", and press three hotkeys.

CTRL-O (file open)
CTRL-H (replace ".tga" -> ".png")
CTRL-S (file save)

Of course, backups help if you accidentally mangle a file with careless editing.

http://frhed.sourceforge.net/en/
https://mh-nexus.de/en/hxd/

thanks, good info    https://i.imgur.com/tJGL61i.png


http://forums.newtek.com/images/misc/quote_icon.pngernpchan
This is something you could do via scripting.
it's peculiar that it isn't available in any form. i'm happy Sensei informed about the hex method though,
so will look into that down the line, and perhaps there is a way to batch-fix multiple files / directories.


http://forums.newtek.com/images/misc/quote_icon.pngGimbalLock
Thanks, I was just thinking (while doing this) that an operating system anno 2018 should be capable of repeating tasks!
yep, i know OD Toolset has several automation systems. not this function though.

erikals
06-21-2018, 12:35 PM
Make video tutorial to teach people.

alright, might as well make a small intro video... :)


https://www.youtube.com/watch?v=L_brdcHVaww