A Community discussion forum for Halo Custom Edition, Halo 2 Vista, Portal and Halo Machinima

Home  Search Register  Login Member ListRecent Posts
  
 
»Forums Index »Halo Custom Edition (Bungie/Gearbox) »Halo CE General Discussion »[RELEASE] Halo TeXource: Source bitmap ripper

Author Topic: [RELEASE] Halo TeXource: Source bitmap ripper (26 messages, Page 1 of 1)
Moderators: Dennis

MosesofEgypt
Joined: Apr 3, 2013


Posted: Feb 6, 2017 01:58 AM    Msg. 1 of 26       
So I spent about 2 hours and wrote this. I'm just gonna copy and paste what my deviantart page says:


TeXource is capable of ripping the original image data from a directory of Halo 1 bitmap tags, turning them into tga images, and writing them to a data directory. This tool is useful for getting back the original uncompressed textures from tags that shipped with the Halo Editing Kit, or tags that users have made(assuming they did not remove the compressed plate data from them). You will be informed If a bitmap doesnt have the original uncompressed image, if the uncompressed image is blank, or if any errors occur while trying to extract it.

DOWNLOAD: chief-01.deviantart.com/art/Halo-TeXource-661883528
Requires Python 3.3 or higher.


If it cant load any tags or create any files, just locate your python installation, right click python.exe, go into its properties, and set it to run as an administrator.

Also, the source files it makes are tga images because tga uses a simple 18 byte header that i can easily make. Tiff isnt simple, and i dont yet know how to make working tiff images.
Edited by MosesofEgypt on Feb 6, 2017 at 03:15 AM


DeadHamster
Joined: Jun 8, 2014


Posted: Feb 6, 2017 02:07 AM    Msg. 2 of 26       
Link doesn't have a download.

Also does this use Python, or is it written in something that can be standalone?


MosesofEgypt
Joined: Apr 3, 2013


Posted: Feb 6, 2017 02:33 AM    Msg. 3 of 26       
Sorry about that, its fixed. Also yeah, it requires python. Most things I make will. I dont see what the problem is, its just like installing java, and this allows it to run on any operating system with python.


OrangeJuice
Joined: Jan 29, 2009

I laugh at people who put STUDIOS in their name.


Posted: Feb 6, 2017 02:44 AM    Msg. 4 of 26       
darn.


...Well if there's ever a good time to teach myself python, I guess it'll be today


DeadHamster
Joined: Jun 8, 2014


Posted: Feb 6, 2017 02:50 AM    Msg. 5 of 26       
Yeah, I hate Java too.

Installing it to give it a shot.


Super Flanker
Joined: Oct 5, 2012

The length of your life depends on my aim.


Posted: Feb 6, 2017 02:59 PM    Msg. 6 of 26       
Wait it can re-evaluate a sprite sheet to it's original form?

Edited by Super Flanker on Feb 6, 2017 at 03:00 PM


MosesofEgypt
Joined: Apr 3, 2013


Posted: Feb 6, 2017 04:54 PM    Msg. 7 of 26       
It can rip the original, uncompressed, 32bit color tiff, single layer, image from a bitmap tag. If you ran my bitmap optimizer on a tag, that will have been removed, but for other tags it will likely still be there. This data is removed when a map is compiled, so you cant do anything about ripped tags, but if someone released a tag pack for example, you could rip the original sprite sheets to a tga file.

What I mean by single layer is that, ya know how in photoshop you can work with multiple layers? Im sure thats a thing everyone here does. Well, the uncompressed image data this thing extracts is just the tiff if it were flattened to one layer.


SBB_Michelle
Joined: Nov 4, 2015

Dumb, sometimes..


Posted: Feb 7, 2017 05:06 AM    Msg. 8 of 26       
I used flatten my tifs to make the bitmap tags smaller.

Now I just do it out of habbit.


Masters1337
Joined: Mar 5, 2006

halonaminator's unfortunate idol


Posted: Feb 7, 2017 06:27 AM    Msg. 9 of 26       
Tool flattens them anyway... the layers shouldnt effect the size of the tag. And certainly not once compiled into a map.


SOI_7
Joined: Mar 23, 2012

Tatsumaki best waifu


