Hello all,
I'm trying to mod some graphic files that are a TID file and that has a DXT1 compression
I successfully extracted the png file from the tid file using nr2_tidtool v1.0, but the problem is getting the file back into a compressed DDS (DXT1) file with a TID header using hex.
I have attempted to add the modified png to a dds file with dxt1 compression using paint.net and dds export, but unsure how to create a tid file from it. I tried using hex editor by copy/paste the header, but since the file sizes are different sizes, the resulting png is a scrambled image.
I have attached the original tid file, and a proper dds file created.
Hope someone may be able to give some tips for a tid to dds conversion, and dds to tid conversion; I believe the header is at Offset 0x00 to 0x7F, and I believe that is all that would need to be changed.
Regards,
[Vita] Hyperdimension Neptunia - DDS to TID / TID to DDS
-
- Posts: 4
- Joined: Thu Apr 26, 2018 10:34 pm
-
- Posts: 121
- Joined: Sun May 01, 2016 10:06 pm
Re: [Vita] Hyperdimension Neptunia - DDS to TID / TID to DDS
It's a very simple format.
Magic is 3 bytes at 0x0, "TID"
Flags are 1 byte at 0x3, 0x80 is mandatory; others are: 0x1 - big endian header; 0x2 - ARGB instead of RGBA; 0x4 - Morton order swizzling; 0x8 - vertical flip; 0x10 - I've found no use for this
Width is 4 bytes at 0x44
Height is 4 bytes at 0x48
Data size is 4 bytes at 0x58
Format is 4 bytes at 0x64, if it's 0 - it's either RGBA or ARGB (see Flags)
Image data is at 0x80 till EOF
If you want to make a TID, just copy first 128 bytes from existing one and copy your new image data (if you haven't changed width/height/format).
I remember that Vita really hates RGBA, so set that 0x2 flag and make your image data ARGB. No need to do so for DXT.
Usage for DDS2TID: place your DDS file in the same folder as it's TID source; run QuickBMS; select "neptunia_ideafactory_dds2tid.bms"; navigate and select the DDS file; navigate and select the same folder (input folder is the output folder).
Magic is 3 bytes at 0x0, "TID"
Flags are 1 byte at 0x3, 0x80 is mandatory; others are: 0x1 - big endian header; 0x2 - ARGB instead of RGBA; 0x4 - Morton order swizzling; 0x8 - vertical flip; 0x10 - I've found no use for this
Width is 4 bytes at 0x44
Height is 4 bytes at 0x48
Data size is 4 bytes at 0x58
Format is 4 bytes at 0x64, if it's 0 - it's either RGBA or ARGB (see Flags)
Image data is at 0x80 till EOF
If you want to make a TID, just copy first 128 bytes from existing one and copy your new image data (if you haven't changed width/height/format).
I remember that Vita really hates RGBA, so set that 0x2 flag and make your image data ARGB. No need to do so for DXT.
Usage for DDS2TID: place your DDS file in the same folder as it's TID source; run QuickBMS; select "neptunia_ideafactory_dds2tid.bms"; navigate and select the DDS file; navigate and select the same folder (input folder is the output folder).
Last edited by TheUkrainianBard on Sat Apr 28, 2018 6:41 pm, edited 5 times in total.
-
- Posts: 4
- Joined: Thu Apr 26, 2018 10:34 pm
Re: [Vita] Hyperdimension Neptunia - DDS to TID / TID to DDS
Thank you for your help understanding the TID headers and getting started!
I took your recommendation to change the first 128 bytes from the dds file to the tid file, but the image now looks like this (when extracted):
I tried to edit the morton swizzle hex as you said, but unfortunately nothing happened, unless I am doing it incorrectly. I can provide the tools I am using if it would help?
Now, when I change the first 128 characters of the original .tid file do the dds header, I get the following:
DDS - Swizzle:
Original Image:
Would anyone have a tool to unswizzle and swizzle the above images? If more files are needed, I can provide them.
I took your recommendation to change the first 128 bytes from the dds file to the tid file, but the image now looks like this (when extracted):
I tried to edit the morton swizzle hex as you said, but unfortunately nothing happened, unless I am doing it incorrectly. I can provide the tools I am using if it would help?
Now, when I change the first 128 characters of the original .tid file do the dds header, I get the following:
DDS - Swizzle:
Original Image:
Would anyone have a tool to unswizzle and swizzle the above images? If more files are needed, I can provide them.
-
- Posts: 121
- Joined: Sun May 01, 2016 10:06 pm
Re: [Vita] Hyperdimension Neptunia - DDS to TID / TID to DDS
First image looks normal for a Morton order unswizzling done one too many times.
Second is what it looks like if you don't unswizzle a swizzled image.
Try setting 0x98 for Flags in the source of your post's first image.
Maybe Vita will eat it up.
Second is what it looks like if you don't unswizzle a swizzled image.
Try setting 0x98 for Flags in the source of your post's first image.
Maybe Vita will eat it up.
-
- Posts: 4
- Joined: Thu Apr 26, 2018 10:34 pm
Re: [Vita] Hyperdimension Neptunia - DDS to TID / TID to DDS
I've attemtped to change the flag to 0x98, but the image is still scrambled.
I have attached the .tid file also (in zip).
I repacked the files, and it worked, but the image is like the morton swizzled image (1st image).
I have attached the .tid file also (in zip).
I repacked the files, and it worked, but the image is like the morton swizzled image (1st image).
-
- Posts: 121
- Joined: Sun May 01, 2016 10:06 pm
Re: [Vita] Hyperdimension Neptunia - DDS to TID / TID to DDS
You've changed the wrong value though. Flags are at 0x03.
I've also updated my first reply.
I've also updated my first reply.
-
- Posts: 4
- Joined: Thu Apr 26, 2018 10:34 pm
Re: [Vita] Hyperdimension Neptunia - DDS to TID / TID to DDS
Ah my mistake!
The tis2dds / dds2tid bms works very well; I tried it in game and it came out perfectly.
Thank you very much!
I'll let you know if I run into any snags
The tis2dds / dds2tid bms works very well; I tried it in game and it came out perfectly.
Thank you very much!
I'll let you know if I run into any snags
-
- Posts: 81
- Joined: Sun Jul 10, 2016 11:07 am
Re: [Vita] Hyperdimension Neptunia - DDS to TID / TID to DDS
I know this is an old thread, but would it be possible to add mipmaps on the export and import of the BMS scripts?
Attached a file with .tid that have mipmaps
Attached a file with .tid that have mipmaps
-
- Posts: 9
- Joined: Tue Jul 28, 2020 11:59 pm
Re: [Vita] Hyperdimension Neptunia - DDS to TID / TID to DDS
Hello all. I need help also with .tid
Megadimension Neptunia VII for Nintendo Switch using .tid with BC7. Maybe someone can add support BC7 to this scripts?
Megadimension Neptunia VII for Nintendo Switch using .tid with BC7. Maybe someone can add support BC7 to this scripts?