MGN/MSH->FBX converter

fortross

New Member
Aug 3, 2012
15
0
0
#1
Hello

Well, after few month of work I got some results... Main goal is to get tool that able to export SWG models to common-use format with all properties - skeletons, morphs, animations, shaders... 

Well. At this moment I can read TRE library starting from SAT file with resolving references to other files - SKT, LMG, MGN, producing FBX binary file with geometry (vertices, polygons, normals, tangents, UV and weight info, clustered to bones), skeleton (it's hierarchy, link with clusters of vertices, it bind pose). This FBX can be imported to UE4 (it is main target actually  :D ), also I tested it in MODO Indie (imports good) and Blender - got some strange effects, model looks collapsed, but became normal if u starts edit geometry

Here is a sample from UE4 (poor poor acklay, it suffered alot  ;) )
 
Textures have to be extracted manually ATM, automatic extraction it is possible but not in priority

Right now I'm going to concentrate on morph targets export, also I would like to get some help with ANS format to start write code for animations

Source code is on Github (https://github.com/fortross/swgmodelexporter), feel free to commend and contribute
Builded nightly build (Windows, x64 model) attached to this post
usage is simple SWGModelExporter.exe --swg-path <path to your swg installation> --object <name of object to export> --output-path <path to folder where to place results>

better to set full path to object inside TRE, it works faster, although there is functionality to search object by partial name

Releases will be published in my repo on Github here
 

fortross

New Member
Aug 3, 2012
15
0
0
#3
FBX format is almost native for 3DS Max - they come from same company actually, FBX SDK which I use to generate FBX has been published by Autodesk :)

As for import back to MGN... Well, I thought about it, but it is not possible atm, I need deeper understanding of internal SWG formats. But yes, it should be possible in future.

Static meshes not supported for now, but it less complex than MGN so I'll going to add it ASAP
 

Arioch

New Member
Apr 22, 2014
106
0
0
#4
fortross said:
FBX format is almost native for 3DS Max - they come from same company actually, FBX SDK which I use to generate FBX has been published by Autodesk :)

As for import back to MGN... Well, I thought about it, but it is not possible atm, I need deeper understanding of internal SWG formats. But yes, it should be possible in future.

Static meshes not supported for now, but it less complex than MGN so I'll going to add it ASAP
That is excellent especially if you get the mgn sorted out! Be.en waitig for someone who knew how to do this. Can  you import fbx as well?
 

fortross

New Member
Aug 3, 2012
15
0
0
#5
First I need to understand relationships between skeleton and animation parameters in terms of SWG. Because backward import of SKT may invalidate existing animations for it. As for geometries for existing skeletons - I think it will be possible.
 

fortross

New Member
Aug 3, 2012
15
0
0
#9
Tool upgraded to export material and textures. DDS will be converted to TGA because DDS do not supports directly by many 3d software
 

Lasko

Moderator
Staff member
Moderator
Feb 13, 2012
270
10
18
#10
TBH.... I haven't got a clue how to do this, although I have a lot of ideas.

But rest assured........

I'm sending 110% moral support for this project. Keep up the excellent work:)
 

Melecon

New Member
Oct 13, 2015
6
0
1
#12
Has anyone got this to compile?

I have been trying for a few weeks now and just can't figure it out.

I there was the process on what I have to do with the external libraries.
 

fortross

New Member
Aug 3, 2012
15
0
0
#13
1. Do you have boost library installed and compiled? Do you have correct path (for your local machine) to the boost lib in solution?
2. Do you have Autodesk FBX SDK installed? Do you have correct path to the FBX SDK in solution
3. Do you have ZLIB installed? Do you have correct path to builded zlib libraries and it's headers in solution?

as for DirectXTex library - you have to get it from Github and include VS project to solution.

PS I do not receive message notifications from here and do not check site everyday, so... use github to contact me, please