How to import and export a .dds.phyre texture

Before starting:
  • This guide only mentions use of dds.phyre files that are swizzled and ARGB8. Other texture types are not included and may (or rather, will) end in unexpected behavior if used.
    • This can be checked by looking at the "Texture Base Format" of the GXT file in the .dds.phyre file.
  • This guide assumes you're using Windows.
    • Linux users can figure out how to do it themselves. It's not difficult.
  • If the image you imported was flipped vertically, it needs to still be flipped vertically when exported. Otherwise it'll look broken if not wonky.




Importing an image from .dds.phyre file:

Tools needed:
  • QuickBMS
  • PhyreEngine 2D Textures script - Attached PhyreEngine_PTexture2D_phyre.bms.zip
  • Scarlet

QuickBMS method:
  1. Download QuickBMS and extract it
  2. Download the attached file PhyreEngine_PTexture2D_phyre.bms.zip and extract it
  3. Put the extracted PhyreEngine_PTexture2D_phyre.bms script file in the same directory as QuickBMS.
  4. In the current directory of QuickBMS, open up cmd/terminal and use the command
    Code:
    quickbms.exe PhyreEngine_PTexture2D_phyre.bms <YOUR_TEXTURE_FILE>.dds.phyre
  5. Grab the extracted .gxt file from the previous step and copy it over to Scarlet's directory.
  6. In Scarlet's directory, open cmd/terminal and use the command
    Code:
    ScarletTestApp.exe <YOUR_EXTRACTED_GXT_FILE>.gxt
  7. You now have the extracted texture file in .png format.




Exporting an image to .dds.phyre file:

Tools needed:
  • psp2gxt
  • GIMP, Photoshop, or some image editor/processor supporting tga
  • A hex editor (Hexinator is recommended)

Instructions:
  1. Get the texture you ripped from the .dds.phyre file (that is currently in .png format) and import it into your image processor / editor
  2. Export as .tga file. If the .png has transparency, ensure the exported .tga file is still transparent - The finished .dds.phyre file will look like a blocky white mess otherwise.
  3. In the current directory of psp2gxt, open up cmd/terminal and use the previously exported .tga file as the input file. So, the command should look something similar to this:
    Code:
    psp2gxt.exe -i <YOUR_TGA_FILE>.tga -o <YOUR_OUT_FILE>.gxt
  4. Open the original .dds.phyre file in a hex editor and copy the phyre container's header. This should be all the way from 0x0000000 to before "GXT" (0x47 0x58 0x54)
  5. Open the (edited) .gxt file (exported from psp2gxt) in the hex editor
  6. Paste the bytes copied from the original .dds.phyre file (in step 4) and insert at the beginning of the .gxt file. Make sure you do not overwrite the bytes from the .gxt file.
  7. Save as a new file and name it whatever the original .dds.phyre file was




TODO:
  • Mention DXT formats
  • Add image instructions to follow along with

Thanks to:
  • TheUkrainianBard for the Phyre scripts
  • xdanieldzd for Scarlet
  • Everyone else that worked on reversing the Phyre Engine container and GXT texture format

Revised:
  • 4/11/2019
  • 5/19/2023 - Formatting
  • 5/22/2023 - Formatting, add missing instructions
  • 6/4/2023 - Remove link to infected ZenHAX website and add local mirrors
 

Attachments

  • PhyreEngine_PTexture2D_phyre.bms.zip
    7.8 KB · Views: 56
  • tex_PhyreEngine_phyre.py.zip
    6 KB · Views: 60
Last edited by master801,
  • Like
Reactions: Serph-DDS

dagashiya

New Member
Newbie
Joined
Jun 4, 2023
Messages
2
Trophies
0
Age
28
XP
27
Country
Indonesia
Sorry for bothering you, but could you upload the script from zenhax?, zenhax have been hacked and i can't download the attachment, thanks
error2.png
error.png
 

master801

Well-Known Member
OP
Member
Joined
Feb 24, 2011
Messages
1,135
Trophies
1
XP
2,476
Country
United States
Sorry for bothering you, but could you upload the script from zenhax?, zenhax have been hacked and i can't download the attachment, thanksView attachment 375832View attachment 375833
RIP ZenHAX. No wonder the website looked like it shit itself.

Anyway, I've attached the QuickBMS and Noesis versions of the script to the main post. They also contain an edit / fix I made for the PS Vita version of Super Heroine Chronicle.
 
  • Like
Reactions: dagashiya

BirdBoiEagle

New Member
Newbie
Joined
Sep 28, 2023
Messages
1
Trophies
0
Age
25
XP
12
Country
Netherlands
RIP ZenHAX. No wonder the website looked like it shit itself.

Anyway, I've attached the QuickBMS and Noesis versions of the script to the main post. They also contain an edit / fix I made for the PS Vita version of Super Heroine Chronicle.
Sorry to bother, but I saw you mentioned the Noesis version, do I just put the .py in the scripts folder? because it's giving me an error, apologies for the possibly dumb question, I don't work with these files a lot ^^;
 

master801

Well-Known Member
OP
Member
Joined
Feb 24, 2011
Messages
1,135
Trophies
1
XP
2,476
Country
United States
Sorry to bother, but I saw you mentioned the Noesis version, do I just put the .py in the scripts folder? because it's giving me an error, apologies for the possibly dumb question, I don't work with these files a lot ^^;
File tex_PhyreEngine_phyre.py should go into <noesis directory>/plugins/python directory.

Full path should be <noesis directory>/plugins/python/tex_PhyreEngine_phyre.py.

Last known working version of Noesis tested with is v4466.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    K3Nv2 @ K3Nv2: So negative