Author Topic: [FF7] 24bits texture conversion - Image2Tex (2011-08-02)  (Read 40232 times)

Borde

  • Freak
  • *
  • Posts: 898
  • Karma: 24
    • View Profile
Hello everyone.

I've uploaded a little quick and dirty tool I coded to let you convert your 24 bits textures to the TEX format (as oposed to the 8 bits limitation we've had the last years). It should work with any BMP, JPG, GIF, ICO, WMF or EMF file. The original bitcount is respected. It can also save the textures as BMPs. I have barely tested it, so expect bugs.

Most of the credit should go to Aali for his specification of the TEX format and his help getting things working.

Have fun.

Binary (thanks to PitBrat for the mirror):
http://www.mediafire.com/?3y7ihysoccaxa5s
Source:
http://rapidshare.com/files/1563397979/Img2tex04_src.7z

Lastest version uploaded on 2/8/2011
« Last Edit: 2014-07-17 20:26:26 by Covarr »

Aali

  • No life
  • *
  • Posts: 1197
  • Karma: 116
    • View Profile
Re: Image2Tex - 24bits textures for FF7
« Reply #1 on: 2009-07-12 03:55:27 »
"Error 481" trying to open a 2560x1024 24bpp .png file :-P

Borde

  • Freak
  • *
  • Posts: 898
  • Karma: 24
    • View Profile
Re: Image2Tex - 24bits textures for FF7
« Reply #2 on: 2009-07-12 12:31:45 »
Jejeje... you are right Aali. I missunderstood the formats supported by the VB6 version of LoadPicture. Nor PNG neither RLE are supported, sorry.

Update: Uploaded a new version. Now the bitcount is respected and TEX files can also be loaded.
« Last Edit: 2009-07-17 01:34:58 by Borde »

Millenia

  • Crazy poster
  • *
  • Posts: 244
  • Karma: 1
  • wireframe
    • View Profile
    • My portfolio
Re: Image2Tex - 24bits textures for FF7
« Reply #3 on: 2009-07-21 17:53:02 »
Sorry for the bump and KIND OF unrelated, but is it possible to use, say, 1024x1024 sized textures with this tool in the game? I plan on doing all the weapons and there aren't enough texture slots so I have to combine stuff at the end and I'd like to do so with minimal loss of quality.

Borde

  • Freak
  • *
  • Posts: 898
  • Karma: 24
    • View Profile
Re: Image2Tex - 24bits textures for FF7
« Reply #4 on: 2009-07-21 21:38:28 »
Yes, you SHOULD be able to convert the texture no matter the size (yeah, theorically...).
As for the texture slots, you can have up to 10 textures for every character (I guess you may still end up running out of slots...). Here you have a picture showing what you must modify on the skeleton file (??aa) of the model:


Millenia

  • Crazy poster
  • *
  • Posts: 244
  • Karma: 1
  • wireframe
    • View Profile
    • My portfolio
Re: Image2Tex - 24bits textures for FF7
« Reply #5 on: 2009-07-22 09:05:58 »
Yeah, the problem is Cloud, Tifa and Barret all have 16 weapons; that's why I was planning on combining them all to a massive 2048 or so - let's hope the game uses it as-is and doesn't downscale or do anything else stupid like that.

E:/ It DOES work! Thanks Borde :D
« Last Edit: 2009-07-23 08:59:33 by Millenia »

Nero

  • Cool newbie
  • *
  • Posts: 81
  • Karma: 0
    • View Profile
Re: Image2Tex - 24bits textures for FF7
« Reply #6 on: 2009-07-23 09:24:29 »
I’ve been waiting for something like that.
Thanks for your hard work everyone :lol:

Nero

  • Cool newbie
  • *
  • Posts: 81
  • Karma: 0
    • View Profile
Re: Image2Tex - 24bits textures for FF7
« Reply #7 on: 2009-07-23 10:46:04 »
Just tested it, works indeed :-D the 24bip texts look great in game. However when I try to open the model in kimera it crashes. Maybe it’s because kimera doesn’t support 24bit colors?

Borde

  • Freak
  • *
  • Posts: 898
  • Karma: 24
    • View Profile
Re: Image2Tex - 24bits textures for FF7
« Reply #8 on: 2009-07-23 10:54:39 »
Right. The current version of Kimera only supports up to 8-bit textures. That will change soon, though...
Nice to see it actually worked Millenia :-P. As I said, I didn't test this thing very thoroughly.

Millenia

  • Crazy poster
  • *
  • Posts: 244
  • Karma: 1
  • wireframe
    • View Profile
    • My portfolio
Re: Image2Tex - 24bits textures for FF7
« Reply #9 on: 2009-07-23 11:13:49 »
Yeah, I don't see any problems; I threw 4 swords into one 1024x1024 and I see no loss of detail whatsoever.

Timu Sumisu

  • No life
  • *
  • Posts: 1860
  • Karma: 14
  • The Master
    • View Profile
Re: Image2Tex - 24bits textures for FF7
« Reply #10 on: 2009-07-26 20:16:53 »
in biturn it reads the outputted file as a requiem, and when in the game it loaded the original battle model stead of my new one o.o any ideas?

