Stannum

SOASE 3dsmax importer and exporter tool - Updated for Rebellion

SOASE 3dsmax importer and exporter tool - Updated for Rebellion

We don't need no stinkin' subtitle

New (beta) exporter!

-Support for Rebellion and maybe older expansions.

-Exports to the BIN format. Imports both BIN and TXT models.

-Much, much more improved mesh processing.

-'Tangent map problems' fix. This was an error with vertex normals that weren't being flipped when the model was.

TODO:

-Add model flipping on export so modeling in max is more natural.

-Import points too, so far its just importing the mesh.

-Stuff?


New version:
http://janvanderweg.com/SOASE/SOASE_Rebellion.zip

Installation:

Extract contents of the zip, except the example model, to: ../3dsmax/scripts/

Like with the old tool, run 'SinsOfASolarEmpire_Rebellion.ms' from the utilities tab and it should appear in the dropdown box.

Model setup:

Mesh as normal. Multi material works by applying max materials to the faces you want them on.
I haven't put in any y axis = up correction stuff so ships should be pointing upwards. (check the example file)
Instead of dummies for points you'll have to apply a skin modifier and use bones. See below for more info.

Material setup:

The new model format requires 5 textures per material:
    Diffuse map  
    Data (specular, self illumination) map
    Normal map
    Displacement map
    Teamcolor map

From what I've seen so far, the last two maps (displacement and teamcolor) aren't used so you can leave them blank. The tool uses the material map name, not the assigned bitmap for export. Here's a table to see which 3dsmax map is used for what:

        SOASE material map                                         3dsmax material map
        DiffuseTextureFileName                                    diffusemap
        SelfIlluminationTextureFileName                     specularmap
        NormalTextureFileName                                   bumpmap
        DisplacementTextureFileName                        displacementmap
        TeamColorTextureFileName                              filtermap

Point setup:

Instead of dummy objects the script now uses bones. Create the bones with the correct orientation and place them where you want. Name them as required by the game. Apply a skin modifier to the ship object and add all the bones to it.

A word on normal maps:

Since the gamemesh processor takes smoothing groups into account when generating vertex normals you can use smoothing groups. If you're using smoothing groups make sure the utility you're using to bake normals also supports them.

What is GameMesh?:

GameMesh is a max object preprocessor that calculates pretty much anything about models. It supports overly complex model setups, multiple materials, bone hierarchies for animated models, etc. It even takes smoothing groups into account!

 

 

 

 

 

 

OLD STUFF:

 

Not sure if many of you use 3dsmax but I started writing a maxscript tool that will export/import BIN/TXT soase .mesh files

Should work with most max versions since this is a maxscript tool, not a compiled one.

Current version: 2.0a

Download link:
http://janvanderweg.com/SOASE/SOASE_Maxtoolv2.0a.zip

WHATS NEW:

Lots!....
I rewrote the mesh splitting algorithm into a semi-modular meshsplitting maxscript file, splitmesh.ms
It should be a lot faster now and it supports more features such as:
-Smoothing group support
-Multitexturing support
-Much faster (I think)

Readme:
http://janvanderweg.com/SOASE/index.html

OLD INFO, still might be usefull:

Obligatory pic:
http://janvanderweg.com/SOASE/soase_pic.jpg

Installation:
Unzip the contents of the zip into your 3dsmax\scripts\ directory.

To run the script:
-Goto the utilities tab (hammer icon on the right)
-In the utilities rollout click on MAXscript
-Click on run script
-Find the SINS_Tool.mzp file and run it
-In the utility dropdown box select SOASE Maxtool
-Click on import/export

Note:
Soase uses an Y-up system. This means:
Max y = above -y = down
Max z = forward -z = back
Max x = left -x = right

Adding points:
-Use dummy objects for points, rotate them so they face in the direction you want.
-Link them to the main object. If you don't link them they will not be exported.

