The Forum is up for sale: XeNTaX Forum looking for new owner

MSET RESEARCH PROJECT + FILES UPLOADED + SOURCES

Post questions about game models here, or help out others!
kkdf2
beginner
Posts: 24
Joined: Sun Oct 24, 2010 9:26 am
Location: Osaka japan
Has thanked: 2 times
Been thanked: 12 times

Re: MSET RESEARCH PROJECT + FILES UPLOADED + SOURCES

Post by kkdf2 »

Hi.

khkh_xldMii 8 (hacked): the matrix file format was revealed by hack.

{
uint32 cntFrame; // animation frame count
uint32 cntMatrix; // model's joint(matrix) count.
Matrix matrices[cntFrame][cntMatrix];
}

struct Matrix
{
float M11, M12, M13, M14;
float M21, M22, M23, M24;
float M31, M32, M33, M34;
float M41, M42, M43, M44;
}

matrix file viewing: http://www.youtube.com/watch?v=-lzvr4HuUxY

EDIT: the video shows visualization sample of the matrix data.

you expected matchstick?

each matrix is represented as a point.

the bone's hierarchy is in mdlx.
anyway we need mdlx for more accurate rendering.

Thanks
Last edited by kkdf2 on Sun Aug 14, 2011 12:46 pm, edited 1 time in total.
User avatar
Mirrorman95
ultra-veteran
ultra-veteran
Posts: 355
Joined: Tue Jul 20, 2010 2:08 am
Has thanked: 16 times
Been thanked: 24 times

Re: MSET RESEARCH PROJECT + FILES UPLOADED + SOURCES

Post by Mirrorman95 »

Shapyi, kkdf2, I have thoroughly enjoyed your work on the mset project. You have figured out how to crack the mset format. But why do you need to make all your youtube videos unlisted? What is the point of needing to have the link? Do you require a level of privacy in order to display the fruits of your labors? I mean, I certainly wouldn't come up with such developments, since I don't understand 3D formats, and I truly appreciate the achievements you've made on a deep level, but I can't understand why the videos need to be secret. And who is hack?

But seriously, great improvements; state-of-art accomplishments with the format.
BBSFM and KH2FM+ saves are compatible with KH2.5. viewtopic.php?t=13424
Shapyi
ultra-n00b
Posts: 5
Joined: Tue Aug 02, 2011 12:45 am

Re: MSET RESEARCH PROJECT + FILES UPLOADED + SOURCES

Post by Shapyi »

Mirrorman95 wrote:Shapyi, kkdf2, I have thoroughly enjoyed your work on the mset project. You have figured out how to crack the mset format. But why do you need to make all your youtube videos unlisted? What is the point of needing to have the link? Do you require a level of privacy in order to display the fruits of your labors? I mean, I certainly wouldn't come up with such developments, since I don't understand 3D formats, and I truly appreciate the achievements you've made on a deep level, but I can't understand why the videos need to be secret. And who is hack?

But seriously, great improvements; state-of-art accomplishments with the format.
Thanks but what I did was very minimal, kkdf2's viewer did all the hard work :)
Devilot
ultra-veteran
ultra-veteran
Posts: 443
Joined: Tue Sep 07, 2010 10:12 am
Has thanked: 159 times
Been thanked: 49 times

Re: MSET RESEARCH PROJECT + FILES UPLOADED + SOURCES

Post by Devilot »

subscribed to thread AND youtube channel. this is great work.
kkdf2
beginner
Posts: 24
Joined: Sun Oct 24, 2010 9:26 am
Location: Osaka japan
Has thanked: 2 times
Been thanked: 12 times

Re: MSET RESEARCH PROJECT + FILES UPLOADED + SOURCES

Post by kkdf2 »

Hi

Thanks for your indication. :wink:
Mirrorman95 wrote:Shapyi, kkdf2, I have thoroughly enjoyed your work on the mset project. You have figured out how to crack the mset format. But why do you need to make all your youtube videos unlisted? What is the point of needing to have the link? Do you require a level of privacy in order to display the fruits of your labors? I mean, I certainly wouldn't come up with such developments, since I don't understand 3D formats, and I truly appreciate the achievements you've made on a deep level, but I can't understand why the videos need to be secret. And who is hack?
I changed youtube videos into public, and more understandable title/comment.

