Texture.bin issues

F4Browse, CATE, Tacedit, Terrainview & TheaterMaker etc utility related

Moderators: Lone Wolf, Snake Man

Post Reply
T_Rex
FreeFalcon
Posts: 848
Joined: 2001-03-04 23:01:01
Location: here

Texture.bin issues

Post by T_Rex » 2007-06-08 15:01:17

Is the perl script the only way to add stuff to texture.bin?

Does anyone have any resource documents on what the format of the bin is, in terms of decoding it?

I understand that we can just re-use the korea texture.bin and ignore the filenames, but I don't think that'll be sufficient as we move further towards photo-real scenery.

I think we need a better tool for adding/editing texture.bin.

(I'm kinda hoping its already out there and I'm just missing it.) :)
Sic Semper tyrannosauro.

Snake Man
Commander-In-Chief
Posts: 9351
Joined: 2000-07-31 22:01:01
Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
Editing Interests: All, I (try) to edit everything.
Location: PMC
Contact:

Post by Snake Man » 2007-06-08 15:17:16

Perl is the only way yes.

I dont have the F4 source codes here anymore (I have them but will most likely find them from the net before I get my hands on my old backups, the old story). But I think any qualified C/C++ coder should deciper the perl code itself to program a following tool, at least I think so.

Hmm I think I've done ODS from scratch, or more or less scratch. It is not necessary to use korea .bin file.

Hey yes I think a such tool would be nice, altough once you install perl and use the perlapplyer util by Schumi, its no big deal. Not easy to use yes, but can do the job. However seen how succesfull the topic of getting the sptinstall recoded was, I have little or no hope of finding someone to program such util. Sad but true.

There is no such tool that I know off.
PMC Tactical Forum New User Registration please read new info here.

PMC since 1984

Editing knowledge, visit PMC Editing Wiki
The leading, most detailed and comprehensive modification made for the Vietnam War - Vietnam: The Experience homepage
View our videos in PMC Youtube channel

PMC Tactical forum Advanced Search is power.

"ALPHA BLACK TO PAPA BEAR. ALL RUSSIANS ARE TOAST. OVER."

Malc
Lt Colonel
Posts: 294
Joined: 2000-12-24 23:01:01
Location: England
Contact:

Re: Texture.bin issues

Post by Malc » 2007-06-08 16:48:27

T_Rex wrote:Is the perl script the only way to add stuff to texture.bin?
Hi fellas,

Why not use pathmaker to add stuff to the texture.bin? :D Virtually positive you can use this tool...

Snake Man
Commander-In-Chief
Posts: 9351
Joined: 2000-07-31 22:01:01
Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
Editing Interests: All, I (try) to edit everything.
Location: PMC
Contact:

Post by Snake Man » 2007-06-08 17:34:15

Okay I'm saying this without refreshing my memory even at looking PathMaker not to mention its documents... but I'm pretty sure its not that easy, I recall you had to do all kinds of tricks to get the texture.bin created with it. But again, I cant remember it in detail now.

Anyways good point Malc, will have to check that out, I mean T Rex has to heh :)
PMC Tactical Forum New User Registration please read new info here.

PMC since 1984

Editing knowledge, visit PMC Editing Wiki
The leading, most detailed and comprehensive modification made for the Vietnam War - Vietnam: The Experience homepage
View our videos in PMC Youtube channel

PMC Tactical forum Advanced Search is power.

"ALPHA BLACK TO PAPA BEAR. ALL RUSSIANS ARE TOAST. OVER."

Malc
Lt Colonel
Posts: 294
Joined: 2000-12-24 23:01:01
Location: England
Contact:

Post by Malc » 2007-06-09 08:48:50

Hi SM,

To be fair; as I remember, creating a NEW texture.bin with Pathmaker wasn't possible (for me at least, it kept crashing) but certainly adding tiles to the existing Korea was very easy. My only prerequisite was move all the tiles, texture.bin, etc. to the same directory as pathmaker.exe but I didn't need to do this with later versions.

I must confess I never used the perl script cos I never had the need to create a whole new texture.bin, but I would think if you were to create a new texture.bin with the script just to get it started, say add one set, then add all the other new tiles with Pathmaker, this would be a good compromise.