EDIT:

okay it works, but still doesnt read in biturn.
« Last Edit: 2009-07-26 21:06:41 by timu sumisu »

Izban

  • Insane poster
  • *
  • Posts: 379
  • Karma: 1
    • View Profile
Re: Image2Tex - 24bits textures for FF7
« Reply #11 on: 2009-07-27 00:47:18 »
where you using barret or vincent if so then you havent swiched all of  there models otherwise i got absolutly no idea whats wrong

Millenia

  • Crazy poster
  • *
  • Posts: 244
  • Karma: 1
  • wireframe
    • View Profile
    • My portfolio
Re: Image2Tex - 24bits textures for FF7
« Reply #12 on: 2009-07-27 02:10:48 »
in biturn it reads the outputted file as a requiem, and when in the game it loaded the original battle model stead of my new one o.o any ideas?

EDIT:

okay it works, but still doesnt read in biturn.

Yeah Biturn won't show it but it does work.

Borde

  • Freak
  • *
  • Posts: 898
  • Karma: 24
    • View Profile
Re: Image2Tex - 24bits textures for FF7
« Reply #13 on: 2009-07-27 13:51:02 »
Yes, unfortunately by the time Biturn was coded the TEX file format wasn't fully known. Thus it can only open 8bit and 4bit TEX files.

obesebear

  • Administrator
  • No life
  • *
  • Posts: 3272
  • Karma: 112
    • View Profile
Re: Image2Tex - 24bits textures for FF7
« Reply #14 on: 2009-08-04 04:49:21 »
Using Img2Tex does not work on files inserted into menu_us.lgp
Of course, converting them to 256 .bmp works, but that's just ugly

Aali

  • No life
  • *
  • Posts: 1197
  • Karma: 116
    • View Profile
Re: Image2Tex - 24bits textures for FF7
« Reply #15 on: 2009-08-04 05:49:46 »
What are you trying to replace? Some things just have to be paletted or they will not work properly.

obesebear

  • Administrator
  • No life
  • *
  • Posts: 3272
  • Karma: 112
    • View Profile
Re: Image2Tex - 24bits textures for FF7
« Reply #16 on: 2009-08-04 06:10:42 »
The character avatars.  The game has no trouble displaying an unconverted 256 color bmp (though the pic does have to be offset from the center of the image).  Neither a 24bpp bmp nor tex seems to work though

Aali

  • No life
  • *
  • Posts: 1197
  • Karma: 116
    • View Profile
Re: Image2Tex - 24bits textures for FF7
« Reply #17 on: 2009-08-04 06:20:30 »
Rainbow jesus begs to differ


Makubex666

  • Guest
Re: Image2Tex - 24bits textures for FF7
« Reply #18 on: 2009-08-04 06:30:22 »
W-o-W

XD.....
Good work aali
:P

Hellbringer616

  • No life
  • *
  • Posts: 1915
  • Karma: 12
    • View Profile
Re: Image2Tex - 24bits textures for FF7
« Reply #19 on: 2009-08-04 06:30:57 »
Haha i love you and your rainbow jesus XD

obesebear

  • Administrator
  • No life
  • *
  • Posts: 3272
  • Karma: 112
    • View Profile
Re: Image2Tex - 24bits textures for FF7
« Reply #20 on: 2009-08-04 06:39:53 »
I have no idea how you managed to do that.  I printscreened your rainbow jesus as a 24 bmp and A<>B replaced it in LGPTools.   

Once in-game it has clearly been changed to a 256 color.  And the tex file of it just locks up LGPTools.


EDIT
It only locked up LGPTools because the program kept increasing the 'table start' size.  Still doesn't work for me though :P

« Last Edit: 2009-08-04 06:45:09 by obesebear »

Aali

  • No life
  • *
  • Posts: 1197
  • Karma: 116
    • View Profile
Re: Image2Tex - 24bits textures for FF7
« Reply #21 on: 2009-08-04 07:04:50 »
My source image was jpeg and I didn't use LGPTools, but there was certainly no magic involved.
It just worked.

sl1982

  • Administrator
  • No life
  • *
  • Posts: 3688
  • Karma: 43
  • GUI Master :P
    • View Profile
Re: Image2Tex - 24bits textures for FF7
« Reply #22 on: 2009-08-08 06:34:47 »
It also works for the textures for the fonts  :wink:

pyrozen

  • Freak
  • *
  • Posts: 793
  • Karma: 0
  • Team Avalanche Member
    • View Profile
Re: Image2Tex - 24bits textures for FF7
« Reply #23 on: 2009-08-13 22:24:43 »
I've noticed that when quickly opening multiple .tex files in a row(i'm trying to locate the worldmap skybox texture), the program has a tendency to crash out. Not sure what you need to pin-point it, but let me know.  This error is very reproducable.

lee

willis936

  • Insane poster
  • *
  • Posts: 371
  • Karma: 0
    • View Profile
Re: Image2Tex - 24bits textures for FF7
« Reply #24 on: 2009-08-19 00:07:43 »
Component 'COMDLG32.OCX' or one of its dependencies not correctly registered: a file is missing or invalid.