Converting Freespace Models Tutorial
As requested here's a tutorial on how to convert models from Freespace to Starshatter. I'm using 3ds Max 2012 and Photoshop CS4 and this tutorial assumes a certain amout of knowledge of both programs. Like most things it's mainly about organization. So you want to set up all of your folders beforehand. If you think all this is really basic just skip ahead. I can't remember who it was but someone very wise on these boards said you need to write a tutorial like you're talking to a five year old.
First set up your convertion folders. Here I have folders for all the different types for the GTA and UEF.
Inside these folders you create a folder for the ship you are working on and inside this create the following folders, DAE, Magic, OBJ, and POF. To speed things up in the future you can create these folders somewhere, like I did in the zBlank folder, and just keep them empty so you can copy and paste when you start a new ship.
Now create a folder for your mod. I call the mod I use for converting and testing ships Shipyard but you can call yours anything you want. Inside this folder create another folder named Mods and put the createmod.bat and Datafile.exe described in this thread
Inside the Mods folder create folders for Missions, Ships, and Weapons. In the Ships folder create a folder for the ship you are working on. In the Weapons folder I have the GTA and UEF weapons seperated but all the weapon effects are in the same folder.
Now it's time to grab the model. In this case the Karuna Mk1 from the bp2-visuals1.vp. Extract the model pof and all of it's textures to some location(I just use a New Folder on my desktop). Open up the pof and save to dae. Now move the pof to the POF folder, the dae file to the DAE folder and all of the textures to the Magic folder.
Open up the Magic folder and open the main textures (krnamain.dds and krnasubs.dds) with Photoshop and save them to tga. Drop the tga files into "C:\Program Files\Common Files\Autodesk Shared\Materials\2012\assetlibrary_base.fbm". I keep a shortcut to this file on my desktop to save time. This will have the textures show up on the model when you open it up in Max.
As a side note concerning textures I found that the Karuna's textures are just to big for Starshatter, even as dds. The tile mapped ships perform better with dds files but I ended up converting the Karuna's textures to jpg and it performed much better. It might just be my system but keep this in mind.
Fire up Max and import the dae. Hit "Select by Name" and turn off "Geometry" and turn on "Helpers". Select all of the helpers and delete them (I always feel bad about that part).
Turn on "Angle Snap Toggle", select everything from the Top viewport, and rotate everything 180 degrees. Sometimes you have to get the centerpoint back but the Karuna rotates right on it.
Starshatter bases the size of the hullfire graphics to the scale of the ship model. This is the reason that hullfires seem to engulf the entire ship in the vanilla game. To fix this select everything and scale up everything up quite a bit. About five times or so. Trial and error comes into play here but IMHO it makes a big difference. This step is only really important for capital ships.
Hit "Select by Name" again and turn "Geometry" back on and select detail 0. Right click and hit hide unselected. Under the Modify tab select polygons and select one of the nameplate polies. Skroll down to "Materials" on the rollout and hit "Select ID". Hit delete. Now go backup to "Editable Mesh".
I didn't figure it out until I tried converting the Orion but either Max or Magic mirrors the ship when you convert it. This isn't noticable with symetrical ships like the Karuna (except the "Stand Clear" in the fighter bay). In order to fix this you need to hit "Mirror". With the Orion I was able to select everything and mirror it but with the Karuna doing that messes up the debris. So just mirror the pieces that are going to be part of detail 0.
Magic can only handle models with 16k and fewer polies so for very detailed models we have to save them in levels. Select everything and right click and hit hide selected. Get the "Poligon Counter" out which is found under the "Utilities" tab under "More". Right click and hit "Unhide by Name" and chose all of the elements that you would see at detail 0 in game except the rotator and the multipart turrets.
Select everything and you can see by the counter we are way above our 16k budget. Open up "Select by Name" and start ctrl clicking parts until you get below 16k.
Once you have it click on the Autodesk symbol at the top left and choose "Export" and then "Export Selected". Navigate to your OBJ folder and save the file as something like Karuna0_0.obj. Once it's saved right click and choose "Hide Selected". Select what's left and it's still too much, so again, deslect some parts untill you are below 16k. Looks like all we have to lose is the fighterbay detail. "Export Selected" again and save the file as Karuna0_1.obj. "Hide Selected" again and select the remaining piece and "Export Selected" it and save it as Karuna0_2.obj.
"Unhide by Name" and select rotatora. "Export Selected" it and save it as Karuna_rotator.obj.
The proccess for detail 1 and 2 is the same except you won't be keeping the rotator as a seperate piece.
Starshatter can't handle more than ten pieces of debris and you'll probably want to have two of those slots go towards the little debris that go flying everywhere when a ship expolodes. That means we have to reduce the Karunas 32 pieces of debris to 8.
Hide everything and "Unhide by Name" selecting all of the debris. Now just go through and make logical choices of how you want the debris to look. When you have a selection set together you are happy with "Export Selected" it and save it as Karuna_debris01.obj. Repeat until you have all of your debris. When you're done select everything and hide.
For the turrets start out by unhiding all the mutipart turrets. If you want, rotate all the barrles down 90 degrees. Select them all and export them as turret_detail.obj. You can use this to help you position and scale all of the turrets.
You only need to export one of each of the different turrets (base and arm seperate) and an inverted version with their barrels rotated down 90 degrees. When I first started converting models for SS I would select a base and move it to (0,0,0) where it has to be. I found that this can cause the model to become unscalable in SS. I tried resetting the xform but it would still happen. So I started exporting the turret right where it was and then repositioned it in Magic. Just be sure and get (0,0,0) in the center of the model.
The next step can be skipped for the turret_detail.obj. I find it's easier to use if it doesn't have a texture.
Now go to your OBJ folder and select all of the mtl files. Right click and select "Edit with Notepad ++" (If you don't use Notepad ++ you're doing it wrong).
Go through each line and remove "C:\Program Files\Common Files\Autodesk Shared\Materials\2012\assetlibrary_base.fbm\\" so that all that remains is "map_Ka krnasubs.tga".
Highlight one of the tga and go up to "Search", choose "Find", and choose "Replace". Tga should already be in the "Find" box, all you need to do is put dds (or jpg if you converted the textures) in the "Replace with" box and hit "Replace All in All Opened documents". Save All and close out.
Time to fire up Magic. Right now there are two progams for Magic, 1.5 and 2.0. Magic 1.5 is used to convert from OBJ to MAG and to scale or move anything you need to. Magic 2.0 is used for textures and finding positions on the model. I believe that The E is working on these programs so someday they might be consolodated.
So open Magic 1.5, I like to maximize and move the center line all the way to the right, the blue 3d view can cause problems. Click on "Open" and navigate to your OBJ folder. Change the file type to "All Files" and open up your Karuna0_0.obj. Go up to "File" and choose "Save As". Navigate to your Magic folder. Even though the box says "Save as type: Magic Files" you need to remove the .obj from the file name box or it will just save as obj. Do this for all of your obj files.
Open up your Magic folder and select all of the files (it should just be the MAG files and the textures). Copy these files and paste them in the ship's folder in your Shipyard mod. From here it's all about creating a def file and there's more than enough documentation for that stuff. I'm just going to point out two key points.
Starshatter does it's detail levels backwards so the lowest detail level is 0 and the highest is 2 in this case. Notice how all of the detail 2 models are listed and that the rotator is third on the list. Just below is the spin for the rotator and it's spot is third in that list too. The number defines the speed.
That's about it, other than creating the def file. You can search the stock files or mods for similar ships and use their def files as a starting point. As you cut and paste be careful. Starshatter hates extra commas and if you find the game crashing as you load your ship that's probably the reason. Use /* and */ to systematically block out parts of the def to find the offensive code.