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: 98
  • tex_PhyreEngine_phyre.py.zip
    6 KB · Views: 98
Last edited by master801,

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,252
Trophies
1
XP
2,731
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,252
Trophies
1
XP
2,731
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.
 

BerserkerDRE

New Member
Newbie
Joined
Aug 26, 2024
Messages
1
Trophies
0
Age
34
XP
3
Country
Colombia
Hey! thank you so much for this guide, it has worked greatly so far, but I am stuck at step 4 of exporting. The original dds.phyre file does not have a GXT hex code at all or values for 0x47 0x58 0x54 to know where to stop selecting. so I do not know what the header is for that file, if I paste the entire hex log to the modified TXG document, it just seems to overwrite everything. Any help would be appreciated!
 
Last edited by BerserkerDRE,

master801

Well-Known Member
OP
Member
Joined
Feb 24, 2011
Messages
1,252
Trophies
1
XP
2,731
Country
United States
Hey! thank you so much for this guide, it has worked greatly so far, but I am stuck at step 4 of exporting. The original dds.phyre file does not have a GXT hex code at all or values for 0x47 0x58 0x54 to know where to stop selecting. so I do not know what the header is for that file, if I paste the entire hex log to the modified TXG document, it just seems to overwrite everything. Any help would be appreciated!
What game and what texture file?
 

eviltrainer

Well-Known Member
Newcomer
Joined
Sep 13, 2009
Messages
72
Trophies
1
XP
245
Country
Brazil
Hey, I'm looking for a way to extract Dragon Quest Builders 1 Switch textures. They are NXGL.phyre files and I couldn't make these scripts work with them. Does anyone know if these scripts are compatible with the Switch version of the textures? I've attached a sample in case anyone is interested in taking a look.
 

Attachments

  • uiicon.en.NXGL.7z
    967.4 KB · Views: 5

master801

Well-Known Member
OP
Member
Joined
Feb 24, 2011
Messages
1,252
Trophies
1
XP
2,731
Country
United States
Hey, I'm looking for a way to extract Dragon Quest Builders 1 Switch textures. They are NXGL.phyre files and I couldn't make these scripts work with them. Does anyone know if these scripts are compatible with the Switch version of the textures? I've attached a sample in case anyone is interested in taking a look.
This is for PS Vita only, but the technique can still be applied since phyre is just a container.
 
  • Like
Reactions: eviltrainer

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • Xdqwerty @ Xdqwerty:
    Im downloading playnite
  • MucharSol @ MucharSol:
    guys how would I know if the screen ribbons for my N3DSXL are damaged
  • K3Nv2 @ K3Nv2:
    Just upchucked my dinner and passed out for two hours I thought my therapy days of seeing psi and bigonya kiss were over
    +1
  • BigOnYa @ BigOnYa:
    I bet its morning sickness...ancientboi gonna be so happy to be a daddy.
    +1
  • K3Nv2 @ K3Nv2:
    And you a grandfather
    +1
  • K3Nv2 @ K3Nv2:
    I forgot I owned a 7950 gpu I bet it can still do decent switch emulation
    +1
  • Xdqwerty @ Xdqwerty:
    @K3Nv2, No device I have can run switch games
  • K3Nv2 @ K3Nv2:
    I keep forgetting
  • Xdqwerty @ Xdqwerty:
    I dont have any switch game-running device bc im stupid
  • Xdqwerty @ Xdqwerty:
    im so jealous of y'all
  • Xdqwerty @ Xdqwerty:
    good night
    +1
  • K3Nv2 @ K3Nv2:
    @BigOnYa, is a 3.5 chest freezer big enough to store a wife in
  • BigOnYa @ BigOnYa:
    Depends, if just married- yes, if been married for years- no
  • K3Nv2 @ K3Nv2:
    https://www.walmart.com/ip/835682709 kind of want it for the extra space and 115 is a good deal
    +1
  • BigOnYa @ BigOnYa:
    Yea not bad, they are nice to have. I use mine alot. We buy Costco portions of meat, then brake down to small portions n freeze.
  • K3Nv2 @ K3Nv2:
    Doesn't even look big enough to store a pizza in though
  • BigOnYa @ BigOnYa:
    20.60 x 22.20 x 33.50 Inches, size of a dishwasher, or newlywed wife.
  • K3Nv2 @ K3Nv2:
    Maybe if you live in Africa and buy her for two pigs
    +1
  • K3Nv2 @ K3Nv2:
    I got ancientboi for a calf that way
  • BigOnYa @ BigOnYa:
    Good deal. His SS will pay for that calf in no time.
  • K3Nv2 @ K3Nv2:
    His last SS idea didn't pan out we won
  • BigOnYa @ BigOnYa:
    I still can't play Switch games on my tablet. I was hoping the CPU fairy would of snuck in my house overnight and upgraded me, but nope.
  • K3Nv2 @ K3Nv2:
    Turns out Vizio got sued by Nintendo over that
  • K3Nv2 @ K3Nv2:
    Neato got approved to use Affirm now I can play switch games
    K3Nv2 @ K3Nv2: Neato got approved to use Affirm now I can play switch games