Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

[Vita] Hyperdimension Neptunia - DDS to TID / TID to DDS

Featured Replies

  • Author
  • Localization

qwaert, posted Fri Apr 27, 2018 3:16 am (34405)


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,
  • Author
  • Localization

TheUkrainianBard, posted Fri Apr 27, 2018 11:24 am (34408)


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.

Image

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).

neptunia_ideafactory_tid2dds_dds2tid.zip

tex_IdeaFactory_tid.zip

  • Author
  • Localization

qwaert, posted Sat Apr 28, 2018 2:53 am (34440)


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):

Image
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:
Image

Original Image:
Image

Would anyone have a tool to unswizzle and swizzle the above images? If more files are needed, I can provide them.
  • Author
  • Localization

TheUkrainianBard, posted Sat Apr 28, 2018 9:45 am (34453)


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.
  • Author
  • Localization

qwaert, posted Sat Apr 28, 2018 6:08 pm (34466)


I've attemtped to change the flag to 0x98, but the image is still scrambled.
I have attached the .tid file also (in zip).

Image

I repacked the files, and it worked, but the image is like the morton swizzled image (1st image).
Image
  • Author
  • Localization

TheUkrainianBard, posted Sat Apr 28, 2018 6:20 pm (34467)


You've changed the wrong value though. Flags are at 0x03.
I've also updated my first reply.
  • Author
  • Localization

qwaert, posted Sat Apr 28, 2018 8:46 pm (34472)


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
  • Author
  • Localization

happydance, posted Thu May 14, 2020 10:07 am (56733)


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
  • Author
  • Localization

Origa, posted Fri Jul 31, 2020 1:29 pm (57827)


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?
Image
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.