Kizari / Flagrum

Flagrum is an all-in-one solution for modders, artists, and players of Final Fantasy XV and Forspoken.
GNU General Public License v3.0
76 stars 9 forks source link

[Enhancement]: Support edge-case FFXV textures #154

Open Kizari opened 5 months ago

Kizari commented 5 months ago

Feature Request

Some textures in FFXV are not quite supported by Flagrum's BTEX converter. While I don't have an exhaustive list, an example is that data://menu/main_map/image/base_worldnorth_mrgb.tif in Platinum demo is seemingly not being deswizzled correctly. This may be due to an issue with Flagrum, or it may be that Scarlet does not support the pixel format this texture uses. There may be other edge-case textures as well that haven't been noted down, so those should be brought to my attention as they're discovered ideally.

Developer Notes The BTEX image flags are now known, which could help improve the BTEX converter code, especially for strange cases such as this:

FLAG_MIPMAP = 1
FLAG_VOLUME = 2
FLAG_CUBE = 4
FLAG_SWIZZLE = 8
FLAG_COMPRESS = 16
FLAG_SRGB = 32
FLAG_PLATFORM = 64
FLAG_ARRAY = 128

Proposed Value

This would open up further support for porting content from the PS4 versions of the game, as well as potentially offering value to artists that wish to create fanart from these assets. The impact is quite low though so this should not be prioritised.

Code of Conduct

Rinual commented 3 months ago

Piggybacking of the proposed value with PS4 assets would be for supporting bulk exporting. Currently files need to be individually exported.

Didnt think this deserved its own page, as i think i recall you saying this is a bit too complicated, but it is on theme. Lmk if you are ever tempted and i can try tracking down the culprits besides things like those earc reference files

Rinual commented 3 weeks ago

These are all the textures in the /characters/ folder of EPD that have issues

From what I can see, all issues are either from texture arrays or .exr files for the demo

This first texture appears to be an array on windows edition

image

data://character/em/em01/model_000/sourceimages/em01_000_marking_00_b.tif data://character/es/es00/model_000/sourceimages/es00_000_marking_00_b.tif image

This next one is an exr data://character/em/em01/model_001/sourceimages/vw_ideledcenteraddc.exr image data://character/pr/pr07/model_003/sourceimages/pr07_003_basic_00.exr image these two are also arrays data://character/um/um04/model_100/sourceimages/um04_100_uhcloth_00_pat_b_00_b.tif data://character/uw/uw00/model_100/sourceimages/uw00_100_uhcloth_00_pat_00_b.tif

these also appear to actually be exr's as well, based on the release data://character/ve/ve00/model_000/sourceimages/ve00_000_ems_00e$h.exr

data://character/ve/ve00/model_000/sourceimages/ve00_000_ems_00_e.exr
data://character/ve/ve01/model_000/sourceimages/ve01_000_vgd_00_e.exr
data://character/ve/ve02/model_000/sourceimages/ve02_000_vgd_00_e.exr
data://character/ve/ve03/model_000/sourceimages/ve03_000_vgd_00_e.exr
data://character/ve/ve03/model_010/sourceimages/ve03_010_vgd_00_e.exr
data://character/ve/ve05/model_000/sourceimages/ve05_000_vgd_00_e.exr
data://character/ve/ve06/model_000/sourceimages/ve06_000_vgd_00_e.exr
data://character/ve/ve07/model_000/sourceimages/ve07_000_vgd_00_e.exr

have a workaround for ebex@.earcref files if you are wanting, but now that I can export more of the files, these textures will be easier to find, anyways, here is more info than you want... but hey, more is better than none I suppose. sourceimages.zip zipped is the btex and the image converted

For anyone that has this issue, noesis at least can read some of these textures if you need a workaround.