User avatar
Phoenix711
Captain
Posts: 186
Joined: 2007-10-03 07:52:29
Location: Istanbul Turkey
Contact:

Re: Texture.bin issues

Post by Phoenix711 » 2008-12-11 09:02:10

The bin file format from the Perl script (Tested with visual Basic).

Header (1 Time only)
4 byte (Long) for Set Count
4 byte (Long) for total no of tiles

For Every Set (Use set count found above)
____4 byte (Long) for Tile Count (in the set)
____1 byte (byte) for Cover Type

For Every Tile (in set, use Tile Count found for the set)
________20 byte (20 character) for tile name
________4 byte (Long) for no of Areas (in the tile)
________4 byte (Long) for no of Paths (in the tile)
________4x4=16 bytes (4xlong) for every area (if any)
________6x4=24 bytes (6xlong) for every path (if any)

For every tile, name, area count and path count is read before area and path detail information (if any)

IMPORTANT: Tile ID for programs like Terrainview, or pathmaker, is calculated like each set has 16 tiles. For example, even the first set has 15 tiles (starting to give IDs from 0), the ID for the first tile in the second set is 16, not 15.

Or, set 157 has a starting tile ID of 2496 ((157-1) * 16), even the texture.bin has info for total of 1666 tiles.

User avatar
Sherlock
Lt. General
Posts: 1167
Joined: 2006-05-24 22:01:01
Gaming Interests: Falcon 4.0
Editing Interests: All, I (try) to edit everything.
Location: Arizona, USA

Re: Texture.bin issues

Post by Sherlock » 2008-12-11 17:32:16

Phoenix711 wrote: The bin file format from the Perl script (Tested with visual Basic).

Header (1 Time only)
4 byte (Long) for Set Count
4 byte (Long) for total no of tiles

For Every Set (Use set count found above)
____4 byte (Long) for Tile Count (in the set)
____1 byte (byte) for Cover Type

For Every Tile (in set, use Tile Count found for the set)
________20 byte (20 character) for tile name
________4 byte (Long) for no of Areas (in the tile)
________4 byte (Long) for no of Paths (in the tile)
________4x4=16 bytes (4xlong) for every area (if any)
________6x4=24 bytes (6xlong) for every path (if any)

For every tile, name, area count and path count is read before area and path detail information (if any)
Good stuff to have here in the forums! Thanks Phoenix 711...nice job!
Phoenix711 wrote: IMPORTANT: Tile ID for programs like Terrainview, or pathmaker, is calculated like each set has 16 tiles. For example, even the first set has 15 tiles (starting to give IDs from 0), the ID for the first tile in the second set is 16, not 15.

Or, set 157 has a starting tile ID of 2496 ((157-1) * 16), even the texture.bin has info for total of 1666 tiles.
Is the 1,666 tiles a hard limit (in other words, I am confused as to where the 1,666 tiles number came from)? Please explain more what you mean here.
Sherlock
Victurous te Saluto

User avatar
Phoenix711
Captain
Posts: 186
Joined: 2007-10-03 07:52:29
Location: Istanbul Turkey
Contact:

Re: Texture.bin issues

Post by Phoenix711 » 2008-12-13 03:34:45

No. It is only that my texture.bin is having a total of 1666 tiles (count)

157 sets and 1666 tiles.

What I mean is that, even I have 1666 tiles, my last tile ID is 2499 for now.

157 sets, 156*16 = 2496, and last set having 4 tiles, 2499 is the last tile ID.

User avatar
Sherlock
Lt. General
Posts: 1167
Joined: 2006-05-24 22:01:01
Gaming Interests: Falcon 4.0
Editing Interests: All, I (try) to edit everything.
Location: Arizona, USA

Re: Texture.bin issues

Post by Sherlock » 2008-12-13 03:46:17

Phoenix711 wrote:No. It is only that my texture.bin is having a total of 1666 tiles (count)

157 sets and 1666 tiles.

What I mean is that, even I have 1666 tiles, my last tile ID is 2499 for now.

157 sets, 156*16 = 2496, and last set having 4 tiles, 2499 is the last tile ID.
Ok, I understand now. Thanks for the clarification! :)
Sherlock
Victurous te Saluto

Post Reply

Who is online

Users browsing this forum: No registered users and 15 guests