SWG Model Exporter Release

pmobley

Member
Joined
Jan 22, 2022
Messages
34
Hello all,

Today I am releasing my first tool today. It is the continuation of a tool originally created by bhtrail.

This is a command line tool that will extract skeletal (along with their animations) and static meshes and converts them into the FBX format. The tool supports the extraction of the following tags:

  • msh
  • mgn
  • pob
  • apt
Along with their relevant dependencies (such as textures).

Currently, the tool does not support the extraction of sprites or effects.

The static meshes (msh) support the extraction of meshes with multiple shaders along with basic support for DOT3.

The program is not perfect and there are some known bugs in the extraction of skeletal meshes. These are listed in the issues section of GitHub.

The repo is public so if you would like to contribute, feel free to fork it. It is set up to work with VS2022 (download the community edition). Everything is set up to work out of the box. There are also some build notes in the readme file.

If you run into issues, please add an issue ticket. There is no format on how the ticket should be written as of yet. So please include as much detail as possible.

I would like to personally thank the following users for helping me in the creation of this tool:
  • Synter
  • Borrie BoBaka
  • bhtrail
 

pmobley

Member
Joined
Jan 22, 2022
Messages
34
Also, I would like to note for those not familiar with GitHub, I posted a pre-compiled binary under the Releases section on the code tab.
 

Adrift

New Member
Joined
Feb 25, 2023
Messages
8
Location
Taiwan
Thanks for taking the time to create this tool.
I downloaded the release but nothing happens when I run it. I get the generic windows prevented the program from running stuff which I selected the option to run the program anyways, yet nothing happens.
I briefly looked at compiling the source code myself, but I am no programmer, and the instructions were in greek to me. Something about extracting things to a solution folder wherever that is suppose to be.

I've been looking everywhere for a way to get SWG assets into blender and this looked like the most realistic option, not to mention the only one that isn't vaporware from 10 years ago.1034
 
Last edited:

Sytner

Administrator
Staff member
Administrator
Joined
Sep 18, 2010
Messages
426
It's a command line tool - you need to run from command prompt (or otherwise). If you run it without arguments it will print the help options.
 

Adrift

New Member
Joined
Feb 25, 2023
Messages
8
Location
Taiwan
I still can't seem to figure it out. I googled around for a bit, and running the Start command on the exe didn't do anything either. Then I tried to make a batch file so it would pause, which it does, but still nothing happens when the exe is run.
What am I missing?
1035
 

Sytner

Administrator
Staff member
Administrator
Joined
Sep 18, 2010
Messages
426
Just run it from command line:

1036
 

Adrift

New Member
Joined
Feb 25, 2023
Messages
8
Location
Taiwan
Ahh ok thank you for posting that screenshot. When I had googled online every website said to type "Start [program.exe]" but it appears you just type the program.exe and nothing else.
Thank you.
I have never encountered a command like program that runs this way before. I was expecting to double click the exe and it would launch a command prompt.
 

Adrift

New Member
Joined
Feb 25, 2023
Messages
8
Location
Taiwan
So. I think I have mostly figured out how to run this program, however no matter what object I try to convert it gets stuck at 20% and won't output anything.
Any Ideas?
You can see at the bottom of the gif the bat file I am running with all the arguments, they are as follows:
SWGModelExporter.exe --swg-path D:\StarWarsGalaxies --object protocol_droid.apt --output-path D:\StarWarsGalaxies\Exporter\output --overwrite-result 1
1037
 

Adrift

New Member
Joined
Feb 25, 2023
Messages
8
Location
Taiwan
I've done a LOT of troubleshooting on this to try and make some kind of progress. I tried on a fresh install, a new drive, and then I tried with an empty folder with just a single .tre file in it that contained an .apt asset I could try to extract. That last one got me the furthest, it looks like it worked but still nothing is in the output folder
1039
 

Adrift

New Member
Joined
Feb 25, 2023
Messages
8
Location
Taiwan
OK. Without further input I can't go any further. I am completely out of ideas. The program seemed to be able to locate and export any of the .pob files, however they only got the vertex data. No edges or faces.
 

Sytner

Administrator
Staff member
Administrator
Joined
Sep 18, 2010
Messages
426
I tried and it worked with basically the same command, but I did get different output:

1041

All I can think is that there's an issue with your SWG install perhaps.

Also it's confusing that you have to specify the 'overwrite-result' arg when the help says that it has a default (i.e. implied you don't have to specify).
 

Adrift

