Important information: this site is currently scheduled to go offline indefinitely by end of the year.

PS Vita GXT to PNG conversion

Get your graphics formats figures out here! Got details for others? Post here!
Post Reply
WinkelHime
ultra-n00b
Posts: 4
Joined: Fri Aug 05, 2016 10:01 pm
Has thanked: 2 times

PS Vita GXT to PNG conversion

Post by WinkelHime »

I extracted CG files from "Eyuu Senki" PS Vita version, but they are in ".gxt" format.
Need help to convert them in png ( tried GXT Converter and Neptunia/Senran kagura gxt sripts for Noesis, no use).
You do not have the required permissions to view the files attached to this post.
chrrox
Moderator
Posts: 2602
Joined: Sun May 18, 2008 3:01 pm
Has thanked: 57 times
Been thanked: 1422 times

Re: PS Vita GXT to PNG conversion

Post by chrrox »

Image

elif texInfo[8] == 0x85:
#texFmt = noesis.NOESISTEX_DXT1
texFmt = noesis.NOESISTEX_RGBA32
texData = rapi.imageFromMortonOrder(texData, texInfo[9]>>1, texInfo[10]>>2, 4)
texData = rapi.imageDecodeDXT(texData, texInfo[9], texInfo[10], noesis.FOURCC_DXT1)
texData = rapi.imageDecodeRaw(texData, texInfo[9], texInfo[10], "r8g8b8a8")
Acewell
VIP member
VIP member
Posts: 1330
Joined: Wed Nov 05, 2008 12:16 pm
Has thanked: 2710 times
Been thanked: 884 times

Re: PS Vita GXT to PNG conversion

Post by Acewell »

chrrox wrote:

Code: Select all

elif texInfo[8] == 0x85:
	#texFmt = noesis.NOESISTEX_DXT1
	texFmt = noesis.NOESISTEX_RGBA32
	texData = rapi.imageFromMortonOrder(texData, texInfo[9]>>1, texInfo[10]>>2, 4)
	texData = rapi.imageDecodeDXT(texData, texInfo[9], texInfo[10], noesis.FOURCC_DXT1)
	texData = rapi.imageDecodeRaw(texData, texInfo[9], texInfo[10], "r8g8b8a8")
where is the elusive Noesis script that this goes into? :?
it doesn't look like it belongs in this one
viewtopic.php?p=119216#p119216


edit
okay since no one is linking their sources i made a new Noesis script with chrrox's info to open these samples :)
*updated Nov 18, 2016*
tex_EyuuSenki_PSVita_gxt.zip
don't think those dimensions are correct for that image in chrrox's post,
1024x1024 seems to support the image data better
Image
You do not have the required permissions to view the files attached to this post.
Last edited by Acewell on Fri Nov 18, 2016 6:15 am, edited 4 times in total.
WinkelHime
ultra-n00b
Posts: 4
Joined: Fri Aug 05, 2016 10:01 pm
Has thanked: 2 times

Re: PS Vita GXT to PNG conversion

Post by WinkelHime »

Good progress.
For reference, thats how it should look like.
Image
chrrox
Moderator
Posts: 2602
Joined: Sun May 18, 2008 3:01 pm
Has thanked: 57 times
Been thanked: 1422 times

Re: PS Vita GXT to PNG conversion

Post by chrrox »

okay since no one is linking their sources i made a new Noesis script with chrrox's info to open these samples :)


viewtopic.php?f=16&t=14626
WinkelHime
ultra-n00b
Posts: 4
Joined: Fri Aug 05, 2016 10:01 pm
Has thanked: 2 times

Re: PS Vita GXT to PNG conversion

Post by WinkelHime »

Tnx for your work, got all CG's that I need.
pashok6798
n00b
Posts: 12
Joined: Fri Sep 05, 2014 7:45 pm
Location: Russia
Been thanked: 6 times

Re: PS Vita GXT to PNG conversion

Post by pashok6798 »

How did you extract resource from PS Vita? I know about henkaku, but I can't decrypt resources on game which I wanted.
WinkelHime
ultra-n00b
Posts: 4
Joined: Fri Aug 05, 2016 10:01 pm
Has thanked: 2 times

Re: PS Vita GXT to PNG conversion

Post by WinkelHime »

pashok6798 wrote:How did you extract resource from PS Vita? I know about henkaku, but I can't decrypt resources on game which I wanted.
I don't own Vita personally so have little knowledge about actual process. Got ready to extraction game files by my source.
MrAdults
Moderator
Posts: 1007
Joined: Mon Mar 23, 2009 2:57 am
Has thanked: 44 times
Been thanked: 505 times

Re: PS Vita GXT to PNG conversion

Post by MrAdults »

I wrote a GXT importer for Noesis about 2 years ago, for my own personal use, because Vita content wasn't really public at that point. Since people are leaking things all over the place, I figured I might as well enable it in the latest release, so it's in Noesis 4.2. It will handle these GXT's, as well as probably any other GXT on the planet, including correct PVRTC 1 & 2 decoding. Its PVRTC2 decoder is actually the only hardware-accurate one in existence that I'm aware of - the PvrTexTool and SCE libs both handle the palettized block mode incorrectly, which produces some subtle flaws that you won't see on hardware. So that's something to keep in mind if you've been using a makeshift solution by changing the block ordering in order to shovel these things into PvrTexTool or something.

So, enjoy. By the way, the issue with your script here was that tiled data on this hardware will always be padded to a power of 2, so it's correct to pad to the next power of 2 when not dealing with LINEAR/LINEAR_STRIDED data.
Acewell
VIP member
VIP member
Posts: 1330
Joined: Wed Nov 05, 2008 12:16 pm
Has thanked: 2710 times
Been thanked: 884 times

Re: PS Vita GXT to PNG conversion

Post by Acewell »

MrAdults wrote:... tiled data on this hardware will always be padded to a power of 2, so it's correct to pad to the next power of 2 when not dealing with LINEAR/LINEAR_STRIDED data.
okay i know Noesis has native support for gxt now but i wanted to fix the python script for
completion's sake. i updated my previous post with the updated script so it read the width and height
and will round them up to the next power of 2 so they look correct. :D
Doctor Loboto
mega-veteran
mega-veteran
Posts: 213
Joined: Mon Oct 06, 2008 2:52 am
Has thanked: 21 times
Been thanked: 3 times

Re: PS Vita GXT to PNG conversion

Post by Doctor Loboto »

Hey uhm, I'm having some trouble with a specific gxt file, and it seems to be recurring in a few. It throws the error 'an integer is required'?

https://www.dropbox.com/s/chvcm8200nzp0dm/GEAR.gxt?dl=0
Acewell
VIP member
VIP member
Posts: 1330
Joined: Wed Nov 05, 2008 12:16 pm
Has thanked: 2710 times
Been thanked: 884 times

Re: PS Vita GXT to PNG conversion

Post by Acewell »

it works fine with Noesis native plugin, don't use my script because it
was made to work only on the samples in the first post (type 0x85) :P
Post Reply