Kerilk/noesis_bayonetta_pc

Astral Chain support?

Closed this issue · 25 comments

Can you provide support for Astral Chain's files please?
Here is the link to the thread.
https://forum.xentax.com/viewtopic.php?f=10&t=21044

I plan to take a look at it.

I released a version for astral chain without texture support. I someone can point me to the correct format I should be able to support it.
Astral Chain

So seems like some1 figured out the texture format properly...
https://www.deviantart.com/sticklove/art/Olive-Espinosa-811898253

I already asked if he can point out the swizzle algorithm for ASTC10x10, so gotta wait for a response now.

update:
he said it's ASTC8x8 actually with normal switch swizzling.
and... some are dxt, and some are astc4x4

I would love to get examples of those 3 types, if you can point them to me.

I was wrong on the texture format location in my notes, the format is listed at 0x1C in the XT1 info, while 0x10 is texture data offset, for when the game compiles it into 1 file most likely.

if ya need more files from the game, I can send some to ya, just add me on discord
DSX8#8255

image

Thanks, that should get me going.

Alright cool. Textures that's 8E might need more swizzle support, those still ends up broken for me, but everything else is fine.

I found format 37 also no idea what it is. I don't know how I'll be able to add support for those textures using Noesis. Worst case I'll need to generate dxt headers and bntx headers for them... Don't know how long it will take me.

oof dang, alright. Which file is format 37 in?

FogLUT.wtb and grading.wtb

looks like there's a format 50 also, for the cubemap.wtb

FogLUT is 25, same for Grading, not 37.

edit: oh, now I see what u mean by 37 lmao

0x25 [37] is r8g8b8a8_unorm?
Texture0 Texture1 Texture2

Update:
Cubemap.wbt is format BC6
cubemap cubemap2

If ya come across any others, let me know and I'll take a look.

0x25 is r8g8b8a8, 0x01 is just rgb8.
0x38 (bg/bg4510.wta and others) 0x50 (lots of files such as st3/r302.wta) and 0x29 (core/pre_texture.wta) are currently unknown to me.
Rest are already listed.

Edit: I've extracted the raw data from the WTP files and screen capped pictures of the WTA headers for those 3 here: https://mega.nz/#!2a5iUCqR!5oScA8VmauZQ2jilTyo91_uiZciD7Gp5Q0KPEywpNHU

I'm trying to decompress textures from miscTex and I'm getting some funky outputs. All the entries in that directory seem to be dxt5 (0x44 code) but everything I try to decompress looks like this:
test (chara_thumb_01). Any ideas what I'm doing wrong?

Edit: Was not aware what swizzling meant but apparently that is what it is.

Any idea where the face texture is even located at, that's about all I'm missing. Also, switch toolbox can now properly view every texture formats that's been found so far, and got the 4k textures to unswizzle.
https://github.com/KillzXGaming/Switch-Toolbox/blob/435fda17f1b5c0940d6dfec889729f92424d8678/File_Format_Library/FileFormats/Texture/WTB.cs

image

had to lower the size from 4096x4096 to 2048x2048 just to upload it here, but looks like it's shared with the female character (and possibly used for cutscenes?).
image

My bet is that it is indeed stored somewhere else as you can change their face color when you configure you character. So you must have a huge file with all the faces together, or maybe in the hairstyle file.

Can the switch toolbox be made into an executable that would convert XT1 files to whatever format Noesis can read? This is already what I am doing with gtx files from bayo 2 WiiU.

Yeah, It should be able to do that since it has support for reading GTX textures, and XT1 can be converted to png, astc, or other files. (if I'm understanding this properly)
image

Perfect I just need to figure out the correct command line options.

All formats were not tested as I don't have enough data, tell me if some texture are wrong.
I don't support cube maps.
Astral Chain with textures
Thanks for all the help :)

Glad to be of service~

Question... think you can add some info on where textures are stored for the high poly hair meshes? Like have it say which dtt file the hair texture is loaded from it's material data?
image

