XeNTaX Forum Index
Forum MultiEx Commander Tools Tools Home
It is currently Sat Feb 16, 2019 6:18 am

All times are UTC + 1 hour


Forum rules


Please click here to view the forum rules



Post new topic Reply to topic  [ 25 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Fate Extella PsVita *.mdl files
PostPosted: Sun Mar 18, 2018 5:28 pm 
Offline
ultra-n00b

Joined: Sun Mar 18, 2018 3:37 pm
Posts: 3
Has thanked: 2 times
Have thanks: 0 time
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


Attachments:


You do not have the required permissions to view the files attached to this post. Register to gain access.



Top
 Profile  
 
 Post subject: Re: Fate Extella PsVita *.mdl files
PostPosted: Mon Mar 19, 2018 10:25 am 
Offline
MEGAVETERAN
MEGAVETERAN
User avatar

Joined: Fri Apr 20, 2012 9:24 am
Posts: 2605
Location: Nexus, searching for Jim Kirk
Has thanked: 638 times
Have thanks: 1331 times
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.)


Attachments:


You do not have the required permissions to view the files attached to this post. Register to gain access.


_________________
Bigchillghost, Reverse Engineering a Game Model: http://forum.xentax.com/viewtopic.php?f=29&t=17889
extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip
"You quoted the whole thing, what a mess."


Top
 Profile  
 
 Post subject: Re: Fate Extella PsVita *.mdl files
PostPosted: Mon Mar 19, 2018 5:14 pm 
Offline
ultra-n00b

Joined: Sun Mar 18, 2018 3:37 pm
Posts: 3
Has thanked: 2 times
Have thanks: 0 time
shakotay2 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.)

Thank you very much for your reply and help
This is a sample file you need
http://www.mediafire.com/file/csp0ounfu760bxr/model.zip


Top
 Profile  
 
 Post subject: Re: Fate Extella PsVita *.mdl files
PostPosted: Mon Mar 19, 2018 6:28 pm 
Offline
MEGAVETERAN
MEGAVETERAN
User avatar

Joined: Fri Apr 20, 2012 9:24 am
Posts: 2605
Location: Nexus, searching for Jim Kirk
Has thanked: 638 times
Have thanks: 1331 times
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:
        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:
            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

_________________
Bigchillghost, Reverse Engineering a Game Model: http://forum.xentax.com/viewtopic.php?f=29&t=17889
extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip
"You quoted the whole thing, what a mess."


Last edited by shakotay2 on Sat Feb 09, 2019 11:32 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Fate Extella PsVita *.mdl files
PostPosted: Mon Mar 19, 2018 8:23 pm 
Offline
ultra-n00b

Joined: Sun Mar 18, 2018 3:37 pm
Posts: 3
Has thanked: 2 times
Have thanks: 0 time
shakotay2 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):
Code:
        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 anythink). 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:
            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


The script can work with the vita model
Not perfect but still thank you very much for your help


Attachments:


You do not have the required permissions to view the files attached to this post. Register to gain access.



Top
 Profile  
 
 Post subject: Re: Fate Extella PsVita *.mdl files
PostPosted: Sat Jul 28, 2018 4:09 pm 
Offline
beginner

Joined: Fri Jul 28, 2017 10:36 am
Posts: 22
Has thanked: 0 time
Have thanks: 12 times
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


Top
 Profile  
 
 Post subject: Re: Fate Extella PsVita *.mdl files
PostPosted: Wed Sep 26, 2018 3:43 am 
Offline
MEGAVETERAN
MEGAVETERAN
User avatar

Joined: Fri Apr 20, 2012 9:24 am
Posts: 2605
Location: Nexus, searching for Jim Kirk
Has thanked: 638 times
Have thanks: 1331 times
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.
you guys! :D Why not just print out the texture path in Noesis?
It uses ".mxt" as texture extension.
If your extension is different for whatever reason then change it, like such:
Code:
            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

Works for me:


Attachments:


You do not have the required permissions to view the files attached to this post. Register to gain access.


_________________
Bigchillghost, Reverse Engineering a Game Model: http://forum.xentax.com/viewtopic.php?f=29&t=17889
extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip
"You quoted the whole thing, what a mess."


Top
 Profile  
 
 Post subject: Re: Fate Extella PsVita *.mdl files
PostPosted: Tue Oct 16, 2018 5:22 pm 
Offline
n00b

Joined: Thu Jul 12, 2018 3:42 pm
Posts: 18
Has thanked: 0 time
Have thanks: 0 time
shakotay2 wrote:
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.
you guys! :D Why not just print out the texture path in Noesis?
It uses ".mxt" as texture extension.
If your extension is different for whatever reason then change it, like such:
Code:
            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