Materials:
-Diffuse texture uses the diffuse slot (really)
-Data texture uses the specularlevel slot
-Normal texture uses the bump slot
-Set the glossiness with the glossiness controller in the specular highlights area

Add a bitmap to each slot but don't point to an image file. Instead change the slot name to the filename:



Your final texture should look like this:

381,878 views 202 replies
Reply #76 Top
The script doesnt work with the latest version of 3ds max


For the record I'm using 3ds Max 2008 32-bit, in vista no less, and the script works perfectly (I have imported, edited, and exported pretty much every mesh that came with sins), so i dont think its anything to do with the version of Max.
Reply #77 Top
New version up. Quite a lot of the code was remade and I added a new meshsplitter. Took a while to create that. Autodesk really needs to add some stuff to maxscript :/

http://janvanderweg.com/SOASE/SOASE_Maxtoolv2.0a.zip

WHATS NEW:

Lots!....
I rewrote the mesh splitting algorithm into a semi-modular meshsplitting maxscript file, splitmesh.ms
It should be a lot faster now and it supports more features such as:
-Smoothing group support
-Multitexturing support
-Much faster (I think)

KNOWN BUGS/ERRORS:
-It doesn't mirror the model yet so it will look mirrored in soase.
-There can be problems with the mesh splitting if you have merged uv verts together which are not the same vert on the mesh. This will produce erroneous surfaces but will not stop the mesh. These bugs should be relatively easy to spot and very easy to fix. Just split the texture vert.

More info at:

http://janvanderweg.com/SOASE/index.html

The exporter is feature complete now I guess, except for the mirroring thing.

Leoj2767, with latest max version do you mean max2008?
Reply #78 Top
Sorry I forgot that 3ds max went to 2008, i was referring to max 9, my bad.
Reply #79 Top
Ran the script on Max 8 and it went through, but now whenever I try to import a mesh file it says:

"Invalid header, aborting, sorry."

Whats up with that?
Reply #80 Top
Ran the script on Max 8 and it went through, but now whenever I try to import a mesh file it says:"Invalid header, aborting, sorry."Whats up with that?


Me too and this was not happened when useing ver 1.1. Mine is Max 6
Reply #81 Top
Hey um, I got to export and it is telling me to many objects, I decided to try my hand at this and I imported a 3ds model then I went to export with the tool. 3dsmax 2008 64bit oh also specularlevelmap error,

Addition: so I wen and checked one of the actaul game models and the hull was all one peice, so how can you make it to where everything is one peice. I think I am really lost
Reply #82 Top
Hey um, I got to export and it is telling me to many objects, I decided to try my hand at this and I imported a 3ds model then I went to export with the tool. 3dsmax 2008 64bit oh also specularlevelmap error, Addition: so I wen and checked one of the actaul game models and the hull was all one peice, so how can you make it to where everything is one peice. I think I am really lost


you need to attach the meshes to each other, but before you do that if you are using the multiple texture function you have to do some... interesting stuff. Select each section, start with your main piece, and click the polygons button under the editable mesh section, and select everything, now rename the matID to 1, do this for each piece but make it the next number. now go to the attach function in the Editable mesh section, and select each mesh, then export.

EO
Reply #83 Top
Thank you, I will try and hopefully not get lost on my way, I normally just do the text editing and data file editing.
Reply #84 Top
So I am still having issues cause I am running into diffrent errors. Any one know where there is a step by step guide on how to create a model (not specificaly for sins but a basic guide that shows you where the basics are)? I have tried some of the free sci-fi models and they all seem to have diffrent issues, tried mostly 3ds and max.

AAARRRGGGGHHHHHH This is irretating me, I knew there was a reason why I stuck with just data files and not models. So I am imported a ship from sins hoping that I could get some kind of idea, I didnt change anything and I tried to export it and now it is saying no object selected, yes I clicked on the mesh, then I cant select all cause then it say please select one image, also with the star destroyer it tells me something is missing with the splitmesh, by the way YES I AM A NOOB AT THIS. should I just give up?


