ROM Hack Resident Evil Remaster, .tex extract and convert ?

AlanLC

Well-Known Member
OP
Member
Joined
Aug 18, 2014
Messages
413
Trophies
0
Age
45
XP
2,603
Country
Brazil
How to extract and recreate .tex files from the Resident Evil Remaster Switch?
Is each file in a different format?
How to find settings for each file? You do not need to load all the files for analysis.

Translating the game into Brazilian Portugues.
 

Attachments

  • t_id00_01_BM.zip
    18.7 KB · Views: 245
  • title01_ID_HQ.zip
    361 KB · Views: 249
Last edited by AlanLC,

masagrator

The patches guy
Developer
Joined
Oct 14, 2018
Messages
6,297
Trophies
3
XP
12,075
Country
Poland
First one - BC7, offset 0x18, swizzled
t_id00_01_BM.PNG
Second one - DXT5, offset 0x14, not swizzled

title01_ID_HQ.PNG

dunno how to create first one, second one just create DDS DXT5 (probably the best will be using texconv) and swap texture data between modified DDS and original tex file with hex editor.

You can use raw texture cooker to identify not compressed texture files.
https://zenhax.com/viewtopic.php?t=7099
 
Last edited by masagrator,

AlanLC

Well-Known Member
OP
Member
Joined
Aug 18, 2014
Messages
413
Trophies
0
Age
45
XP
2,603
Country
Brazil
First one - BC7, offset 0x18, swizzled
View attachment 168817
Second one - DXT5, offset 0x14, not swizzled

View attachment 168818

dunno how to create first one, second one just create DDS DXT5 (probably the best will be using Photoshop with Nvidia DDS export; methods of coding colors differs between image editors and I don't know if Paint.Net or GIMP will work) and swap texture data between modified DDS and original tex file with hex editor.

You can use raw texture cooker to identify not compressed texture files.
https://zenhax.com/viewtopic.php?t=7099
OOOps! I posted the wrong file, I posted title01_ID_HQ.zip (PC), but I edited the post and uploaded the switch.
 

masagrator

The patches guy
Developer
Joined
Oct 14, 2018
Messages
6,297
Trophies
3
XP
12,075
Country
Poland
Second one - DXT5, offset 0x18, swizzled
title01_ID_HQ.PNG
You can make DXT5 swizzled textures using this
https://gbatemp.net/threads/noesis-mod-tiling-texture-for-ue4.535571/
After swizzling you will get png file. just convert it to DDS DXT5.

Tool doesn't support BC7 and I can't force UE4 to make BC7 texture (Because Noesis doesn't support searching informations about TC_BC7), so I can't help with this.

--------------------- MERGED ---------------------------

Or maybe I can. Noesis needs temporary solution.
Just unpack noesis to second folder which will be dedicated only to BC7 (if UE4 will show that it will generate format DXT5).

Go to folder with second one, go to plugins/python, edit fmt_ue4.py. Change
Code:
    elif pixelFormat == "PF_DXT5":
        textureData = ue4UntileTexture(asset, width, height, 1, 1, 4, textureData, 8)
to
Code:
    elif pixelFormat == "PF_DXT5":
        textureData = ue4UntileTexture(asset, width, height, 2, 2, 8, textureData, 8)

It should then correctly swizzle to BC7 texture png file if in Compression settings of texture in UE4 you will choose BC7 and after saving texture settings it will show in Format "DXT5". (First it shows B8G8R8A8, but after choosing BC7 and saving settings it changed to DXT5)
upload_2019-6-2_9-52-43.png
And save generated PNG as DDS BC7
I am not 100% sure if it will work for BC7 textures with height bigger than 256 px. I would need that texture to test it.

Edit: And don't use PNGs from this topic. It looks like gbatemp is reconverting them. I've added to attachment packed second texture.
 

Attachments

  • title01_ID_unswizzled.zip
    591.5 KB · Views: 127
Last edited by masagrator,
  • Like
Reactions: AlanLC

eviltrainer

Member
Newcomer
Joined
Sep 13, 2009
Messages
24
Trophies
1
XP
70
Country
Brazil
Hey @masagrator! Sorry to revive this thread but that's exactly the same issue and the same game I'm trying to mod. So, thanks to your info here, I succesfully extracted the textures and managed to unswizzle the .dds/.png I got from them with Rawtex! So, how I can now swizzle them back so they are read properly by the Switch again? I tried Kuriimu2, ArcTool and Noesis but couldn't find any tutorial online to achieve the swizzling/repacking. Specially Noesis, that I see lots of people saying is capable of doing that but I couldn't get it to work at all lol

Hope you can help! Thanks in advance!
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • BakerMan
    I rather enjoy a life of taking it easy. I haven't reached that life yet though.
  • Xdqwerty
    what are you looking at?
    BakerMan @ BakerMan: