PC version of Noesis script does not work on the vita version of *.mdl files
And how to unpack the *.mdl file
please help me
Sample file
http://www.mediafire.com/file/082mvcpa2 ... sv0000.mdl
Important information: this site is currently scheduled to go offline indefinitely by end of the year.
Fate Extella PsVita *.mdl files
Fate Extella PsVita *.mdl files
You do not have the required permissions to view the files attached to this post.
- shakotay2
- MEGAVETERAN
- Posts: 4286
- Joined: Fri Apr 20, 2012 9:24 am
- Location: Nexus, searching for Jim Kirk
- Has thanked: 1147 times
- Been thanked: 2242 times
Re: Fate Extella PsVita *.mdl files
Some small patch to Kotcrab's great Noesis script from here: https://github.com/kotcrab/fate-explorer/releases
Some extra faces which I did not have the time to fix.
(Would need 2 or 3 more model samples to check if the patch is sufficient.)
(Would need 2 or 3 more model samples to check if the patch is sufficient.)
You do not have the required permissions to view the files attached to this post.
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
Re: Fate Extella PsVita *.mdl files
Thank you very much for your reply and helpshakotay2 wrote:Some small patch to Kotcrab's great Noesis script from here: https://github.com/kotcrab/fate-explorer/releases Some extra faces which I did not have the time to fix.
(Would need 2 or 3 more model samples to check if the patch is sufficient.)
This is a sample file you need
http://www.mediafire.com/file/csp0ounfu760bxr/model.zip
- shakotay2
- MEGAVETERAN
- Posts: 4286
- Joined: Fri Apr 20, 2012 9:24 am
- Location: Nexus, searching for Jim Kirk
- Has thanked: 1147 times
- Been thanked: 2242 times
Re: Fate Extella PsVita *.mdl files
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):
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
For the additional faces: as I said, don't have the time to fix this.
Anyways, HTH
####################################################################
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)
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:
Anyways, HTH
Last edited by shakotay2 on Sat Feb 09, 2019 11:32 am, edited 1 time in total.
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
Re: Fate Extella PsVita *.mdl files
The script can work with the vita modelshakotay2 wrote: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):Then additional vertexStrides to be inserted (you might insert 19 and 27 and see if it improves anythink). The UV1BufferOfsCode: Select all
vxstEntryCount = [] for _, des in enumerate(vxstList): bs.seek(des.offset + self.nearOffset, NOESEEK_ABS) bs.readBytes(0x10)
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: byFor the additional faces: as I said, don't have the time to fix this.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:
Anyways, HTH
Not perfect but still thank you very much for your help
You do not have the required permissions to view the files attached to this post.
Re: Fate Extella PsVita *.mdl files
I added support for PS Vita models based on this. New script also works on Fate/Extella Link models.
https://github.com/kotcrab/fate-explore ... g/mdl-v1.2
https://github.com/kotcrab/fate-explore ... g/mdl-v1.2
- shakotay2
- MEGAVETERAN
- Posts: 4286
- Joined: Fri Apr 20, 2012 9:24 am
- Location: Nexus, searching for Jim Kirk
- Has thanked: 1147 times
- Been thanked: 2242 times
Re: Fate Extella PsVita *.mdl files
you guys! Why not just print out the texture path in Noesis?jay11800 wrote:Hello, I am trying to apply materials to the MDL files of fate extella link, when I go into noesis my model has 7 materials, all of which have textures, but aren't linked for some odd reason.
It uses ".mxt" as texture extension.
If your extension is different for whatever reason then change it, like such:
Code: Select all
for sstv in sstvList:
def getTexPath(extension):
texPath = self.stringBank[sstv.texPathSid]
texNormalizedName = path.splitext(path.basename(texPath))[0]
#texFinalPath = rapi.getDirForFilePath(rapi.getInputName()) + texNormalizedName + extension
texFinalPath = rapi.getDirForFilePath(rapi.getInputName()) + texNormalizedName + ".png"
#print("TexFinalPath: ", cnt, " ", texFinalPath)
if rapi.checkFileExists(texFinalPath): # check in current dir first
return texFinalPath, texNormalizedName
You do not have the required permissions to view the files attached to this post.
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
Re: Fate Extella PsVita *.mdl files
So what do I do with this, add it to the python script? I tried that, and nothing happenedshakotay2 wrote:you guys! Why not just print out the texture path in Noesis?jay11800 wrote:Hello, I am trying to apply materials to the MDL files of fate extella link, when I go into noesis my model has 7 materials, all of which have textures, but aren't linked for some odd reason.
It uses ".mxt" as texture extension.
If your extension is different for whatever reason then change it, like such:Works for me:Code: Select all
for sstv in sstvList: def getTexPath(extension): texPath = self.stringBank[sstv.texPathSid] texNormalizedName = path.splitext(path.basename(texPath))[0] #texFinalPath = rapi.getDirForFilePath(rapi.getInputName()) + texNormalizedName + extension texFinalPath = rapi.getDirForFilePath(rapi.getInputName()) + texNormalizedName + ".png" #print("TexFinalPath: ", cnt, " ", texFinalPath) if rapi.checkFileExists(texFinalPath): # check in current dir first return texFinalPath, texNormalizedName
- shakotay2
- MEGAVETERAN
- Posts: 4286
- Joined: Fri Apr 20, 2012 9:24 am
- Location: Nexus, searching for Jim Kirk
- Has thanked: 1147 times
- Been thanked: 2242 times
Re: Fate Extella PsVita *.mdl files
Uncomment thsi line (delete the #):
#print("TexFinalPath: ", cnt, " ", texFinalPath)
to find out what your problem might be.
In
def registerNoesisTypes():
this line's required: noesis.logPopup()
#print("TexFinalPath: ", cnt, " ", texFinalPath)
to find out what your problem might be.
In
def registerNoesisTypes():
this line's required: noesis.logPopup()
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
Re: Fate Extella PsVita *.mdl files
shakotay2 wrote:Uncomment thsi line (delete the #):
#print("TexFinalPath: ", cnt, " ", texFinalPath)
to find out what your problem might be.
In
def registerNoesisTypes():
this line's required: noesis.logPopup()
You do not have the required permissions to view the files attached to this post.
- shakotay2
- MEGAVETERAN
- Posts: 4286
- Joined: Fri Apr 20, 2012 9:24 am
- Location: Nexus, searching for Jim Kirk
- Has thanked: 1147 times
- Been thanked: 2242 times
Re: Fate Extella PsVita *.mdl files
yeah, sorry, forgot that I added more lines:
Take care of correct indents; and use blanks or tabs but no mixing
Code: Select all
cnt= 0
for mate in materialInfo:
...
cnt = cnt + 1
if texFinalPath is None:
continue
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
Re: Fate Extella PsVita *.mdl files
I'm still struggling trying to figure out what to do with this, and where it should go :cshakotay2 wrote:yeah, sorry, forgot that I added more lines:Take care of correct indents; and use blanks or tabs but no mixingCode: Select all
cnt= 0 for mate in materialInfo: ... cnt = cnt + 1 if texFinalPath is None: continue
- shakotay2
- MEGAVETERAN
- Posts: 4286
- Joined: Fri Apr 20, 2012 9:24 am
- Location: Nexus, searching for Jim Kirk
- Has thanked: 1147 times
- Been thanked: 2242 times
Re: Fate Extella PsVita *.mdl files
what do you mean?
search for the line "for mate in materialInfo:" in the script
and put the line cnt=0 before it.
search for the line "if texFinalPath is None:" in the script; there's two occurences;
put the line
cnt = cnt + 1
before the one which is followed by "continue".
Or, even simpler, just use
print("TexFinalPath: ", texFinalPath)
(should do the trick, the "cnt" is not that important)
search for the line "for mate in materialInfo:" in the script
and put the line cnt=0 before it.
search for the line "if texFinalPath is None:" in the script; there's two occurences;
put the line
cnt = cnt + 1
before the one which is followed by "continue".
Or, even simpler, just use
print("TexFinalPath: ", texFinalPath)
(should do the trick, the "cnt" is not that important)
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
Re: Fate Extella PsVita *.mdl files
Ok, I did it exactly like I think you are saying it goes, and I get this nowshakotay2 wrote:what do you mean?
search for the line "for mate in materialInfo:" in the script
and put the line cnt=0 before it.
search for the line "if texFinalPath is None:" in the script; there's two occurences;
put the line
cnt = cnt + 1
before the one which is followed by "continue".
Or, even simpler, just use
print("TexFinalPath: ", texFinalPath)
(should do the trick, the "cnt" is not that important)
You do not have the required permissions to view the files attached to this post.
- shakotay2
- MEGAVETERAN
- Posts: 4286
- Joined: Fri Apr 20, 2012 9:24 am
- Location: Nexus, searching for Jim Kirk
- Has thanked: 1147 times
- Been thanked: 2242 times
Re: Fate Extella PsVita *.mdl files
dunno, what's going wrong there-
Maybe you should follow Kotcrab's tip:
Maybe you should follow Kotcrab's tip:
Kotcrab wrote:If you want textures automatically loaded in Noesis you just need to open .mdl file from original extract directory without renaming or moving anything.
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"