*.Rtex (Nintendo Switch)

Textures, recreate headers, conversions, algorithms and parsing of image files
amVspR
Posts: 40
Joined: Mon Aug 14, 2017 2:45 am

*.Rtex (Nintendo Switch)

Post by amVspR »

Please help me extract/view this file, seem like it's a texture.
Game Name: Cupiarasite
Console: Nintendo Switch
Format extension(s): RTEX
Type: image

First 8 or more bytes of the file(s):
52 54 45 58 00 00 00 00
Rtex sample: https://mega.nz/file/Q0okADCR#3cZPSNOgG ... 0-JJZG3-p8
Last edited by amVspR on Fri Dec 10, 2021 7:04 pm, edited 1 time in total.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: *.Rtex (Nintendo Switch)

Post by aluigi »

It's a raw image compressed with zlib.
This script decompresses the content:

Code: Select all

idstring "RTEX"
get ZERO long
get X short
get Y short
get X short
get Y short
get BITS long
get ZSIZE long
math ZSIZE - 6
goto 0x22
get SIZE long
reverselong SIZE
savepos OFFSET
get NAME basename
string NAME p "%s_%dx%dx%d.raw" NAME X Y BITS
clog NAME OFFSET ZSIZE SIZE
amVspR
Posts: 40
Joined: Mon Aug 14, 2017 2:45 am

Re: *.Rtex (Nintendo Switch)

Post by amVspR »

Thank you so much! I was able to extract it. But the output file, when I opened it in PTS, is like the attachment [almost all black with white lines]. Is there anyway to fix it?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: *.Rtex (Nintendo Switch)

Post by aluigi »

Unfortunately that's out of my knowledge. Hopefully other users can help you :)
NIS_help
Posts: 4
Joined: Mon Feb 07, 2022 7:39 pm

Re: *.Rtex (Nintendo Switch)

Post by NIS_help »

Apologies for bumping this thread, but I'm trying to extract Cupid Parasite files. (specifically the BGM ones!) Using the script I was able to extract some files, but I'm unable to view them in Photoshop, ImBatch, or other image programs.

Here is the files I want to extract, along with my result from trying to extract the uploaded example (which I'm unable to view in Photoshop as well)
https://mega.nz/file/MYMRyYRD#iN-8rJAWy ... uJX4LaYyEo

My question is- did I a) save the script wrong, b) lack a way to open the working extracted files, or c) is there another issue with my files? Any help would be greatly appreciated!
rabatini
Posts: 179
Joined: Tue Jan 18, 2022 12:21 am

Re: *.Rtex (Nintendo Switch)

Post by rabatini »

use mummrar grapchics tool.
i already upload it in this forum.

the image is 4096 x 1280
32bits
rgb

to extract just use the offzip of aluigi.

just run the .bat file.
but the script that he provide above works as same.

here the results:

Image
NIS_help
Posts: 4
Joined: Mon Feb 07, 2022 7:39 pm

Re: *.Rtex (Nintendo Switch)

Post by NIS_help »

Thanks for the response- I searched for Mumm-Ra's Game Graphics Tool and this is what I found: viewtopic.php?f=7&t=1439

But, there's no download... Is there a link to the actual tool anywhere? I can't seem to find it.
rabatini
Posts: 179
Joined: Tue Jan 18, 2022 12:21 am

Re: *.Rtex (Nintendo Switch)

Post by rabatini »

NIS_help wrote:Thanks for the response- I searched for Mumm-Ra's Game Graphics Tool and this is what I found: viewtopic.php?f=7&t=1439

But, there's no download... Is there a link to the actual tool anywhere? I can't seem to find it.


download/file.php?id=12101
Riesz
Posts: 9
Joined: Mon Nov 15, 2021 8:56 pm

Re: *.Rtex (Nintendo Switch)

Post by Riesz »

Since I made use of the info here, I just wanted to post a comment about another way to process the .raw image files.

Irfanview has a plugin that supports raw and it's very easy to use, just input the dimensions listed on the filename after running ALuigi's script.

Image

E.g. base_image_1968x1128x32_000000d8.raw
Image width: 1968
Image height: 1128
BitsPerPixel: 32

Then you can do a batch conversion from Irfanview into png with transparency or whatever format you want.

Image