It is fault of my lazyness. about pasting videos carelessly.

I'll insert the intention into my posts which caused pasting video link. with EDIT: lead.

Thanks
Xemnass
advanced
Posts: 74
Joined: Wed Jun 01, 2011 2:07 pm
Has thanked: 1 time
Been thanked: 3 times

Re: MSET RESEARCH PROJECT + FILES UPLOADED + SOURCES

Post by Xemnass »

kkdf2 wrote:Hi

Thanks for your indication. :wink:
Mirrorman95 wrote:Shapyi, kkdf2, I have thoroughly enjoyed your work on the mset project. You have figured out how to crack the mset format. But why do you need to make all your youtube videos unlisted? What is the point of needing to have the link? Do you require a level of privacy in order to display the fruits of your labors? I mean, I certainly wouldn't come up with such developments, since I don't understand 3D formats, and I truly appreciate the achievements you've made on a deep level, but I can't understand why the videos need to be secret. And who is hack?
I changed youtube videos into public, and more understandable title/comment.

It is fault of my lazyness. about pasting videos carelessly.

I'll insert the intention into my posts which caused pasting video link. with EDIT: lead.

Thanks
Perfect our first purpose was solved =D Thanks to the united work of Shapyi and kkdf2 =D
I've uploaded some MDLX + their own MSET fro a better rendering =D
owever a very good job =D

I almost finish the list I named and found almost all MDLX and figured it out what are they this is the sections which I finisched:

Monster ( Heartless and Nobodies, 100% )
NPC ( 100% )
P( 100% )
Weapon (100%)
MAP( 65 % )
F(Object 58 % )
Battle Model ( 100% )
Sora's Form ( 100% )
Guest Weapon ( 100% )
Worlds Models ( 100% )
H( I'm working on it whit today is 100% )

As i finish i will share a PDF whit an improved graphic =D

Whit our work but especially the work done by Shapyi and kkdf2 we are offering an usefull content and tools to all KH2 Fans =D

THANKS TO ALL FROM THE KH2 FAN

but the work is not yet finished =)

Left some things but the hard work was done ( cracking and solving the matrix )


Good joob to all =D

As I finish i will share the PDF =D



This is some samples:

MDLX+MSET SAMPLES
http://www.mediafire.com/?k0bexlyx3ubjm9s
My Signature:

Image Image Image



動力 馳森林熾!!! __物昨森林棋?!
revelation
mega-veteran
mega-veteran
Posts: 183
Joined: Mon May 12, 2008 5:15 pm
Has thanked: 5 times
Been thanked: 85 times

Re: MSET RESEARCH PROJECT + FILES UPLOADED + SOURCES

Post by revelation »

Well, i'll modify my plugin to load the format a little bit later, once i can fix whatever the heck it is i broke in the code that is keeping it from working the way it is supposed to when i recompile it.

i changed the format to support multiple animations per file so that it can be loaded in much the same way as the original MSET would have. i simply changed the file extension to ASET instead.

Code: Select all

{
uint32 dataTag; // 'ASET' tag
uint32 pad; // 0 - possibly useful as a version or something....
uint32 cntJoints; // joint count
uint32 cntAnims; // animation count
uint32 animOffsets[cntAnims]; // offsets to animation data (0 padded to next 16-byte boundary)
{
    uint32 animIndex; // animation index
    uint32 cntFrames; // animation frame count.
    uint32 pad;
    uint32 pad;
    char   animName[32]; // animation name padded to 32-bytes
    Matrix matrices[cntFrames][cntJoints];
}[cntAnims];
}

struct Matrix
{
float M11, M12, M13, M14;
float M21, M22, M23, M24;
float M31, M32, M33, M34;
float M41, M42, M43, M44;
}
i changed the dumping code from before like so:

Code: Select all

        private void DumpAnimations()
        {
            // get main mesh
            Mesh m = this._Sora[0];

            if (m == null || m.mdlx == null || m.mset == null)
                return;

            T31 t = m.mdlx.alt31[0];

            // Generate the file name
            string filename = m.mset.motionId;

            // change file extension
            filename = filename.ToUpper().Replace("MSET", "ASET");

            // Create a new memory stream
            MemoryStream mat_data = new MemoryStream();
            BinaryWriter mat_writer = new BinaryWriter(mat_data);
            FileStream outfile = File.OpenWrite(filename);
            int max_ticks = 1;
            int bone_count = t.t21.alaxb.Count;
            int anim_count = listView1.Items.Count;

            long file_start = mat_writer.BaseStream.Position;

            mat_writer.Write(("ASET").ToCharArray(0, 4)); // bone count (4 bytes)
            mat_writer.Write((int)0); // padding (4 bytes)
            mat_writer.Write(bone_count); // bone count (4 bytes)
            mat_writer.Write(anim_count); // animation count (4 bytes)

            // get start of animation offset array
            long offsets_start = mat_writer.BaseStream.Position;

            // move past animation offset array
            mat_writer.BaseStream.Position += ((anim_count * 4) + (0x0F)) & (~0x0F);

            int anim_num = 0;
            // Get the frame count (ticks)
            foreach (ListViewItem lvi in listView1.Items)
            {
                string anim_name = lvi.Text;
                anim_name = anim_name.Replace('#', '_');

                // get motion info
                MotInf mi = ((MotInf)lvi.Tag);
                max_ticks = (int)mi.maxtick;

                // animation data position
                long anim_start = mat_writer.BaseStream.Position;

                // data offset array position
                mat_writer.BaseStream.Position = offsets_start + (anim_num * 4);

                // write animation data offset
                mat_writer.Write((int)anim_start); // bone count (4 bytes)

                // reset animation data position
                mat_writer.BaseStream.Position = anim_start;

                // write animation header
                mat_writer.Write((int)anim_num); // animation index (4 bytes)
                mat_writer.Write((int)max_ticks); // frame (tick) count (4 bytes)
                mat_writer.Write((int)0); // padding (4 bytes)
                mat_writer.Write((int)0); // padding (4 bytes)

                // write animation name
                mat_writer.Write(anim_name.ToCharArray(0, anim_name.Length));

                // move to matrix data start
                mat_writer.BaseStream.Position += (32 - anim_name.Length);

                // increment animation index
                ++anim_num;

                // output all the matrix transforms for each frame
                for (int i = 0; i < max_ticks; i++)
                {
                    // set current tick
                    tick = i;
                    // this tell his viewer to calculate the animation for the frame
                    this.calcbody(m.ctb, m, mi.mt1);

                    // output each matrix for each bone (matrix4x4 * 4 bytes)

                    for (int bn = 0; bn < bone_count; ++bn)
                    {
                        Matrix mat = m.Ma[bn];
                        /* Matrix Format
                           [M11][M12][M13][M14]
                           [M21][M22][M23][M24]
                           [M31][M32][M33][M34]
                           [M41][M42][M43][M44]
                        */
                        mat_writer.Write((float)mat.M11); mat_writer.Write((float)mat.M12); mat_writer.Write((float)mat.M13);
                        mat_writer.Write((float)mat.M14);

                        mat_writer.Write((float)mat.M21); mat_writer.Write((float)mat.M22); mat_writer.Write((float)mat.M23);
                        mat_writer.Write((float)mat.M24);

                        mat_writer.Write((float)mat.M31); mat_writer.Write((float)mat.M32); mat_writer.Write((float)mat.M33);
                        mat_writer.Write((float)mat.M34);

                        mat_writer.Write((float)mat.M41); mat_writer.Write((float)mat.M42); mat_writer.Write((float)mat.M43);
                        mat_writer.Write((float)mat.M44);
                    }
                }
            }

            // Output all the bytes to a file
            byte[] b_data = mat_data.ToArray();

            outfile.Write(b_data, 0, b_data.Length);

            outfile.Close();

            MessageBox.Show("Animation transforms dumped.", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
At the moment it exports all animation presently loaded. Was planning on adding a progress dialog so that you can tell that processing is still going on. Feel free to modify it as necessary. If i can fix whatever is causing the issues on my end, i'll post a modified version of the viewer here. Other than that i should hopefully be able to post an updated plugin supporting the above format soon.
Xemnass
advanced
Posts: 74
Joined: Wed Jun 01, 2011 2:07 pm
Has thanked: 1 time
Been thanked: 3 times

Re: MSET RESEARCH PROJECT + FILES UPLOADED + SOURCES

Post by Xemnass »

Good Work revelations =D

But One only question: You say that you changed the file extension from MSET to ASET so when we want to load we have to change the MSET file Extensions to ASET if is as I undesrtand, after all isn't a problem we can use a bat file whit the REN command yet Inserted =D


For what regarding my list I'm compiling the PDF File =D

@KKDF2: As was yet said in this topic the ANB files are also a valid MSET animation.... and using you anb2msewt converter he can convert ANB to MSET but I find an issue:

Almost all ANB ( for B,F,N,M,..., Model ) work fine.... but...... when i try to convert the ANB of H Model ( spekable Model ) when I load in you viewer it messup the face section... =(
My Signature:

Image Image Image



動力 馳森林熾!!! __物昨森林棋?!
Shapyi
ultra-n00b
Posts: 5
Joined: Tue Aug 02, 2011 12:45 am

Re: MSET RESEARCH PROJECT + FILES UPLOADED + SOURCES

Post by Shapyi »

revelation wrote:Well, i'll modify my plugin to load the format a little bit later, once i can fix whatever the heck it is i broke in the code that is keeping it from working the way it is supposed to when i recompile it.

i changed the format to support multiple animations per file so that it can be loaded in much the same way as the original MSET would have. i simply changed the file extension to ASET instead.
Are you using the source code posted in this thread? Or do you have a better version? Because I can't get that to compile at all, maybe I didn't put enough time into it.

Anyway, what kind of problems are you having? Can you be more specific? Your code looks good but I wanted to test it out to see if I can find any issues with it. Thanks.
Xemnass
advanced
Posts: 74
Joined: Wed Jun 01, 2011 2:07 pm
Has thanked: 1 time
Been thanked: 3 times

Re: MSET RESEARCH PROJECT + FILES UPLOADED + SOURCES

Post by Xemnass »

Shapyi wrote:
revelation wrote:Well, i'll modify my plugin to load the format a little bit later, once i can fix whatever the heck it is i broke in the code that is keeping it from working the way it is supposed to when i recompile it.

i changed the format to support multiple animations per file so that it can be loaded in much the same way as the original MSET would have. i simply changed the file extension to ASET instead.
Are you using the source code posted in this thread? Or do you have a better version? Because I can't get that to compile at all, maybe I didn't put enough time into it.

Anyway, what kind of problems are you having? Can you be more specific? Your code looks good but I wanted to test it out to see if I can find any issues with it. Thanks.
I'm according whit you, I'm too want to test your plugin revelations
My Signature:

Image Image Image



動力 馳森林熾!!! __物昨森林棋?!
chrrox
Moderator
Posts: 2602
Joined: Sun May 18, 2008 3:01 pm
Has thanked: 57 times
Been thanked: 1411 times

Re: MSET RESEARCH PROJECT + FILES UPLOADED + SOURCES

Post by chrrox »

He is just posting the animation loading code not the entire plugin.
Xemnass
advanced
Posts: 74
Joined: Wed Jun 01, 2011 2:07 pm
Has thanked: 1 time
Been thanked: 3 times

Re: MSET RESEARCH PROJECT + FILES UPLOADED + SOURCES

Post by Xemnass »

Xemnass wrote:
Shapyi wrote:
revelation wrote:Well, i'll modify my plugin to load the format a little bit later, once i can fix whatever the heck it is i broke in the code that is keeping it from working the way it is supposed to when i recompile it.

i changed the format to support multiple animations per file so that it can be loaded in much the same way as the original MSET would have. i simply changed the file extension to ASET instead.
Are you using the source code posted in this thread? Or do you have a better version? Because I can't get that to compile at all, maybe I didn't put enough time into it.

Anyway, what kind of problems are you having? Can you be more specific? Your code looks good but I wanted to test it out to see if I can find any issues with it. Thanks.
I'm according whit you, I'm too want to test your plugin revelations

Yhea, I 've yet Understood by myself indded i was mean when he made the new Beta-Plugin =D XD
My Signature:

Image Image Image



動力 馳森林熾!!! __物昨森林棋?!
Xemnass
advanced
Posts: 74
Joined: Wed Jun 01, 2011 2:07 pm
Has thanked: 1 time
Been thanked: 3 times

Re: MSET RESEARCH PROJECT + FILES UPLOADED + SOURCES

Post by Xemnass »

Ladies and gentleman i will show you my List whit an improved graphic:


In this list still:
The Object section ( there is a lot of object so when I ahve more time i will do this )
and the MAP section( I will compile this very,very soon )

However This is the mdeol covered by my list:

B_ Model
H_ Model
M_ Model
N_ Model
P_ Model
W_ Model
WM_ Model

So the 90% of all the dump.


For this dump I've use the KHDumperX and the ISO of Kingdom Hearts II FInal Mix + =D =D =D =D =D

Enjoy, rate and Comment =D

List 1.0.PDF
http://www.mediafire.com/?nspnj9r647dywjj
My Signature:

Image Image Image



動力 馳森林熾!!! __物昨森林棋?!
revelation
mega-veteran
mega-veteran
Posts: 183
Joined: Mon May 12, 2008 5:15 pm
Has thanked: 5 times
Been thanked: 85 times

Re: MSET RESEARCH PROJECT + FILES UPLOADED + SOURCES

Post by revelation »

Well i have updated my plugin code to load the associated ASET file instead of MSET. Now just have to create a working version of the conversion process and we'll be set. Looks great for the animations that are currently processed correctly by the viewer. i have attached the plugin here, and can hopefully have a working MSET to ASET conversion out sometime soon. Since currently the animation data relies on the hierarchy information from the MDLX in order to compute the inverse transforms it automatically looks for an ASET file with the same name (as is output by the function i posted earlier). i suppose i could include the hierarchy in the format so that drag and drop would be supported, but for now this is probably a bit safer. i may add some more error checking later on as well.

i also need to do some more testing to determine what the best default frame rate is, as it seems a bit slow at 30 fps, but is good enough for initial testing.

Other than that i will still continue on investigating the MSET processing in more detail in order to get a more complete implementation of the animation data as i am able to make time for it.

Hope it helps.


EDIT: and for those that want to test... http://www.mediafire.com/?tfub75a6mgngmk7 And yes, matrix keyframes enlarges the animation data that much...
You do not have the required permissions to view the files attached to this post.
kkdf2
beginner
Posts: 24
Joined: Sun Oct 24, 2010 9:26 am
Location: Osaka japan
Has thanked: 2 times
Been thanked: 12 times

Re: MSET RESEARCH PROJECT + FILES UPLOADED + SOURCES

Post by kkdf2 »

Hi.
Xemnass wrote:@KKDF2: As was yet said in this topic the ANB files are also a valid MSET animation.... and using you anb2msewt converter he can convert ANB to MSET but I find an issue:

Almost all ANB ( for B,F,N,M,..., Model ) work fine.... but...... when i try to convert the ANB of H Model ( spekable Model ) when I load in you viewer it messup the face section... =(
it is viewer's problem.
it'll cause if 3 or more vertices belong to one joint (skin weights). new release supports up to 5.

I fixed your issue some while ago. here is new one!
http://kkdf2.sakura.ne.jp/pcsx2lair/Release_11.7z
pass 2

would you plz try this release?

Thanks
Post Reply