New Member
Joined
Feb 25, 2023
Messages
8
Location
Taiwan
I have no idea.
I've done a fresh clean install of SWG, I added environment variables to point to the FBXSDK and Directxtex (though I have no idea if I even did that right)
I also tried it in powershell since that is what you were using, even as administrator. I used the exact same command you did (save for the different file paths)
I give up :(
There must be some dependency that I don't have, or isn't set up right. I have no idea.

10421043
 

Sytner

Administrator
Staff member
Administrator
Joined
Sep 18, 2010
Messages
426
Shouldn't need those vars if you're running the precompiled version I wouldn't have thought - I didn't.

I'm not familiar with the internals of the tool so I can't offer any further ideas beyond suggesting you build it from source and debug.
 

Adrift

New Member
Joined
Feb 25, 2023
Messages
8
Location
Taiwan
As a pure sanity check I booted up a fresh virtual box of windows 11, did a clean install of SWG, and copied over the exporter. It gave me the exact same thing.
Barring someone out there uploading an asset dump for the game, I think I am stuck pulling 1 asset at a time with that dumb Ultimate Unwrap3D program.
1044
 

pmobley

Member
Joined
Jan 22, 2022
Messages
34
@Adrift
Hello Adrift,

Thank you for downloading the tool and trying it out. I apologize for the inconvenience of it not working correctly. I am surprised I did not get notifications that a conversation was active in this thread or I would reply sooner.

I have been running some tests on my end and have not replicated the exact error you are seeing. The program itself should be self-contained. Other than the lib for the FBX, you shouldn't need to install other dependencies.

It is late for me, when I get a chance over the weekend, I will have to spin up a virtual machine with win 11 on it and give it a test there to see what the issue could be.

For a sanity check, could you run this command here in the powershell:

Code:
./SWGModelExporter.exe --swg-path C:\swg\SWGEmu --object rock_formation.apt --output-path E:\test\extract --overwrite-result 1
Also in the swg-path, please make sure that this is pointing to the actual game files, the top-level directory, and that you have all of the game files.
Also, try it with the extracted folder inside the same directory as the .exe
 

pmobley

Member
Joined
Jan 22, 2022
Messages
34
I tried and it worked with basically the same command, but I did get different output:

View attachment 1041

All I can think is that there's an issue with your SWG install perhaps.

Also it's confusing that you have to specify the 'overwrite-result' arg when the help says that it has a default (i.e. implied you don't have to specify).
I would also agree that it is confusing
 

BerryBunny

New Member
Joined
Oct 20, 2023
Messages
2
For a sanity check, could you run this command here in the powershell:

Code:
./SWGModelExporter.exe --swg-path C:\swg\SWGEmu --object rock_formation.apt --output-path E:\test\extract --overwrite-result 1
Also in the swg-path, please make sure that this is pointing to the actual game files, the top-level directory, and that you have all of the game files.
Also, try it with the extracted folder inside the same directory as the .exe
New user here. I'm having the exact same problem as Adrift. I went and copied my SWG install into a folder in c:\swg\SWGEmu and made the folders for e:\test and e:\test\extract on my E drive, just so I could use your EXACT command line EXACTLY as you typed it... Here's the results.
1087

My goal is to try to get skinned meshes loading up in Blender, with the skeleton, animations, and everything... I can't find any downloadable tool that can do that. I was hoping SWB would be able to do it but I can't find it for download anywhere... I'm assuming the price tag on it in the forums here is a joking way of saying "it's not publicly available yet", but I clicked on it just to see if it was serious and it took me to a webpage that hasn't been updated in so long that people born the day it was last updated are just starting to get their driver's licenses.
 

BerryBunny

New Member
Joined
Oct 20, 2023
Messages
2
I suppose that rules out being able to get Jabba's model out of it and animate him in the palace... bit of a disappointment :<
Thanks.
 

Melecon

New Member
Joined
Oct 13, 2015
Messages
8
Here is a fun one I just ran into.

when I try to export out stormtrooper.sat it try's to pull all the animations multiple times for multiple lod's

With that much data it just craps out halfway through. Not sure if it is my system specs, its pretty beefy with a i9 13th gen, and a 4090, only issue I have is its only got 16 gig RAM that kills me at times (dam C++) (I am also suspecting I don't have the RAM power to process that much data)

IF I Can get someone to please test to see what they are having the same issue with more RAM then me would be great.

SWGModelExporter.exe --swg-path [path to swg here] --object appearance/stormtrooper.sat --output-path [output path here] --overwrite-result 1
 
Top Bottom