PhyreEngine 2D textures (.phyre) (Noesis: 0.6.2/QBMS: 0.5.1 - abandoned)

Textures, recreate headers, conversions, algorithms and parsing of image files
TheUkrainianBard
Posts: 121
Joined: Sun May 01, 2016 10:06 pm

Re: PhyreEngine 2D textures (.phyre) (Noesis: 0.6.1/QBMS: 0.5.1)

Post by TheUkrainianBard »

Those are font files. While they have a GXT image, they're different from PTexture2D.
You could use something like this with QuickBMS to get that GXT image.

Code: Select all

findloc OFFSET string "GXT\x00" 0 ""
if OFFSET == ""
    cleanexit
else
    get SIZE asize
    math SIZE -= OFFSET
    get NAME basename
    string NAME + ".gxt"
    log NAME OFFSET SIZE
endif
wwwklopar
Posts: 23
Joined: Sat Dec 08, 2018 7:53 pm

Re: PhyreEngine 2D textures (.phyre) (Noesis: 0.6.1/QBMS: 0.5.1)

Post by wwwklopar »

TheUkrainianBard wrote:Those are font files. While they have a GXT image, they're different from PTexture2D.
You could use something like this with QuickBMS to get that GXT image.

Code: Select all

findloc OFFSET string "GXT\x00" 0 ""
if OFFSET == ""
    cleanexit
else
    get SIZE asize
    math SIZE -= OFFSET
    get NAME basename
    string NAME + ".gxt"
    log NAME OFFSET SIZE
endif

Thanks! This .phyre not only fonts, but also all textures... This script helps me a lot! By the way, can extracted .gxt be imported back?
Could you also look on images from PS4 version? They are not .gxt but Noesis can't open them to.
phyre2.rar
TheUkrainianBard
Posts: 121
Joined: Sun May 01, 2016 10:06 pm

Re: PhyreEngine 2D textures (.phyre) (Noesis: 0.6.1/QBMS: 0.5.1)

Post by TheUkrainianBard »

Again, those are fonts.

.phyre file is actually a game archive that has different content: one file is a texture, the other is a model, or a font etc.
This thread covers only 2D textures. I have no idea how to work with fonts. I don't know who does.

My guess is if you edit those GXTs and reimport - it will mess things up as there's description of each character (what text character it is, it's graphical position and size) in that .phyre file.
wwwklopar
Posts: 23
Joined: Sat Dec 08, 2018 7:53 pm

Re: PhyreEngine 2D textures (.phyre) (Noesis: 0.6.1/QBMS: 0.5.1)

Post by wwwklopar »

TheUkrainianBard wrote:Again, those are fonts.

.phyre file is actually a game archive that has different content: one file is a texture, the other is a model, or a font etc.
This thread covers only 2D textures. I have no idea how to work with fonts. I don't know who does.

My guess is if you edit those GXTs and reimport - it will mess things up as there's description of each character (what text character it is, it's graphical position and size) in that .phyre file.

I dont't know why but all 2D textures are in this .phyre, so i'm asking. Anyway thanks for your help.
Image
uyjulian
Posts: 11
Joined: Thu Jun 06, 2019 11:28 pm

Re: PhyreEngine 2D textures (.phyre) (Noesis: 0.6.1/QBMS: 0.5.1)

Post by uyjulian »

I have a couple of texture files which output appears to be wrong. Could you please take a look at them?
TheUkrainianBard
Posts: 121
Joined: Sun May 01, 2016 10:06 pm

PhyreEngine 2D textures (.phyre) (Noesis: 0.6.2 - fixing critical bugs only/QBMS: 0.5.1 - abandoned)

Post by TheUkrainianBard »

Code: Select all

[DEBUG] GNF parameters:
[DEBUG] dataFormat: 0x29
[DEBUG] numFormat: 0x0
[DEBUG] width: 1048
[DEBUG] height: 1048
[DEBUG] depth: 0
[DEBUG] pitch: 2048
[DEBUG] destX: 4
[DEBUG] destY: 5
[DEBUG] destZ: 6
[DEBUG] destW: 7
[DEBUG] End of GNF parameters.

Code: Select all

[DEBUG] GNF parameters:
[DEBUG] dataFormat: 0x29
[DEBUG] numFormat: 0x0
[DEBUG] width: 600
[DEBUG] height: 600
[DEBUG] depth: 0
[DEBUG] pitch: 1024
[DEBUG] destX: 4
[DEBUG] destY: 5
[DEBUG] destZ: 6
[DEBUG] destW: 7
[DEBUG] End of GNF parameters.