Posted: Feb 7, 2017 06:38 AM    Msg. 10 of 26       
Rather than having them flattened in a single layer, I'd like it to export bitmaps with multiple images as a single sheet


MosesofEgypt
Joined: Apr 3, 2013


Posted: Feb 7, 2017 03:01 PM    Msg. 11 of 26       
I dont think you understand soi, it literally just opens the bitmap tag, looks for the compressed tiff image, decompresses it with zlib, checks if it has an alpha channel, writes a tga header with the bits-per-pixel, width, height, and alpha depth, and thats it. The image it extracts is exactly what was in the tiff file when it was compiled. Im not doing any post-processing on it.


SOI_7
Joined: Mar 23, 2012

Tatsumaki best waifu


Posted: Feb 8, 2017 07:33 AM    Msg. 12 of 26       
Yeah, looks like I completely misunderstood. My bad. Still looks impressive what you can pull out with Python


il Duce Primo
Joined: Apr 22, 2007

CMT Team Leader


Posted: Feb 10, 2017 09:14 PM    Msg. 13 of 26       
Make it extract to a tiff


MosesofEgypt
Joined: Apr 3, 2013


Posted: Feb 11, 2017 09:33 AM    Msg. 14 of 26       
Quote: --- Original message by: il Duce Primo
Make it extract to a tiff

RTFP. IOW, no.
Edited by MosesofEgypt on Feb 11, 2017 at 09:34 AM


Super Flanker
Joined: Oct 5, 2012

The length of your life depends on my aim.


Posted: Feb 11, 2017 11:11 AM    Msg. 15 of 26       
Quote: --- Original message by: MosesofEgypt

Quote: --- Original message by: il Duce Primo
Make it extract to a tiff

RTFP. IOW, no.
Edited by MosesofEgypt on Feb 11, 2017 at 09:34 AM


That's super rude. Douche isn't exactly the most desirable human being in the world but he does grow on you.


Jesse
Joined: Jan 18, 2009

Discord: Jesse#4500


Posted: Feb 11, 2017 02:45 PM    Msg. 16 of 26       
this tool is awesome, great work as always. It has allowed me to further improve my skills :o


MosesofEgypt
Joined: Apr 3, 2013


Posted: Feb 11, 2017 05:28 PM    Msg. 17 of 26       
I'm just getting tired of people blatantly telling me to do something when I've explained why I'm not. He knew that it extracts to something other than tiff and he knew why I didnt make it do that(and if he didnt then thats why rtfp), and decided he'd tell me to anyway. That's rude to me(or disrespectfully uninformed in the rtfp case). I dont ask to be praised or anything, but I DO expect people to be respectful enough to read my synopsis of my programs before they make suggestions, and not try to tell me "hey, do this anyway".

Right now I'm working on an update to the bitmap optimizer/converter that makes it over 100x faster(it converted a 4096x4096 dxt5 bitmap with all mipmaps to an 85mb A8R8G8B8 bitmap in 3.5 seconds). I'll also be using this to give Mozzarilla the ability to display bitmaps.
Edited by MosesofEgypt on Feb 11, 2017 at 05:33 PM


Super Flanker
Joined: Oct 5, 2012

The length of your life depends on my aim.


Posted: Feb 12, 2017 07:46 AM    Msg. 18 of 26       
Quote: --- Original message by: MosesofEgypt

I'm just getting tired of people blatantly telling me to do something when I've explained why I'm not.


Whilst I can empathise with that I still wouldn't really expect that sort of behaviour from the likes of you.

But I'm not your mammy so.....looking forward to updates.


MosesofEgypt
Joined: Apr 3, 2013


Posted: Feb 12, 2017 01:40 PM    Msg. 19 of 26       
Yeah, i did go a bit overboard. Ive been feeling like crap the past few days due to lack of sleep, so ive been pretty irritable. Sorry for blowing up, duce.


il Duce Primo
Joined: Apr 22, 2007

CMT Team Leader


Posted: Feb 12, 2017 01:41 PM    Msg. 20 of 26       
Expect nothing and you'll be better off. And assume nothing and you won't be an asshole. I didn't read your full post or fine print at the bottom until now. I still think you should make it extract to a tiff. Jump off a cliff and you'll get much respect.

EDIT: Sorry you posted right when i was. it's k you can stay at the top of the cliff.
Edited by il Duce Primo on Feb 12, 2017 at 01:41 PM