This is an issue that noesis doesn't let me solve elegantly (I can't give you data for textures that are not found). I could build a debug version of my plugin that outputs those information but you would need to have debugging libraries installed, and as they came with visual studio I don't know how to install them stand alone. Also there is no knowledge in the file itself of where textures can be, just the hash of the texture.
The tools have everything you need to do that, if you are willing to use them, (binary templates can read the format, and the wtx_find_textures.rb tool can build a database of the textures contained in dat files for a whole directory tree). I could also write a small material dumper tool that would give you textures and their usage per material in a given model.
https://github.com/Kerilk/bayonetta_tools

ye, a material dumper is good enough for me, better than having to dig through it in hex and jog it all down in notepad or whatever.

I wrote a couple more tools to help find textures in models.
wmb_find_textures.rb will dump the texture ids of wmb files contained in a dat file, or in the dat files of a directory.

~/Bayonetta/bayonetta_tools$ ruby wmb_find_textures.rb /mnt/d/Astral\ Chain/wp/
ruby: warning: shebang line ending with \r may cause problems
./wp0000.dat:wp0000.wmb:08eedac9
./wp0000.dat:wp0000.wmb:4e9c16f4
./wp0000.dat:wp0000.wmb:3b92faa3
./wp0000.dat:wp0000.wmb:13976fb2
./wp0000.dat:wp0000.wmb:7fd4929a
./wp0000.dat:wp0000.wmb:1fbc0984
./wp0000.dat:wp0000.wmb:132ed5c3
./wp0001.dat:wp0001.wmb:6f47f75d
./wp0001.dat:wp0001.wmb:049f41be
./wp0001.dat:wp0001.wmb:4e9c16f4
./wp0001.dat:wp0001.wmb:7c12b568
./wp0001.dat:wp0001.wmb:1fe6f4c5
./wp0001.dat:wp0001.wmb:7fd4929a
./wp0001.dat:wp0001.wmb:1fbc0984
./wp0001.dat:wp0001.wmb:199bfd81

wmb_dump_materials.rb will give a list of texture ids used by meterials of wmb files contained in a dat file, or in the dat files of a directory.

~/Bayonetta/bayonetta_tools$ ruby wmb_dump_materials.rb /mnt/d/Astral\ Chain/wp
ruby: warning: shebang line ending with \r may cause problems
./wp0000.dat:wp0000.wmb:WP0000_TripleWeapon:08eedac9:g_AlbedoMap
./wp0000.dat:wp0000.wmb:WP0000_TripleWeapon:4e9c16f4:g_LightMap
./wp0000.dat:wp0000.wmb:WP0000_TripleWeapon:3b92faa3:g_MaskMap
./wp0000.dat:wp0000.wmb:WP0000_TripleWeapon:13976fb2:g_NormalMap
./wp0000.dat:wp0000.wmb:WP0000_TripleWeapon:7fd4929a:g_DetailNormalMap
./wp0000.dat:wp0000.wmb:WP0000_TripleWeapon:1fbc0984:g_EnvMap
./wp0000.dat:wp0000.wmb:WP0000_TripleWeapon:132ed5c3:g_ColorMask
./wp0001.dat:wp0001.wmb:LTLight:6f47f75d:g_AlbedoMap
./wp0001.dat:wp0001.wmb:LegaTooth:049f41be:g_AlbedoMap
./wp0001.dat:wp0001.wmb:LegaTooth:4e9c16f4:g_LightMap
./wp0001.dat:wp0001.wmb:LegaTooth:7c12b568:g_MaskMap
./wp0001.dat:wp0001.wmb:LegaTooth:1fe6f4c5:g_NormalMap
./wp0001.dat:wp0001.wmb:LegaTooth:7fd4929a:g_DetailNormalMap
./wp0001.dat:wp0001.wmb:LegaTooth:1fbc0984:g_EnvMap
./wp0001.dat:wp0001.wmb:LegaTooth:199bfd81:g_ColorMask

you can use the -y flag to get yaml output and -w to get windows like path