thanks! Here are the changes to patch into the original script;
####################################################################
be sure to use CORRECT indents, for example 8 blanks. Don't mix in tabs, never ever. You have been warned!
####################################################################
This is the most important change for VITA models; the vxstEntryCount is located 8 bytes earlier (reading 0x10 bytes instead of 0x18):
Code: Select all
vxstEntryCount = []
for _, des in enumerate(vxstList):
bs.seek(des.offset + self.nearOffset, NOESEEK_ABS)
bs.readBytes(0x10)
Then additional vertexStrides to be inserted (you might insert 19 and 27 and see if it improves anything). The UV1BufferOfs
should be (vertexStride -4 ) for HalfFloats; but pay attention that it's constant (0x18) / doesn't follow the rule in the original code from vstride= 32 and above.
So it was a bit
wild guessing; choosing 0x1B for vStride=31 made sense to me (but
not tested); for vStride=35 I just decremented 0x18 (for vStride=36) to 0x17; but not sure.
Replace the lines in the original script from
"if vertStride == 24:" to elif vertStride == 36: by
Code: Select all
if vertStride == 20: #
rapi.rpgBindPositionBuffer(vertBuff, noesis.RPGEODATA_FLOAT, vertStride)
rapi.rpgBindUV1BufferOfs(vertBuff, noesis.RPGEODATA_HALFFLOAT, vertStride, 0x10)
if vertStride == 23: #
rapi.rpgBindPositionBuffer(vertBuff, noesis.RPGEODATA_FLOAT, vertStride)
rapi.rpgBindUV1BufferOfs(vertBuff, noesis.RPGEODATA_HALFFLOAT, vertStride, 0x13)
elif vertStride == 24: # 0xC, 0x10 unk floats
rapi.rpgBindPositionBuffer(vertBuff, noesis.RPGEODATA_FLOAT, vertStride)
rapi.rpgBindUV1BufferOfs(vertBuff, noesis.RPGEODATA_HALFFLOAT, vertStride, 0x14)
elif vertStride == 28: # 0xC, 0x10, 0x14 unk floats
rapi.rpgBindPositionBuffer(vertBuff, noesis.RPGEODATA_FLOAT, vertStride)
rapi.rpgBindUV1BufferOfs(vertBuff, noesis.RPGEODATA_HALFFLOAT, vertStride, 0x18)
elif vertStride == 31: #
rapi.rpgBindPositionBuffer(vertBuff, noesis.RPGEODATA_FLOAT, vertStride)
rapi.rpgBindUV1BufferOfs(vertBuff, noesis.RPGEODATA_HALFFLOAT, vertStride, 0x1B)
elif vertStride == 32: # 0xC, 0x10, 0x14 unk floats, 0x1C unk
rapi.rpgBindPositionBuffer(vertBuff, noesis.RPGEODATA_FLOAT, vertStride)
rapi.rpgBindUV1BufferOfs(vertBuff, noesis.RPGEODATA_HALFFLOAT, vertStride, 0x18)
elif vertStride == 35: #
rapi.rpgBindPositionBuffer(vertBuff, noesis.RPGEODATA_FLOAT, vertStride)
rapi.rpgBindUV1BufferOfs(vertBuff, noesis.RPGEODATA_HALFFLOAT, vertStride, 0x17)
elif vertStride == 36:
For the additional faces: as I said, don't have the time to fix this.
Anyways, HTH