.MGN animated meshes and .SKT skeletons

Sunrunner_Charina

New Member
Joined
Sep 1, 2010
Messages
35
Okay, I've about exhausted my ability to figure out the .mgn files, which is O.K. because anyone who reads the MGN and MGN Forms pages I've updated knows there's not a whole lot left to figure out.

I've got a few things I need to work out still. One is the purpose of SKMG\ZTO_ form. I know it's related to the other Object Zone forms, but no clue what it's for.

BLT and BLTS sections seem straightforward, though I need to work out the specifics. Yuqod, lemme know how those suggestions pan out, please?

Most importantly, though, if anyone can figure out .SKT files, please, let me know! It's all quaternions, or so it seems, and I hate quaternions.

Discuss :)
 

Sunrunner_Charina

New Member
Joined
Sep 1, 2010
Messages
35
Updates are slow, I know, but I've been trying not to burn out on this one script.

Yuquod and I worked out the blend morphs. I've got those in an unreleased version of the import script right now.

I'm looking into some options for changing the script a little. I'm definitely looking into gui-fying it, to add some options (like duplicate vertice removal that doesn't break most meshes.) I'm looking at several options for this; the first is just using the existing script in Blender 2.49 and using it's (limited) gui functions.

The second and probably more future-stable is porting the code over to Blender 2.5; the Blender Foundation claims the Python API is almost final, and although I have reservations about the program, I think maybe the best option would be going there.

My final option is 3DS Max. I say final for a reason; I don't know the MaxScript API very well at all, and I know even less about the actual program. Also, price point would make things rough for people like myself, who have no money, to use the scripts.

Lexx2k said:
If iam correct the MGN files contain models for game, and i have script which can import and open them in 3dsmax, it isn't hard to import them, but exporting is not possible at this moment. Also problem in this script is that it imports everything in triangles, instead of Quads.
You're going to end up with triangles no matter who writes the importer or what program they use. Yes, quads are extremely important for animations and topology, but any real-time application is going to use strictly tris at run-time. The mesh formats for Galaxies, both .mgn and .msh just don't have any data on what the 'original' quads the developers used look like, so trying to re-build them from the stored tris would just be programmatic guesswork.
 

Kaimana17

New Member
Joined
Sep 2, 2010
Messages
12
This thread needs more attention! I dont know too much about scripts etc, but I hope this comes out as it would be VERY useful for SWGemu regarding new content!

Keep up the good work :)
 

Sunrunner_Charina

New Member
Joined
Sep 1, 2010
Messages
35
ARGH! The skeleton files are killing me! I don't understand how these translations work.

I know, or at least suspect, what all of the values do, but I have no idea how they do it.

Each bone has four values; RPRE, RPST, BPTR, BPRO

RPRE is four floats, MOST OFTEN, 1.0, 0.0, 0.0, 0.0; a unit vector, maybe a quaternion, I don't really know. It specifies the 'initial' rotation of the bone, relative to parent.

RPST is the 'final' rotation of the bone... the direction it points. This also becomes the new 'base' direction for child bones.

I know BPTR is the bone's location, a 3vec, relative to the bone's parent... the space for this transform comes from RPST I'm pretty sure.

Finally, I think BPRO is the bone's Roll.

I just don't know how to combine all the values to get the proper locations and orientations; No matter what I do the end result just ends up wrong.

I just.... arugh!
 

yuqod

New Member
Joined
Sep 24, 2010
Messages
1
Hi,

good work. maybe you can make the last version of the script available so i can have a look at how the bones are doing at the moment?

im wondering why the value (1,0,0,0) pops up so much. if it's a quaternion its not doing any rotation. maybe there are a lot of cases where no rotation is needed for the child bones. (like upper arm lower arm e.g. if its straightened in normal pose and legs and straight fingers...). also im wondering why the roll of the bone would be handled seperately from the other rotations?

regards
 

KevinSmith

New Member
Joined
Dec 24, 2010
Messages
4
Sunrunner_Charina said:
My final option is 3DS Max. I say final for a reason; I don't know the MaxScript API very well at all, and I know even less about the actual program. Also, price point would make things rough for people like myself, who have no money, to use the scripts.
I dont know about the rules or etiquette on a subject as touchy as this, but a 2010 32/64 bit version of Autodesk 3DS MAX is currently being shared on pirate bay.

Apologies if I have broken a rule by mentioning that site; I just want to help.
 

Valkyra

Member
Joined
Aug 31, 2010
Messages
211
KevinSmith said:
I dont know about the rules or etiquette on a subject as touchy as this, but a 2010 32/64 bit version of Autodesk 3DS MAX is currently being shared on pirate bay.

Apologies if I have broken a rule by mentioning that site; I just want to help.
I am not sure that mentioning warez is against the rules here; I have yet to find a thread/area stating that. But best to ask Davin.
 

r3x

New Member
Joined
Dec 13, 2012
Messages
2
(i put this reply in the wrong thread before)....this problem bugged me for ages too. I looked at Xunil's code but it led me slightly astray for a while. The key discovery for me was that the skeleton file (skt) quaternions are in W,X,Y,Z order, *not* X,Y,Z,W. An identity quaternion (which doesn't modify anything) is (X:0, Y:0, Z:0, W: 1)...which corresponds to all the 1,0,0,0 entries in the file you guys noticed. You can build a local transformation matrix by multiplying the offset * pre rotation quat * post rotation quat. Skeletons are now working for me...but i tore out a lot of hair debugging this :)
 

Sunrunner_Charina

New Member
Joined
Sep 1, 2010
Messages
35
r3x said:
... The key discovery for me was that the skeleton file (skt) quaternions are in W,X,Y,Z order, *not* X,Y,Z,W. An identity quaternion (which doesn't modify anything) is (X:0, Y:0, Z:0, W: 1)...which corresponds to all the 1,0,0,0 entries in the file you guys noticed. You can build a local transformation matrix by multiplying the offset * pre rotation quat * post rotation quat. Skeletons are now working for me...but i tore out a lot of hair debugging this :)
I haven't touched my code in months, but I may resurrect it to play around a bit; I thought I was loading them WXYZ, but it may be the program I'm porting them to doesn't handle it well.
 

NelkQuyiter

New Member
Joined
Aug 6, 2013
Messages
15
sorry for the necro, but this might be useful information. SWG uses http://sourceforge.net/projects/stlport/ and is mentioned in close to their Skeleton Animator. Also all rotations should be quaternions as stated earlier.
 

Slyvampy

New Member
Joined
Apr 17, 2015
Messages
1
Hi guys,

Did anyone get anywhere with this? I know Sytner reversed engineered the viewer in his software but I am trying to export just the .ans files either back into Maya or something else.

Ps. Both 3D Studio's and Maya are Free for educational purposes now.
 
Top Bottom