TheUkrainianBard wrote:
@klose_rinz
Hm, is that from PS4 re-release of Sen no Kiseki aka Sen no Kiseki Kai ?
It's from Tokyo Xanadu ex+. Sen no kiseki 3 and Sen no kiseki Kai are on 4.70+ version, and we cannot get the files.
Your code works well with the .dds.phyre file from this game.
But there are some problems when opening .png.phyre(ARGB8) files.
I change the code with the following, then I can get the picture, but the colors are not right.
You can view the vis_127 in the attachment. The left above of the picture is dark sky with nearly pure black color. But in the extracted picture, it's two different bandings with green and blue.
So I think the order of the color is not the problem, maybe there are some tricks in the pixels which are different from PS3 swizzling.
Code:
if Platform == "GNM\x02":
FakeGNF = FakeGNFHeader + data
FakeGNF = rapi.loadTexByHandler(FakeGNF, ".gnf")
FakeGNF.name = "test.gnf"
data = rapi.imageGetTexRGBA(FakeGNF)
try:
if imgFmt == "ARGB8":
if IsSwizzled == 1:
# data = rapi.imageFromMortonOrder(data, imgWidth, imgHeight, 4)
data = rapi.imageDecodeRaw(data, imgWidth, imgHeight, "b8 g8 r8 a8")
data = rapi.imageFlipRGBA32(data, imgWidth, imgHeight, 0, 1)
texList.append(NoeTexture(rapi.getInputName(), imgWidth, imgHeight, data, noesis.NOESISTEX_RGBA32))
except:
texList.append(FakeGNF)
else:
data = rapi.imageFlipRGBA32(data, imgWidth, imgHeight, 0, 1)
texList.append(NoeTexture(rapi.getInputName(), imgWidth, imgHeight, data, noesis.NOESISTEX_RGBA32))
return 1
Also, if I manually change IsSwizzled to 1, the code "data = rapi.imageFromMortonOrder(data, imgWidth, imgHeight, 4)" will get exception.