Information about *.MT7 format

(Modding and other series related projects)

Information about *.MT7 format

Postby IlDucci » Thu May 15, 2014 4:21 pm

I posted this on Xentax a while ago, but I think you people should be informed as well. Maybe anyone can finish this job.

http://forum.xentax.com/viewtopic.php?f=16&t=11482

Here's the MAXScript by SkyBladeCloud:

Code: Select all
clearListener()

fname = getOpenFileName \
caption:"3D Model" \
types:"3D Model (*.*)|*.*" \
historyCategory:"3D Model"
f = fopen fname "rb"

Skel = #()

fn ReadFixedString bstream fixedLen = (
   local str =""
   for i=1 to fixedLen do (
      str+=bit.intAsChar (ReadByte bstream #unsigned)
   )
   str
)

fn readMeshSmall f =
(
   Vertices = #()
   TexCoords = #()
   Weights = #()
   Faces = #()
   
   type = readlong f
   vertexNum = readlong f
   
   print vertexnum
   
   for i = 1 to vertexNum do
   (
      x = readfloat f
      y = readfloat f
      z = readfloat f
     
      vertex = point3 x y z
      Vertices[i] = vertex
     
      boneIndex = readlong f
      unk = readlong f     
      weight = readfloat f

      u = readfloat f
      v = 1 - readfloat f
     
      texcoord = point3 u v 0
      TexCoords[i] = texcoord
     
      print texcoord
   )

   for i = 1 to (vertexNum - 2) by 1 do
      (
         x = i
         if(mod i 2 == 1) then
            (
            y = i + 1
            z = i + 2
         )
         else
         (
            y = i + 2
            z = i + 1
         )           
         face = point3 x y z
         append Faces face
      )

   msh = mesh vertices:Vertices faces:Faces tverts:TexCoords
     
   mmesh = msh.mesh
   buildTVFaces mmesh
   for i = 1 to mmesh.numfaces do
   (
      setTVFace mmesh i (getFace mmesh i)
   )
)

fn readBlock f numChunks offset =
(
   fseek f offset #seek_set
   
   for i = 1 to numChunks do
   (
         readMeshSmall f
   )
   
)

readBlock f 0x22 0x120
print "------------"
readBlock f 0x1c 0x1380
print "------------"
readBlock f 1 0x22b0

fclose f

IlDucci has received 3 thanks from: Giorgio, MiTT3NZ, shengoro86
IlDucci
Master of the Three Blades
Master of the Three Blades
 
Joined: February 2012
Location: Spain
Favorite title: Shenmue

Re: Information about *.MT7 format

Postby Fenix » Thu May 15, 2014 5:39 pm

Does it open something?

I seriously doubt that somebody can mae a plugin in a few minutes. Specially when Yagzoo worked at least 2 years to make it and it's still not perfect yet.
User avatar
Fenix
"After Burner...Great!"
"After Burner...Great!"
 
Joined: June 2010
Location: Spain, Barcelona
Favorite title: Shenmue II
Currently playing: 3D Studio Max

Re: Information about *.MT7 format

Postby MiTT3NZ » Thu May 15, 2014 6:51 pm

It opens the file he specifies. And only the Dreamcast version. It'd be good if they can get this working. Even better if they can write a MaxScript for MT5 & MT6 files too.
User avatar
MiTT3NZ
Class A Cunt
Shenmue III
 
Joined: January 2005
Location: Manchester, innit!
XBL: Mittens2317
Steam: Mittens2317
Favorite title: Shenmue
Currently playing: Football Manager 2012

Re: Information about *.MT7 format

Postby Fenix » Thu May 15, 2014 7:17 pm

I think Yagzoo extractor opens items models. It would be better to try the script with a model.
User avatar
Fenix
"After Burner...Great!"
"After Burner...Great!"
 
Joined: June 2010
Location: Spain, Barcelona
Favorite title: Shenmue II
Currently playing: 3D Studio Max

Re: Information about *.MT7 format

Postby MiTT3NZ » Thu May 15, 2014 7:34 pm

Well, it's still a model. I know what you mean though. I reckon importing models straight into 3DS Max is the way to go though. Converters usually come with the odd glitch or two (add a few zeroes to that for the MT5 converter), whereas Max Scripts tend to be much cleaner. In my experience, at least.

Yagzoo always said he'd need someone else to take what he's done and build on it. Maybe this guy's the way forward. Is the source code still on the GitHub?
User avatar
MiTT3NZ
Class A Cunt
Shenmue III
 
Joined: January 2005
Location: Manchester, innit!
XBL: Mittens2317
Steam: Mittens2317
Favorite title: Shenmue
Currently playing: Football Manager 2012

Re: Information about *.MT7 format

Postby IlDucci » Fri May 16, 2014 5:28 am

Yazgoo stuff never worked for me, but I keep a copy of his stuff around. Don't know if I got his source code as well.

The funny thing is, somebody else worked on the models format (I think for S1), but afterwards he deleted/erased all the information on Xentax.

If you guys change the readBlock parameters, you may be able to see other simple files.
IlDucci
Master of the Three Blades
Master of the Three Blades
 
Joined: February 2012
Location: Spain
Favorite title: Shenmue


Return to Community Projects

Who is online

Users browsing this forum: No registered users and 1 guest

Powered by phpBB © 2000-
ShenmueDojo.net