Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!   (85,239 visits to this link)

    2. News

    1. GTA Online

      1. Find Lobbies & Players
      2. Guides & Strategies
      3. Vehicles
      4. Content Creator
      5. Help & Support
    2. Crews

      1. Events
      2. Recruitment
    1. Grand Theft Auto Series

    2. GTA Next

    3. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    4. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    5. GTA Chinatown Wars

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    9. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    12. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption 2

    2. Red Dead Redemption

    3. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Forum Support

    2. Site Suggestions

Sign in to follow this  
Leeao

[3DSMAX|REL] Manhunt2 MDL Importer/Exporter

Recommended Posts

Leeao

This is my Manhunt2 MDL Importer/Exporter script for 3dsMax.

 

Features:

  • Import: Manhunt2 PC MDL,Manhunt2 PSP/PS2/WII DFF models
  • Export: Manhunt2 PC MDL
Note:
  • PSP/PS2 some models of the face direction is reversed. You need to manually flip the face normal to fix it.
Welcome Feedback & Bug Reports. Thanks!

 

 

Manhunt2 MDL IO Requirement

 

All 3dsMax Version (I'm on max2014 development,theoretically support all versions.)

 

.NET framework 4.0 or Higher

 

 

Information

 

Revision Version Release Date: Oct 1, 2015

First Version Release Date:9/26/2013

 

Download

-------------

 

http://1drv.ms/1k3cLHf

http://pan.baidu.com/s/1pJG32Kr

Google Drive

 

Thanks

 

Fatduck

MAJEST1C_R3

41hc1

 

Changelogs

-----------

 

 

2015-10-1 Release v1.2

Added WII DFF Importer.

Optimize the normal data input and output.

Added welding uv data feature, remove redundant data.

2015-9-10 Release v1.1

Fixed UV2 export errors, major updates.

Fixed material problem, automatically remove unwanted materials.

Fixed export invalid skin weight problems.

 

2014-10-25 Release v1.0

Add MDL Exporter.

Add Z2HM/MH2Z Resources Manager. You can freedom decompress/compress manhunt2 Z2HM Resources(for example: *.mdl,*tex,*.ifp..etc).

Importer Add Welding vertices smooth model feature.

Add 2nd UV Map import/export.

Add support custom bone type export(For example: Custom animation,specify animkey ID. Add new custom weapon and ped etc..).

Change unpack .tex to dds textures ways.

Change importer decompress ZLIB/Z2HM Resources ways. All MAX versions can be used.

 

2014-7-28 Release v0.9

Thanks 41hc1 Bug Reports.

Fixed import crash. Changed the way the bones import.

 

2014-7-27 Release v0.8

Add PS2/PSP *.DFF Model File Support! Mesh,UV,Bone,Skin,Texture,VertColor!

Optimized PC MDL version code!

Thanks MAJEST1C_R3 provided PS2 format information.

 

2014-2-18 Release v0.6

Fixed Skin Info Error, Thanks Majestic Report bug!

 

2014-2-17 Release v0.5

Add older version 3dsmax support, older version don't need .net *.dll file.single run

. Note: need decompress MDL file.Can use Manthun2MDLEditor Decompress.

fixed VertexColor error

Add Model Normal support

 

2013-10-4 Release v0.2

Fixed Import All Model Error. Add one type model support.

Add support VertexColor and On/Off Auto show textures.

2013-9-26 Release v0.1

Support for multiple material

Supports auto show texture

The default is automatically applied *.MDL file in the same directory textures,support. DDS. PNG. TGA or .BMP format.

Support Bones/Skin

Support multiple Mesh import

Support .TEX format image batch unpack (DDS format)

 

 

jwjkY1V.png21829619096_7d6d5051a4_o.png

uu7s.png

 

Manhunt2 MDL Editor:

EMneXpW.png

21843899262_c7688e2ab5_o.png

Download see above "Download".

 

 

 

Video Tutorials:

 

1.Manhunt2 Character MOD Skin Rigging Tutorials

https://www.youtube.com/watch?v=Yi9BRkSK4Fo

Google+

 

sample file:

https://drive.google.com/file/d/0B1Tyu12_4Pg2RXVnb0FxMndxb2M/view?usp=sharing

 

 

 

2.Convert Manhunt1 dff models to Manhunt2 mdl format

https://www.youtube.com/watch?v=u1NkzinGxAI

Google+

 

sample file:

https://drive.google.com/file/d/0B1Tyu12_4Pg2OHljMVVjRVFTczg/view?usp=sharing

 

Thanks MetalKitten help me upload to youtube! :lol:

 

my manhunt2 mods:

http://pan.baidu.com/s/1xsqeU

Edited by Leeao

Share this post


Link to post
Share on other sites
ALMOST610

Bloody awesome Top Notch Work!!!

 

Its even better having all those subtools included in the scripts too.

Share this post


Link to post
Share on other sites
Leeao

Bloody awesome Top Notch Work!!!

 

Its even better having all those subtools included in the scripts too.

:lol: Thanks!

Are you interested to try it(manhunt2 mod)?

 

Here it seems less popular :cry:

Share this post


Link to post
Share on other sites
cj2000

 

Bloody awesome Top Notch Work!!!

 

Its even better having all those subtools included in the scripts too.

:lol: Thanks!

Are you interested to try it(manhunt2 mod)?

 

Here it seems less popular :cry:

 

Why not popular? It looks really awsome, the only problem for me is the download link, that not worcks, but it could be just an other problem of the f***ing PC, I have to worck now with.

Share this post


Link to post
Share on other sites
Leeao

Update:

2015-9-10 Release v1.1

Fixed UV2 export errors, major updates.

Fixed material problem, automatically remove unwanted materials.

Fixed export invalid skin weight problems.

 

Download

http://1drv.ms/1k3cLHf

http://pan.baidu.com/s/1pJG32Kr

https://drive.google.com/folderview?id=0B1Tyu12_4Pg2fkpQUVJvWlV1Q0tLU1F5YWlDeGlkWmtJUFI4TGZfYmNVRVhXZ3lmQkJ1OW8&usp=sharing

Edited by Leeao

Share this post


Link to post
Share on other sites
Leeao

Manhunt2 MDL Editor added wii dff support .

I'm now working write a wii dff2mdl pc format model converter ,a part of MDL Editor.
21423867662_bc39f64c02_n.jpg

Edited by Leeao

Share this post


Link to post
Share on other sites
Leeao

Manhunt2 MDL IO update:

2015-10-1 Release v1.2

Added WII DFF Importer.

Optimize the normal data input and output.

Added welding uv data feature, remove redundant data.

21843817532_8b8b08e354_o.png21829619096_7d6d5051a4_o.png

 

Manhunt2 MDL/DFF Editor update:

2015-10-1 Release Version1.7

-Added WII DFF version model edit

-Added an WII DFF to PC MDL Format Converter

21843899262_c7688e2ab5_o.png

 

Download

http://1drv.ms/1k3cLHf

http://pan.baidu.com/s/1pJG32Kr

https://drive.google.com/folderview?id=0B1Tyu12_4Pg2fkpQUVJvWlV1Q0tLU1F5YWlDeGlkWmtJUFI4TGZfYmNVRVhXZ3lmQkJ1OW8&usp=sharing

Edited by Leeao

Share this post


Link to post
Share on other sites
chormi

I need manhunt1 ifp import/export script for 3ds max. If somebody have please let me know on pm. Thanks.

Edited by chormi

Share this post


Link to post
Share on other sites
Leeao

I need manhunt1 ifp import/export script for 3ds max. If somebody have please let me know on pm. Thanks.

Perhaps in the future I will add support for it. There COL format, INST format, BSP format. I have plans to add support for them.

 

 

================================================

 

 

MDL IO UPD:

2015-10-26 Release v1.3

Add a new welding vertex algorithms.

Improved algorithm to recalculate normals.

Fixed a model transparent BUG.

Fixed some minor issues.

DaYkbpB.png

MDL Editor UPD:

2015-10-15 Release Version 1.85

-Fixed old version Manhunt2 MDL Editor created or saved files compatibility issues.(Fixed the old version of the file transparent bug).

-Improved decompression and compression mode.

 

2015-10-10 Release Version 1.8

-Fixed a model invisible/popping bug.

-Optimize the textures name part of the code.

 

invisible/popping bug Before

NBMIQAW.jpg?1

Fixed invisible/popping bug After

XQqhE5r.png

Edited by Leeao

Share this post


Link to post
Share on other sites
cj2000

I need manhunt1 ifp import/export script for 3ds max. If somebody have please let me know on pm. Thanks.

Doesn´t the import script for GTA SA ifp worck for it?

Share this post


Link to post
Share on other sites
cj2000

OK checked it and know that Manhunt ifp Format not the same with GTA ones. Both parts of Manhunt use quite the same ifp Format, the bigest diference is that Manhunt 2 ifps are compressed with zlib/deflate. Some structures used in Manhunt ifp:

 

fourCCHeader{
char fourCC[4];
}

FileHeader{
fourCCHeader header;//ANCT
unsigned int blocs;
}

BlocHeader{
fourCCHeader header1;//BLOC
unsigned int strSize;
char name[strSize];
fourCCHeader header2;//ANPK
unsigned int animations;//?
}

AnimationHeader{
fourCCHeader header;//NAME
unsigned int strSize;
char name[strSize];
unsigned int seqs;
unsigned int unk1;
float unk2;
}

SeqHeader{
fourCCHeader header;//SEQU MH1, SEQT MH2
unsigned char unk1;
unsigned char unk2;
unsigned char unk3;
unsigned char frames;
}

Sequence{
SeqHeader header;
Frame frames[header.frames];
}

Animation{
AnimationHeader header;
Sequence sequences[header.seqs];
}

Bloc{
BlocHeader header;
Animation animations[header.animations];
}

IfpFile{
FileHeader header;
Bloc blocs[header.blocs];
}

 

I know it´s not 100% corect C/C++.

Edited by cj2000

Share this post


Link to post
Share on other sites
Leeao

OK checked it and know that Manhunt ifp Format not the same with GTA ones. Both parts of Manhunt use quite the same ifp Format, the bigest diference is that Manhunt 2 ifps are compressed with zlib/deflate. Some structures used in Manhunt ifp:

It's cool man! :lol: in fact, I have researching this format before.

You missing the SEQU/SEQT details.

A few days later I will post the full format. Some MH1, MH2 resource format. I also write my new script and editing tools support for them.

Share this post


Link to post
Share on other sites
cj2000

 

OK checked it and know that Manhunt ifp Format not the same with GTA ones. Both parts of Manhunt use quite the same ifp Format, the bigest diference is that Manhunt 2 ifps are compressed with zlib/deflate. Some structures used in Manhunt ifp:

It's cool man! :lol: in fact, I have researching this format before.

You missing the SEQU/SEQT details.

A few days later I will post the full format. Some MH1, MH2 resource format. I also write my new script and editing tools support for them.

 

Didn´t know, you already have researched this format. I know that SEQU/SEQT details are missing, was not really able to encrypt it..

Share this post


Link to post
Share on other sites
Leeao

Didn´t know, you already have researched this format. I know that SEQU/SEQT details are missing, was not really able to encrypt it..

Do not worry, the format came. :lol:

 

 

------------------------------------------------------------------

Manhunt 1&2 IFP Format Animation Library

 

//--------------------------------------//--- 010 Editor v6.0 Binary Template//// File: Manhunt 1/2 IFP Format Anim Library// Author: Allen(Leeao)// Revision:// Purpose:Manhunt 1/2 Animation//--------------------------------------typedef struct{char    ANPK[4];DWORD   numAnimPack;struct {    char    NAME[4];    DWORD   AnimNameLen;    char    AnimName[AnimNameLen];    DWORD   numBones;   //number of SEQT(bones)    DWORD   ChunkSize;  //this value is all SEQT data size , not include SEQT header size 9 bytes and end size 4 bytes( a float ).    float   FrameTimesCount;    //frames count = FrameTimesCount/30.0     local int i;    struct{        char    flag[4];    //SEQT(Manhunt 2) SEQU(Manhunt 1)        short   BoneID;     //Animation Bone ID        byte    FrameType;  //1-quat; 2-quat,translate; 3-translate;        short   frames;        short   StartTime;  //need /2048.0*30 get frameid value        if (FrameType > 2)        {            if(StartTime>0){short   unknown;}            short   unknown2[3];    //Initialization position??        }        else        {            if(StartTime==0) FSeek(FTell()-2);        }        for(i=0;i<frames;i++)        {            struct{                if(StartTime==0)                {                    short   time;   //(in seconds)= time/2048.0 get seconds value                                    // Time base on StartTime,Need add all prev times count(StartTime+=time).                                    //FrameID = time/2048.0*30 get frame ID                }   //else time = startFrameID(StartTime/2048.0*30) + i                if (FrameType < 3) short   quatXYZW[4];     //need /2048.0 get value                if (FrameType > 1) short   positionXYZ[3]; //need /2048.0 get value            }frame;        }            if (flag=="SEQT")float    LastFrameTime;//If (StartTime==0)value = last framedata's time/2048.0                                                 //or If (StartTime>0) , unknown time    }SEQT[numBones]<optimize=false>;    int     headerSize;     //Always is 0x10;particle effects section    float   unknown;    int     eachEntrySize;  //MH1 64Bytes MH2 160Bytes    int     numEntry;       //num particle effects section    if(numEntry>0)    {        /*        Manhunt 2 particle effects section 160 bytes per data.        The following sections from the Majestic on projectmanhunt.com/forums        */        for (i=0;i<numEntry;i++)        {            if(SEQT[0].flag=="SEQT")            struct{                float   time;                int     unknown;                int     unknown2;                char    CommandName[64];                int     unknown3;                int     BoneID;     //Animation Bone ID                char    particleName[8];                float   particlePosition[7];                byte    unknown4[40];            }entry;            else if(SEQT[0].flag=="SEQU")            {                            struct{                float   time;                int     unknown;                int     unknown2;                int     unknown3;                int     unknown4;                int     BoneID;     //Animation Bone ID                char    particleName[8];                float   particlePosition[7];                int     unknown5;            }entry;            }         }    }}AnimPackEntry[numAnimPack]<optimize=false>;}ANPK;typedef struct{    char    BLOC[4];    DWORD   BlockNameLen;    char    BlockName[blockNameLen];    ANPK    AnimPack;}BLOC;typedef struct{char    ANCT[4];DWORD   numBlock;BLOC    block[numBlock]<optimize=false>;}ANCT;
Manhunt 1&2 IFP Format

 

#include "Manhunt IFP anim library.bt"ANCT anct;
There are some format I do not post out. You can download here.

DOWNLOAD

 

It includes:

Manhunt 1 inst,col,ifp format

Manhunt 2 inst,col,ifp,font,gxt,mdl,strmanim_pc.bin,tex/txd format.

 

About Manhunt 1/2 BSP format some details have not done. Perhaps in the future release.

Edited by Leeao

Share this post


Link to post
Share on other sites
cj2000

 

Didn´t know, you already have researched this format. I know that SEQU/SEQT details are missing, was not really able to encrypt it..

Do not worry, the format came. :lol:

 

 

------------------------------------------------------------------

Manhunt 1&2 IFP Format Animation Library

 

//--------------------------------------//--- 010 Editor v6.0 Binary Template//// File: Manhunt 1/2 IFP Format Anim Library// Author: Allen(Leeao)// Revision:// Purpose:Manhunt 1/2 Animation//--------------------------------------typedef struct{char    ANPK[4];DWORD   numAnimPack;struct {    char    NAME[4];    DWORD   AnimNameLen;    char    AnimName[AnimNameLen];    DWORD   numBones;   //number of SEQT(bones)    DWORD   ChunkSize;  //this value is all SEQT data size , not include SEQT header size 9 bytes and end size 4 bytes( a float ).    float   FrameTimesCount;    //frames count = FrameTimesCount/30.0     local int i;    struct{        char    flag[4];    //SEQT(Manhunt 2) SEQU(Manhunt 1)        short   BoneID;     //Animation Bone ID        byte    FrameType;  //1-quat; 2-quat,translate; 3-translate;        short   frames;        short   StartTime;  //need /2048.0*30 get frameid value        if (FrameType > 2)        {            if(StartTime>0){short   unknown;}            short   unknown2[3];    //Initialization position??        }        else        {            if(StartTime==0) FSeek(FTell()-2);        }        for(i=0;i<frames;i++)        {            struct{                if(StartTime==0)                {                    short   time;   //(in seconds)= time/2048.0 get seconds value                                    // Time base on StartTime,Need add all prev times count(StartTime+=time).                                    //FrameID = time/2048.0*30 get frame ID                }   //else time = startFrameID(StartTime/2048.0*30) + i                if (FrameType < 3) short   quatXYZW[4];     //need /2048.0 get value                if (FrameType > 1) short   positionXYZ[3]; //need /2048.0 get value            }frame;        }            if (flag=="SEQT")float    LastFrameTime;//If (StartTime==0)value = last framedata's time/2048.0                                                 //or If (StartTime>0) , unknown time    }SEQT[numBones]<optimize=false>;    int     headerSize;     //Always is 0x10;particle effects section    float   unknown;    int     eachEntrySize;  //MH1 64Bytes MH2 160Bytes    int     numEntry;       //num particle effects section    if(numEntry>0)    {        /*        Manhunt 2 particle effects section 160 bytes per data.        The following sections from the Majestic on projectmanhunt.com/forums        */        for (i=0;i<numEntry;i++)        {            if(SEQT[0].flag=="SEQT")            struct{                float   time;                int     unknown;                int     unknown2;                char    CommandName[64];                int     unknown3;                int     BoneID;     //Animation Bone ID                char    particleName[8];                float   particlePosition[7];                byte    unknown4[40];            }entry;            else if(SEQT[0].flag=="SEQU")            {                            struct{                float   time;                int     unknown;                int     unknown2;                int     unknown3;                int     unknown4;                int     BoneID;     //Animation Bone ID                char    particleName[8];                float   particlePosition[7];                int     unknown5;            }entry;            }         }    }}AnimPackEntry[numAnimPack]<optimize=false>;}ANPK;typedef struct{    char    BLOC[4];    DWORD   BlockNameLen;    char    BlockName[blockNameLen];    ANPK    AnimPack;}BLOC;typedef struct{char    ANCT[4];DWORD   numBlock;BLOC    block[numBlock]<optimize=false>;}ANCT;
Manhunt 1&2 IFP Format

 

#include "Manhunt IFP anim library.bt"ANCT anct;
There are some format I do not post out. You can download here.

DOWNLOAD

 

It includes:

Manhunt 1 inst,col,ifp format

Manhunt 2 inst,col,ifp,font,gxt,mdl,strmanim_pc.bin,tex/txd format.

 

About Manhunt 1/2 BSP format some details have not done. Perhaps in the future release.

 

Really great worck. For Manhunt 2 BSP format you could ask Majestic, hi has writen an importer for this format.

Share this post


Link to post
Share on other sites
Leeao

Really great worck. For Manhunt 2 BSP format you could ask Majestic, hi has writen an importer for this format.

Thanks man! I think he is quite busy. I already know most of, but did not get to know some of the details.

Edited by Leeao

Share this post


Link to post
Share on other sites
Skript47

 

Really great worck. For Manhunt 2 BSP format you could ask Majestic, hi has writen an importer for this format.

Thanks man! I think he is quite busy. I already know most of, but did not get to know some of the details.

 

So that is finished tool?
You're not gonna:
1) Add multiple export and delete function
2) Include DLL into EXE
3) Change awful interface with buttons to context menu and delete popup message when program closed
4) Increase performance
?
Also i tested importer and it's don't work well with most of models:
2cy2mia.jpg

Share this post


Link to post
Share on other sites
Blackalien

The tool is awesome man, geat work on it! Any possible way to make MDL to DFF, since I would like to add some Manhunt 2 stuff in GTA.

Edited by Blackalien

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.