I didn't want to parse GNF parameters, but in these cases I have to.
Pitch (real width) and (shown) width differ too much, wasting some of PS4's RAM (~70% for that 1048x1048 texture, which is actually 2048x2048).

mon069_01_cb.dds.phyre is a cubemap. That's out of scope, sorry.
uyjulian
Posts: 11
Joined: Thu Jun 06, 2019 11:28 pm

Re: PhyreEngine 2D textures (.phyre) (Noesis: 0.6.2 - fixing critical bugs only/QBMS: 0.5.1 - abandoned)

Post by uyjulian »

Whoops, didn't mean to include that cubemap file.

Thanks for the update to the script.
fdtggf
Posts: 10
Joined: Tue Mar 06, 2018 12:58 pm

Re: PhyreEngine 2D textures (.phyre) (Noesis: 0.6.2 - fixing critical bugs only/QBMS: 0.5.1 - abandoned)

Post by fdtggf »

This files is extract from Trails of Cold Steel III Demo(steam).
Can you update the script?
sample
TheUkrainianBard
Posts: 121
Joined: Sun May 01, 2016 10:06 pm

Re: PhyreEngine 2D textures (.phyre) (Noesis: 0.6.2 - fixing critical bugs only/QBMS: 0.5.1 - abandoned)

Post by TheUkrainianBard »

According to this post by Durante, it's LZ4 compressed.
While testing with comtype_scan2, lzma_dynamic (and some other methods) returned valid output for my script.
Right now my knowledge is rusty to make even the simplest decomp QBMS script.
fdtggf
Posts: 10
Joined: Tue Mar 06, 2018 12:58 pm

Re: PhyreEngine 2D textures (.phyre) (Noesis: 0.6.2 - fixing critical bugs only/QBMS: 0.5.1 - abandoned)

Post by fdtggf »

TheUkrainianBard wrote:According to this post by Durante, it's LZ4 compressed.
While testing with comtype_scan2, lzma_dynamic (and some other methods) returned valid output for my script.
Right now my knowledge is rusty to make even the simplest decomp QBMS script.

Thanks your reply.
It look like falcom used a new encryption to compressed file.
Well, l will wait you or anyone to decompress this.
baoenzo
Posts: 9
Joined: Mon Aug 27, 2018 3:55 am

Re: PhyreEngine 2D textures (.phyre) (Noesis: 0.6.2 - fixing critical bugs only/QBMS: 0.5.1 - abandoned)

Post by baoenzo »

Does this tool support font00.fgen.phyre file in Sword Art Online Hollow Realization?
I tried it but it doesn't seem to be able to extract it.
https://drive.google.com/open?id=1v21yi ... cosThvZ8iY
GOTBLZ
Posts: 16
Joined: Tue May 09, 2017 4:21 pm

Re: PhyreEngine 2D textures (.phyre) (Noesis: 0.6.2 - fixing critical bugs only/QBMS: 0.5.1 - abandoned)

Post by GOTBLZ »

Hey,

Any chance it's an easy fix to get your tool to convert FFXII Switch textures?

Thanks.

-Edit-

Or can you simply resize PC textures and the engine reads them on switch? I'll try that and see
TheUkrainianBard
Posts: 121
Joined: Sun May 01, 2016 10:06 pm

Re: PhyreEngine 2D textures (.phyre) (Noesis: 0.6.2 - fixing critical bugs only/QBMS: 0.5.1 - abandoned)

Post by TheUkrainianBard »

That's a really strange one, it says it's for DX11, but it's in blocklinear (swizzled for Switch).
GOTBLZ
Posts: 16
Joined: Tue May 09, 2017 4:21 pm

Re: PhyreEngine 2D textures (.phyre) (Noesis: 0.6.2 - fixing critical bugs only/QBMS: 0.5.1 - abandoned)

Post by GOTBLZ »

I noticed it's PTexture2D format is NVNT_BC7_UNORM, no idea if that helps lol

-Edit-

The switch version just accepts the PC versions textures no conversion needed... lol
xr79
Posts: 5
Joined: Thu Jan 24, 2019 2:16 pm

Re: PhyreEngine 2D textures (.phyre) (Noesis: 0.6.2 - fixing critical bugs only/QBMS: 0.5.1 - abandoned)

Post by xr79 »

never mind I fixed my own problem.
Mysticus
Posts: 182
Joined: Sat Mar 02, 2019 3:24 pm

Re: PhyreEngine 2D textures (.phyre) (Noesis: 0.6.2 - fixing critical bugs only/QBMS: 0.5.1 - abandoned)

Post by Mysticus »

I hope you upgrade your plugin for Noesis someday.
So we can finally view models and animations.