READ THE RULES: Click here

Follow us on Facebook: https://www.facebook.com/xentax/ :)

Resident Evil 4 .GNF File! [PS4]

Get your graphics formats figures out here! Got details for others? Post here!
User avatar
Scofield
n00b
Posts: 13
Joined: Sat Jul 12, 2014 10:27 pm
Has thanked: 5 times

Resident Evil 4 .GNF File! [PS4]

Post by Scofield » Sun Feb 17, 2019 3:35 pm

Hi all, and @Acewell I need Noesis python script :)

Actually, it supports, but the picture goes wrong.

Sample File: https://www87.zippyshare.com/v/LxgGq3lq/file.html

User avatar
Acewell
VIP member
VIP member
Posts: 1263
Joined: Wed Nov 05, 2008 12:16 pm
Has thanked: 2385 times
Been thanked: 729 times

Re: Resident Evil 4 .GNF File! [PS4]

Post by Acewell » Mon Feb 18, 2019 12:04 am

Noesis has native support for PS4 gnf textures and opens that gnf file no problem. :D
1280x720 BC3(dxt5)

User avatar
Scofield
n00b
Posts: 13
Joined: Sat Jul 12, 2014 10:27 pm
Has thanked: 5 times

Re: Resident Evil 4 .GNF File! [PS4]

Post by Scofield » Mon Feb 18, 2019 12:57 am

Acewell wrote:
Mon Feb 18, 2019 12:04 am
Noesis has native support for PS4 gnf textures and opens that gnf file no problem. :D
1280x720 BC3(dxt5)
Here problem. The part I marked repeated section :)

Image

User avatar
Acewell
VIP member
VIP member
Posts: 1263
Joined: Wed Nov 05, 2008 12:16 pm
Has thanked: 2385 times
Been thanked: 729 times

Re: Resident Evil 4 .GNF File! [PS4]

Post by Acewell » Mon Feb 18, 2019 2:40 am

yeah it could be a problem with how Noesis handles non power of 2 gnf images or something.
any script i make to open this gnf will be overridden by Noesis native plugins, so no-go there. (:
you can use daemon1's RawTex tool to get the image without data repeat. :D

use these settings:
Offset = 0x100
width = 1280
height = 720
BC3 (DXT5)
PS4 swizzle

User avatar
Scofield
n00b
Posts: 13
Joined: Sat Jul 12, 2014 10:27 pm
Has thanked: 5 times

Re: Resident Evil 4 .GNF File! [PS4]

Post by Scofield » Mon Feb 18, 2019 10:10 am

Acewell wrote:
Mon Feb 18, 2019 2:40 am
yeah it could be a problem with how Noesis handles non power of 2 gnf images or something.
any script i make to open this gnf will be overridden by Noesis native plugins, so no-go there. (:
you can use daemon1's RawTex tool to get the image without data repeat. :D

use these settings:
Offset = 0x100
width = 1280
height = 720
BC3 (DXT5)
PS4 swizzle
Yes I know that.But this troublesome Noesis Batch process is very useful. :)

How do I extract hundreds of files :ninja:

xperiagenerator
n00b
Posts: 10
Joined: Wed Dec 17, 2014 1:10 pm

Re: Resident Evil 4 .GNF File! [PS4]

Post by xperiagenerator » Wed Mar 20, 2019 4:29 pm

Acewell wrote:
Mon Feb 18, 2019 2:40 am
yeah it could be a problem with how Noesis handles non power of 2 gnf images or something.
any script i make to open this gnf will be overridden by Noesis native plugins, so no-go there. (:
you can use daemon1's RawTex tool to get the image without data repeat. :D

use these settings:
Offset = 0x100
width = 1280
height = 720
BC3 (DXT5)
PS4 swizzle
Hi

Do you think that it will be possible to make a noesis script for GNF files not power of 2 if we change GNF header and extention to something else?

ex GNFmagicid.gnf to XYZmagicid.xyz
001.rar
It will be usefull to have such noesis script to make command line automation
You do not have the required permissions to view the files attached to this post.

User avatar
Acewell
VIP member
VIP member
Posts: 1263
Joined: Wed Nov 05, 2008 12:16 pm
Has thanked: 2385 times
Been thanked: 729 times

Re: Resident Evil 4 .GNF File! [PS4]

Post by Acewell » Thu Mar 21, 2019 6:46 am

okay here is 3rd and hopefully final draft of Noesis python script to open your custom gnf with changed magic and extension. :D
*script updated June 6, 2019*
tex_ResidentEvil4_PS4_xyz.zip
supports PS4 swizzled rgba32, dxt1, dxt3, dxt5, BC4, BC5, BC6 and BC7.
the results are the same as what daemon1's RawTex tool spits out.
i used TheUkrainianBard's "imageFromPeanoOrder" function so i could bypass using Noesis built in PS4 unswizzle.
i also had to refer to parts of his "Phyre Engine" python script to get that working properly, so thanks to him for this. :D


and this bms script will automate the change to the header magic and extension
of your non power of 2 gnf images and prepare them for the Noesis script above. :D

Code: Select all

# script for QuickBMS http://aluigi.altervista.org/quickbms.htm

get SIZE asize
math SIZE - 3
get NAME basename
string NAME + .xyz
set memory_file string "XYZ"
append 
log NAME 0x0 0x3 -1
log NAME 0x3 SIZE
append
You do not have the required permissions to view the files attached to this post.
Last edited by Acewell on Thu Jun 06, 2019 12:31 pm, edited 4 times in total.

xperiagenerator
n00b
Posts: 10
Joined: Wed Dec 17, 2014 1:10 pm

Re: Resident Evil 4 .GNF File! [PS4]

Post by xperiagenerator » Thu Mar 21, 2019 8:57 am

Thankyou so much
here you go with new formats
samples.rar
You do not have the required permissions to view the files attached to this post.

xperiagenerator
n00b
Posts: 10
Joined: Wed Dec 17, 2014 1:10 pm

Re: Resident Evil 4 .GNF File! [PS4]

Post by xperiagenerator » Thu Mar 21, 2019 10:18 am

Can you add support for GNF files with zeroes padding in header?
thankyou
here you go with samples (those are the same as the previous ones but with zeroes padding in the header)
samplesHeaderLong.rar
Offset
https://imgur.com/a/qSEHVBk
You do not have the required permissions to view the files attached to this post.

User avatar
Acewell
VIP member
VIP member
Posts: 1263
Joined: Wed Nov 05, 2008 12:16 pm
Has thanked: 2385 times
Been thanked: 729 times

Re: Resident Evil 4 .GNF File! [PS4]

Post by Acewell » Fri Mar 22, 2019 12:21 am

okay i updated the Noesis script here to try and open your latest samples. :D
https://forum.xentax.com/viewtopic.php? ... 20#p149820

there seems to be issues with BC4, BC5 and BC6 unorm and snorm types,
i will look into these more later and try to come up with a better solution.

TheUkrainianBard
ultra-n00b
Posts: 9
Joined: Wed Jun 28, 2017 7:51 pm
Has thanked: 3 times
Been thanked: 10 times

Re: Resident Evil 4 .GNF File! [PS4]

Post by TheUkrainianBard » Fri Mar 22, 2019 6:57 pm

Here's my take on this.
Somehow I ended up with the same behaviour for BCns as Noesis.
SNorms - seems like a (channel_value+0x80) & 0xFF fix. - UPD: turns out no.
SRGBs... I don't think Noesis has gamma correction.

UPD: deleted, see Acewell's post
Last edited by TheUkrainianBard on Sun Mar 24, 2019 11:56 am, edited 3 times in total.

xperiagenerator
n00b
Posts: 10
Joined: Wed Dec 17, 2014 1:10 pm

Re: Resident Evil 4 .GNF File! [PS4]

Post by xperiagenerator » Sat Mar 23, 2019 9:41 am

Great work
Thankyou both :)

User avatar
Acewell
VIP member
VIP member
Posts: 1263
Joined: Wed Nov 05, 2008 12:16 pm
Has thanked: 2385 times
Been thanked: 729 times

Re: Resident Evil 4 .GNF File! [PS4]

Post by Acewell » Sun Mar 24, 2019 3:11 am

okay i updated my script hopefully for the final time here: :D
https://forum.xentax.com/viewtopic.php? ... 20#p149820
i am happy with the results, they are the same as what daemon1's RawTex tool spits out.
as usual, it is never my intention to reproduce official specs, but to get satisfatory
results from the least amount of info while utilizing existing methods. :D

xperiagenerator
n00b
Posts: 10
Joined: Wed Dec 17, 2014 1:10 pm

Re: Resident Evil 4 .GNF File! [PS4]

Post by xperiagenerator » Sun Mar 24, 2019 11:05 am

Other Samples for you if you are interested into add support for them.

http://www.mediafire.com/file/s0611p3j4 ... w02xyz.rar

JosouKitsune
n00b
Posts: 11
Joined: Mon Jun 26, 2017 2:01 am
Has thanked: 4 times
Been thanked: 3 times

Re: Resident Evil 4 .GNF File! [PS4]

Post by JosouKitsune » Tue Jun 04, 2019 7:45 am

Hello I'm having an issue related to the GNF being repeated, but with a different game GinTama Rumble.
See this GNF sample file contains multiple textures, but once converted to XYZ it would only read the first one, since the default script already has the splitting function, I would guess it is a matter of combining the 2, yeah I know it's easier said than done, I honestly would try to do more, but I don't know where the default script is located.

Using RE4 script
Image

Using Noesis GNF default script
Image
Image

Image
Last edited by JosouKitsune on Tue Jun 04, 2019 10:36 am, edited 2 times in total.

Post Reply