YYYEEEAAAAHHHH alright learned a lot got a lot done, but I am still getting an error about the smesh = splitmesh or something like that when I got to export
Reply #85 Top
Is it possible for the exporter to export in text instead of binary? This will help in debugging the mesh files.
Reply #86 Top
Hey um sorry for posting but yet again, so I was able to at least export part of a ship and then I learned how to attach everything to the other parts so it should export the whole ship, but now when ever i try to export any model even just part of a model I get some kind of error that has to do with the "smesh = splitmesh()" line and that is with any export and when ever i do the finalize or non finalize it locks up max. if you need me to I cant post the form on here or you can send me an email.

Thank you very much for your time.

Overthrow
When you need 4........ I bring 40!!!!!!!


Added: Yeah um I will just learn how to make the models and then export to 3ds then use the mesh editor, so far that has been a lot easier
Reply #87 Top
I know this is a newbie question but I am going to ask anyways. After going through the read me I can not find the final step where "Checking out with face uses which material id:" there is a picture and I can't figure out where this is and would appreciate any help you guys can give me. I have managed to figure out everything else but this step.
Reply #88 Top
Getting '--type error: Call needs function or class, got: undefined'

on

sMesh- SplitMesh()

when I copy splitmesh.ms out of the mzp file and then reinstate the call for the infile it will get past that line, but then it dies on the next object even though it is in the same .ms... weird...

it might be better to just shove it all in one large .ms or package the .ms seperately, since it looks like this is just an include issue.
Reply #89 Top
Ok, having some issues with version 2.0a, Firstly i get the same

sMesh- SplitMesh()

error mentioned by others, though i did find that re-running the script bypasses this error somehow.

Secondly for some reason the game is no longer picking the textures from the exported mesh files, if I use version 1.0 of the exporter textures work fine, but if i use version 2.0 even though the textures are defined in the mesh file (I checked with a file editor) the ships show up in game as black
Reply #90 Top
did you reload the script (hit run and select the script again?) or did you just hit the export button again?
Reply #91 Top
yeah reload it completely, so hit run and select the script again
Reply #92 Top
Major Stress wrote:
Is it possible for the exporter to export in text instead of binary? This will help in debugging the mesh files.


I second that, there are elements to the Mesh I would prefer to edit manually.

btw: you cannot import Mesh files in the TXT format atm
Reply #94 Top
Hi all!

I need some help, i may have posted it in the wrong topic but i didn't know where to post it. So, I would like to add a new ship to the game. I downloaded one from scifimeshes , then opened it in 3ds max 2008. I've tried using this script but it says that i have to select only one mesh, but this ship is not in one piece. So I don't know how to put this model in to the game. Can someone explain it to me step by step?
here's a pic about the ship:


Thanks in advance!
Reply #95 Top
Firstly that model is way to high poly, especially if you got it from scifi-meshes.com. The game is designed to withstand a certain amount of polies, and Im pretty sure that that model is way above that. Secondly you would need to attatch all the pieces together, and set up the textures and the dummy points correctly, that is if you were able to run that model ingame... you would need an extremely high end computer to do so, IMO.

EO
Reply #96 Top
yeah basically you need to attach all the component objects, edit and apply the textures and then marquee select the entire mesh before trying to export.

I tend to overwrite the TEC frigatlight model when experimenting so you can build it easily in game.
Reply #97 Top
Is it just me or is the script supposed to take 20mins to run the conversion on a high spec PC with a 15k poly mesh?
Reply #98 Top
still getting the error every time I attempt export.
Reply #99 Top
I have gone back to using v1.1 on Max9, mainly because of the progress bar v2.0a just seems to lockup and errors like others have reported.

I am happy to help test v2.1  :) 
Reply #100 Top
Unfortunately I need multitexture support so not an option for me.