Super Flanker
Joined: Oct 5, 2012

The length of your life depends on my aim.


Posted: Feb 12, 2017 04:24 PM    Msg. 21 of 26       
Quote: --- Original message by: il Duce Primo

Expect nothing and you'll be better off. And assume nothing and you won't be an asshole. I didn't read your full post or fine print at the bottom until now. I still think you should make it extract to a tiff. Jump off a cliff and you'll get much respect.

EDIT: Sorry you posted right when i was. it's k you can stay at the top of the cliff.
Edited by il Duce Primo on Feb 12, 2017 at 01:41 PM


I'm surprised A-hole isn't counted as profanity here.
Edited by Super Flanker on Feb 16, 2017 at 06:00 PM


Banshee64
Joined: Dec 4, 2012

oify


Posted: Feb 16, 2017 12:31 AM    Msg. 22 of 26       
Extremely useful, Thank you.


MosesofEgypt
Joined: Apr 3, 2013


Posted: Apr 6, 2017 09:13 PM    Msg. 23 of 26       
Just upgraded TeXource to be able to extract from H2Vista bitmaps as well.



Have fun.


DeadHamster
Joined: Jun 8, 2014


Posted: Apr 6, 2017 09:23 PM    Msg. 24 of 26       
Quote: --- Original message by: MosesofEgypt
Just upgraded TeXource to be able to extract from H2Vista bitmaps as well.

http://i1151.photobucket.com/albums/o630/MosesofEgypt/test_zpszmeua3qn.png~original

Have fun.



H2V?


OrangeJuice
Joined: Jan 29, 2009

I laugh at people who put STUDIOS in their name.


Posted: Apr 6, 2017 09:26 PM    Msg. 25 of 26       
Ohohohohoohoooo excellennnntttttt

- - - - - -

-snip dumb question-
Edited by OrangeJuice on Apr 6, 2017 at 09:39 PM


MosesofEgypt
Joined: Apr 3, 2013


Posted: Apr 7, 2017 01:32 PM    Msg. 26 of 26       
Just updated it again. Some of the images weren't extracting because some of the bitmaps have a different size for some of their structs. Turns out this structure I've been trying to figure out its meaning is almost certainly a versioning structure. It specifies the version of the struct, the number of them, and their byte size. This is sorta bad news for me since it means that I've gotta account for a bunch of different versions of - ya know what, I'll just paste that part of the skype chat in here:


Masterz
so looks like the carbine cant be extracted
couldn't decompress it

Moses
turns out the tag was missing the extra 4 bytes in the body that were added when
they went from halo1 to halo2.
the tags structure is actually different than it should be!
this is interesting. this means that they had different versions for the tags and
something in the tag said which version it was.
!!!!!!!!!!!
that's what that tbfd is.
it really is a tag_block_field_definition.
the last 4 bytes are the size of the block. that carbine has it set to 108(the
number of bytes in halo 1 bitmaps) and most of the other halo 2 tags have it at 112.
it IS a versioning structure!

Masterz
curiously.. the carbine reticule was the last one to be added to the sprite sheet.
maybe the carbine was the second to last weapon added?
hence the discrepancy?

Moses
this is gonna be kinda annoying.
i did a scan of the tags you sent me and logged all the unknown bytes in the tbfd
structures to try and figure out what they mean.
i'm thinking they're either an enumerator or flags.
and that they might specify which structure version the reflexive is for.
the thing is though, if they had a bunch of different structures, then i'd need to
know how to read each one and set up a switch to be able to properly read all tags.
i really hope they all got converted to the same final version when compiled into
a map, or else extracting tags would be a god damn pain.
i think it would though, since opening that carbine tag and resaving it upgraded it
to the new version.
but yeah, i was originally really scratching my head at what the hell the purpose
of those tbfd structures could be. now I know. This way they could work with any
version of tags without having to constantly upgrade them to incorporate any
changes to the engine.
a variant of this is probably still used in the current engine. that's prolly why
the new versions of their editors can make and work with all these old tags.

Edited by MosesofEgypt on Apr 7, 2017 at 01:37 PM

 

 
Previous Older Thread    Next newer Thread





Time: Sun April 30, 2017 8:32 PM 234 ms.
A Halo Maps Website