Page 1 of 13 1234567891011 ... LastLast
Results 1 to 20 of 292

Thread: Starting to unravel the MESH format

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Starting to unravel the MESH format

    Hi

    I've been looking at the .MESH format and although it's not complete, I thought I'd share what I've found and maybe kickstart others to finish it.

    I've mainly been looking at figure meshes (siege engine and other meshes are a bit different) and the information relates to these.

    MESH files are stored as follows:-

    .at byte 69 of the initial header - integer value for number of different mesh groups = num_group

    .at byte 83 - start of first mesh group, integer showing length of mesh type (ie body ,arms, legs,etc) name string

    .mesh type name string

    .integer showing length of mesh group name(ie legs 01, arms 04, etc) string

    .mesh group name string

    .2 bytes of dummy data (only in first mesh group)

    .integer showing number of triangles in mesh group = n

    .n * 3 * 2 byte shorts for triangle values

    .29 byte header/footer (only between first and second mesh groups all others are 23 bytes)

    repeating for 1 to num_group-1

    .integer - length of mesh type string

    .mesh type string

    .integer - length of mesh group name string

    .mesh group name string

    .integer showing number of triangles in mesh group = n

    .n * 3 * 2 byte shorts for triangle values

    .23 bytes of header/footer

    Then you have another 24 byte of header/footer

    .integer - number of vertices = n2

    .n2 * 2 * 4 byte float - texture coord u and v values (note here the uv values are based on a composite texture ie 2048 x 1024 - the figure texture on the left and the attachment texture on the right)

    .28 byte of header/footer

    .integer - number of vertices = n2

    .n2 * 2 * 4 byte float - vertex weights (primary weight, secondary weight - from left)

    .38 bytes of header/footer

    .integer - number of vertices = n2

    .n2 * 3 * 4 byte float - vertex vector

    .36 bytes of header/footer

    .integer - number of vertices = n2

    .vertex/bone assignments, information in series of four bytes - (from left) byte1 = 0, byte2 = secondary bone, byte3 = primary bone, byte4 = 0

    That's as about as far as I've got so far. There is another block of code following the vertex/bone assignments that I haven't worked out yet. It seems to be in series of three bytes followed by a zero byte - maybe something to do with shader systems - any ideas?

    After this block is just a listing of the skeleton bones in hierarchy order. Hopefully somebody can use this to go further.

    Cheers

    GrumpyOldMan
    Last edited by grumpyoldman; February 15, 2007 at 06:07 PM.

  2. #2

    Default Re: Starting to unravel the MESH format

    Hi

    I was expecting at least some sort of reaction .

    Anyway, here are some pics of extracted meshes that I exploded a bit so the separate parts can be seen

    http://i150.photobucket.com/albums/s...rquebusier.png

    and

    http://i150.photobucket.com/albums/s...07/pikeman.png

    Cheers

    GrumpyOldMan

  3. #3

    Default Re: Starting to unravel the MESH format

    You're a genius, thats all i can say right now
    Imperial House Of Wild Bill Kelso
    Under the patronage of Kagemusha.
    Younger brother of TomteOfDoom


  4. #4

    Default Re: Starting to unravel the MESH format

    Whoa, that is some impressive work there, grumpyoldman. Kudos to you!

  5. #5
    Tsar Stefan Dusan IV's Avatar Loonatic on the loose!!
    Join Date
    Dec 2006
    Location
    Belgrade, Serbia
    Posts
    458

    Default Re: Starting to unravel the MESH format

    Quote Originally Posted by grumpyoldman View Post
    I was expecting at least some sort of reaction .
    You are one of those genius minds that no one understands: "that guy is freackin' out, man, he says the world is round, huh! :shrugs:"
    That is awesome, man, I always believed that we will get the .mesh converter from someone within this community rather then from developers...
    I am no good at these things, and heaven't really understood much of Your first post , but as they say: "One picture, a thousand words".
    This guy deserves a +rep from all of us, especially 3D modelers, so, don't make me repeat myself...
    This is REALLY a BREAKTHROUGH!!!! Superb work, old man. You ROCK!!!
    Last edited by Tsar Stefan Dusan IV; February 16, 2007 at 09:30 AM.

  6. #6

    Default Re: Starting to unravel the MESH format

    I was expecting at least some sort of reaction .
    Every single word that you said in that first post flew right over my head. I have no idea what any of that means. And I think the reason why there is not much reaction is because no one else can understand any of it.

    But from the looks of it, and those pictures, GREAT WORK!!!

  7. #7

    Default Re: Starting to unravel the MESH format

    I Agree!!! +REP is the minimum (too bad I never get interested in programming 3ds plugins and scripts)

  8. #8
    Lusted's Avatar Look to the stars
    Join Date
    Jan 2005
    Location
    Brighton, Sussex, England.
    Posts
    18,184

    Default Re: Starting to unravel the MESH format

    Most of that technically babble went over my head as well, but fi you release a .mesh plugin script you will be reveared as a god by the community.
    Creator of:
    Lands to Conquer Gold for Medieval II: Kingdoms
    Terrae Expugnandae Gold Open Beta for RTW 1.5
    Proud ex-Moderator and ex-Administrator of TWC from Jan 06 to June 07
    Awarded the Rank of Opifex for outstanding contributions to the TW mod community.
    Awarded the Rank of Divus for oustanding work during my times as Administrator.

  9. #9

    Default Re: Starting to unravel the MESH format

    Amazing, please release it!

    We will all worship you if you do .

  10. #10
    Opifex
    Join Date
    Feb 2005
    Location
    New York, USA
    Posts
    15,154

    Default Re: Starting to unravel the MESH format

    Nice progress g.o.m, very impressive.


    "If ye love wealth greater than liberty,
    the tranquility of servitude greater than
    the animating contest for freedom, go
    home from us in peace. We seek not
    your counsel, nor your arms. Crouch
    down and lick the hand that feeds you,
    and may posterity forget that ye were
    our countrymen."
    -Samuel Adams

  11. #11
    Opifex
    Join Date
    Feb 2005
    Location
    New York, USA
    Posts
    15,154

    Default Re: Starting to unravel the MESH format

    I hope you go on, grumpy, this could prove invaluable in case there's a hitch on the CA side of things!


    "If ye love wealth greater than liberty,
    the tranquility of servitude greater than
    the animating contest for freedom, go
    home from us in peace. We seek not
    your counsel, nor your arms. Crouch
    down and lick the hand that feeds you,
    and may posterity forget that ye were
    our countrymen."
    -Samuel Adams

  12. #12
    Tsar Stefan Dusan IV's Avatar Loonatic on the loose!!
    Join Date
    Dec 2006
    Location
    Belgrade, Serbia
    Posts
    458

    Default Re: Starting to unravel the MESH format

    Yeah, keep us posted

  13. #13
    edders's Avatar Senator
    Join Date
    Jan 2006
    Location
    Around the world
    Posts
    1,397

    Default Re: Starting to unravel the MESH format

    Thank you for your hard work. Rep given .

  14. #14

    Default Re: Starting to unravel the MESH format

    As much as I'd like to understand the first post I don't, but this discovery could/may/will lead to us being able to edit the .mesh files. I would give you +1,000,000 rep but sadly I can only give you +1. If you do manage to fully extract/covert the .mesh files then you will be a living god, in my eyes at least.

  15. #15

    Default Re: Starting to unravel the MESH format

    I don't GOM is coming back, it has been 7 posts since he posted that last post over our posts. A sad day indeed.

  16. #16
    Soulghast's Avatar RAWR!
    Join Date
    Oct 2006
    Location
    Athens, Greece
    Posts
    3,912

    Default Re: Starting to unravel the MESH format

    Hopefully somebody can use this to go further.
    Here is your answer guys. A sad day, indeed.
    Ex-Curator
    Under the Patronage of Perikles
    Patron of Desperado † and Astaroth


    R.I.P Calvin

  17. #17
    KnightErrant's Avatar Decanus
    Join Date
    Jan 2007
    Location
    Huntsville, Alabama USA
    Posts
    578

    Default Re: Starting to unravel the MESH format

    He's still working on it. He was also able to do a
    siege engine which is a little different in its
    uv arrangement. He also said he was going to work
    on the mystery block some more. I just think he doesn't
    post unless he has something he considers important to say.

  18. #18

    Default Re: Starting to unravel the MESH format

    The project isn't dead. The crackers at the org are still working on it:
    http://forums.totalwar.org/vb/showthread.php?t=79414

  19. #19

    Default Re: Starting to unravel the MESH format

    Hi Guys

    I'm still working on it, but with some help over at the org. Main problem at the moment is I'm having mystery reboots so it means taking my pc apart and trying to find what's wrong. So far eliminated software, dust and power supply as problems, now to look at video card or motherboard (shudder).

    Any new info that people find from looking at the mesh files will be handy.

    Here's a pic of the culverin http://i150.photobucket.com/albums/s...7/culverin.png

    Cheers

    GrumpyOldMan

  20. #20

    Default Re: Starting to unravel the MESH format

    I'm writing here so to keep clean the discussion at the org (because it's in the wiki part).

    Maybe it's not needed but I want GOP, KE and Casuir feel the love from all the MTW2 modding community for the hard work they're doing. It's an obscure and unpleasant work but it will be the one that will let us bring into the game a lot of new wonderful ideas.

    We really appreciate your efforts, keep on going!

Page 1 of 13 1234567891011 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •