- Joined
- Nov 11, 2004
- Messages
- 1,986
Yesterday I took some time to look into the Sc2 Art Tools files, I then noticed a file called SC2ArtTools.mzp. It's actualy a zip file with a bunch of maxcripts in .mse format. I later extracted those and decrypted them (3ds max's encryption algorithm is terrible).
Inside of that I noticed a lot of interesting things:
The hardcoded library is called Sc2ExporterLib, it's job is:
Mainly anyone interested on making them compatible with any 3dsmax version. Would need to redo those jobs on maxscripts or through standalone aplications.
Inside of that I noticed a lot of interesting things:
- all the helper plugins are scripted in maxscript.
- Data comunication between 3dsmax and sc2editor is done through command line operations. This one is important, because any modeling tool can use Sc2Editor's Preview and Monitor feuture
- All of the functions are accesible without hacking by using the global: StarTools in maxscript (open the listener and write it, then use "show StarTools" to browse it).
- The liveUpdater is also managed using maxscript.
- The only code which is version dependant is the Exporter itself (the one that writes the file) and the next plugins: All Effects plugins (Sc2Particle, Sc2Ribbon, etc), All Material Plugins and Sc2Omni, Sc2Camera and Sc2Spot.
- Identifying install directories for Sc2, logging and configuration is all version independant. It all runs on maxscript.
Some important information: - All the version dependant plugins are scriptable through maxscript.
- The code is very well organized, it's easy to just replace the hardcoded exporter with a maxscript coded exporter.
- The data gathering from the scene is already made by StarTool's maxscript only conversion of the data gathered to m3 file is hardcoded.
The hardcoded library is called Sc2ExporterLib, it's job is:
- Setup image conversion.
- Generate M3 file from the data gathered.
- Generate ConvexHulls for Sc2Physics.
- Commit models into a mod file.
- Prepare some files for previewing? (Still not sure how it works).
Mainly anyone interested on making them compatible with any 3dsmax version. Would need to redo those jobs on maxscripts or through standalone aplications.