Works for me:


So what do I do with this, add it to the python script? I tried that, and nothing happened


Top
 Profile  
 
 Post subject: Re: Fate Extella PsVita *.mdl files
PostPosted: Tue Oct 16, 2018 5:46 pm 
Offline
MEGAVETERAN
MEGAVETERAN
User avatar

Joined: Fri Apr 20, 2012 9:24 am
Posts: 2605
Location: Nexus, searching for Jim Kirk
Has thanked: 638 times
Have thanks: 1331 times
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()

_________________
Bigchillghost, Reverse Engineering a Game Model: http://forum.xentax.com/viewtopic.php?f=29&t=17889
extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip
"You quoted the whole thing, what a mess."


Top
 Profile  
 
 Post subject: Re: Fate Extella PsVita *.mdl files
PostPosted: Tue Oct 16, 2018 6:28 pm 
Offline
n00b

Joined: Thu Jul 12, 2018 3:42 pm
Posts: 18
Has thanked: 0 time
Have thanks: 0 time
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()


Attachments:


You do not have the required permissions to view the files attached to this post. Register to gain access.



Top
 Profile  
 
 Post subject: Re: Fate Extella PsVita *.mdl files
PostPosted: Tue Oct 16, 2018 7:48 pm 
Offline
MEGAVETERAN
MEGAVETERAN
User avatar

Joined: Fri Apr 20, 2012 9:24 am
Posts: 2605
Location: Nexus, searching for Jim Kirk
Has thanked: 638 times
Have thanks: 1331 times
yeah, sorry, forgot that I added more lines:
Code:
        cnt= 0
        for mate in materialInfo:

...

                cnt = cnt + 1
                if texFinalPath is None:
                    continue
Take care of correct indents; and use blanks or tabs but no mixing

_________________
Bigchillghost, Reverse Engineering a Game Model: http://forum.xentax.com/viewtopic.php?f=29&t=17889
extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip
"You quoted the whole thing, what a mess."


Top
 Profile  
 
 Post subject: Re: Fate Extella PsVita *.mdl files
PostPosted: Tue Oct 16, 2018 8:38 pm 
Offline
n00b

Joined: Thu Jul 12, 2018 3:42 pm
Posts: 18
Has thanked: 0 time
Have thanks: 0 time
shakotay2 wrote:
yeah, sorry, forgot that I added more lines:
Code:
        cnt= 0
        for mate in materialInfo:

...

                cnt = cnt + 1
                if texFinalPath is None:
                    continue
Take care of correct indents; and use blanks or tabs but no mixing

I'm still struggling trying to figure out what to do with this, and where it should go :c


Top
 Profile  
 
 Post subject: Re: Fate Extella PsVita *.mdl files
PostPosted: Tue Oct 16, 2018 8:49 pm 
Offline
MEGAVETERAN
MEGAVETERAN
User avatar

Joined: Fri Apr 20, 2012 9:24 am
Posts: 2605
Location: Nexus, searching for Jim Kirk
Has thanked: 638 times
Have thanks: 1331 times
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)

_________________
Bigchillghost, Reverse Engineering a Game Model: http://forum.xentax.com/viewtopic.php?f=29&t=17889
extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip
"You quoted the whole thing, what a mess."


Top
 Profile  
 
 Post subject: Re: Fate Extella PsVita *.mdl files
PostPosted: Tue Oct 16, 2018 9:57 pm 
Offline
n00b

Joined: Thu Jul 12, 2018 3:42 pm
Posts: 18
Has thanked: 0 time
Have thanks: 0 time
shakotay2 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)

Ok, I did it exactly like I think you are saying it goes, and I get this now


Attachments:


You do not have the required permissions to view the files attached to this post. Register to gain access.



Top
 Profile  
 
 Post subject: Re: Fate Extella PsVita *.mdl files
PostPosted: Tue Oct 16, 2018 10:24 pm 
Offline
MEGAVETERAN
MEGAVETERAN
User avatar

Joined: Fri Apr 20, 2012 9:24 am
Posts: 2605
Location: Nexus, searching for Jim Kirk
Has thanked: 638 times
Have thanks: 1331 times
dunno, what's going wrong there-
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.

_________________
Bigchillghost, Reverse Engineering a Game Model: http://forum.xentax.com/viewtopic.php?f=29&t=17889
extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip
"You quoted the whole thing, what a mess."


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 25 posts ]  Go to page 1, 2  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: 100nadzmi and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group