What is SchMEe? (not-so-FAQ)

Started by tirpider, June 30, 2013, 03:44:10 AM

Previous topic - Next topic
June 30, 2013, 03:44:10 AM Last Edit: July 29, 2013, 07:50:19 PM by tirpider
                                            The SchMEe FAQ
Questions, answers, and trivia for the people who use SchMEe

What is SchMEe?
[spoiler]
It's a SWBF MSH editing/repair/conversion tool.

SchMEe is the result of my study on the SWBF msh file format and uses code similar to my SWBF_MSH_INFO tool. While it's roots are the same, this program has been re-written from the ground up to accommodate more flexible features.

It is best thought of and used as a hex editing aid. It can save time on tedious edits and since it is automated, you can be sure that it won't forget to update that last field before saving.

These early versions have the meat and bones, basic msh repair features and a few additional ones I plan on expanding. There will easily be a hundred or more options in later versions, but by then, the GUI may be the primary interface.

For now it is a command line only tool that works similarly to the SizeValidation tool. It opens a file, preforms options, then saves the file.

The conversion part hasn't been fully realized yet, but is in partial ongoing development.

By default, SchMEe:

  • rebuilds size fields for all tags. Effectively 'repairing' them so you don't have to. That means you can change values like texture names without worrying about making it a certain size.
  • reindexes all MODL chunks. This ensures they will load with ZETools. When reindexing, all the ENVLs are resolved via bone names, so this wont break envelopes.
  • ensures all tags that require padding are properly padded. (Like string names, odd short integer arrays, ect.)

Optional features:

  • save UV bitmaps of all models in the msh
  • save a basic "prop" odf for file
  • normalize weights (ensures all vertex weights add up to 1.)
  • rebuild the triangle lists (I think I am the only person that will use this)
  • calculate bounding boxes for all models in the msh (as needed or forced)
  • convert Hi-Res biped envelope to Low-Res. (This is a hack that exploits a flexibility of the munger and may not be suitable for all circumstances.)
  • edit materials (one material at a time, currently.)
  • "Explode" and "Compile" a msh. This will allow you to get to the parts you want to edit via hex a lot easier. Don't worry about size fields, compile will fix them.
  • Reorganize pieces of geometry in individual MODL chunks by isolating and consolidating them.
  • Reposition individual pieces on a model. (no rotations yet.)

SchMEe has a GUI, but it's current one is a place holder for something better. It's real power comes from the commandline and stacking operations in batch files.

It comes with a little bit of documentation and a couple of batch files to illustrate it's usage.  I try to get it all on the "-help" screen, but there is a lot, so I may miss some things.

It helps a lot to know a bit about hex-editing and the MSH file structure in general, but I am working toward making that unnecessary.  All these low level functions need to be developed first, though, so It's still a beast.[/spoiler]

Why SchMEe? What's up with the weird name?
[spoiler]
It started as a simple data viewer that I wanted to call SWBF_MSH_EDITOR, but there is another tool with a similar name and I didn't want to clash to closely with other folks development efforts. It was also a bit large. So when the time came around for a major revision of the code, I took the opportunity to revamp the name. Shmee Skywalker had a run in with the Tusken Raiders, and I'm all about the Tuskens.. So I decided to use that. Perfect, except that I misspelled it terribly.  The only other names that I considered had too much to do with cats.  So I decided to commit to the bad spelling and go with it. It's easy to remember and certainly unique.

The weird capitalization stands for the original name, Star Wars Battlefront Mesh Editor.

Not terribly important, but that's some fun stuff to know, I guess.[/spoiler]

How do I use it?
[spoiler]
You place the SchMEe.exe in a folder with the MSH you want to edit, then from a console (DOS prompt) or batch file, call schmee with the proper switches for the edit you want to preform.
For example:
schmee.exe -load"My_Cool.msh" -save"My_Cooler.msh" -material(1) -diffusecolor(0,255,0)
Will load a msh, set the diffuse color of material 1 to a lime green color and save it as "My_Cooler.msh" in the same folder.

SchMEe can only do one thing at a time, so if you want to do 2 edits, you have to run it 2 separate times.
schmee.exe -load"My_Cool.msh" -save"My_Cooler.msh" -material(1) -diffusecolor(0,255,0)
schmee.exe -load"My_Cooler.msh" -material(2) -diffusecolor(0,255,0)

Notice how the second line loads the MSH the previous line saved. In this way you can stack several edits in a single batch file.

Anything more specific than this will probably need it's own topic. Like "How can I do a head hack like all those you've been doing?".. different topic. this is just an intro.[/spoiler]

I still don't understand how to use it..
[spoiler]
Make a thread explaining what you want to do. There may be an easier way than with SchMEe. For big changes to a msh, XSI is still the best way to do it.[/spoiler]

Your licence is obscure, who owns the models that SchMEe edits?
[spoiler]
Like everything with a likeness from anything (game or otherwise) resembling a Star Wars design, LucasArts owns it.  Same with the mods we all make and all that.  But fortunately, we are all modders and as such there are community standards in place so that we can place our name with the things we work so hard on.  If you made it, claim it, but if someone else made part of it, put their name on it too. It's the right thing to do. At the end of the day, it's all LA property, but they seem happy to let us sand box around with their designs as long as it's in good taste.

Devils advocate time. Say you make a model based on your own design (or your pet lizard.. whatever) and you edit it with XSI, SchMEe, and all sorts of other programs.At that point, since the basis for your design is your own, then I would call it yours. However, I have no idea about how the modtools licence affects these kind of things. The fact that it lands in a SWBF mod file may imply a transfer of ownership. I don't know, and I have enough distrust of anything in legaleese to assume that sort of thing is possible. If this is where your project dwells, then keep all your source files and be certain of all your stuff.

The odds of any of this becoming contentious are really small. But fun stuff to know and think about as IP rights become a pop culture topic.[/spoiler]

Where do I download this program?
[spoiler]
From the SchMEe Release Announcements topic at the top of this forum.
It will always contain a link to the latest build on my dropbox, and as the versions become more robust, I may begin keeping it in the downloads section here.
(It's still a buggy alpha thing and I don't want to clutter the downloads with that.)[/spoiler]

Will it ever be able to do _____?
[spoiler]
The best way to know is to start a thread with that question.  Most everything going into it is by request.  It may take months for it to make it to the program, I can't start considering it till someone asks.

Side Note: A good source of inspiration for possible future features is XSI(or any other modeling application.)  I recently started working with it, and it has some very good tools.  Since SchMEe is targeted to only one format and not limited by the complexities of a formal display, it may be possible to approach certain problems in a more direct way. [/spoiler]

Ok, more specifily, will it ever be able to handle cloth?
[spoiler]
Yes and no.  Mostly no.

I won't ever put any effort to designing or dealing with cloth other than to remove it's MODL chunk from the MSH, Until a way to determine normals from the existing cloth structures is created.

At that point I will certainly be happy to convert cloth to normal geometry and try to weight it to something.

The sad reason for this is that I can't run SWBF2 and even if I could, I prefer the feel and look of SWBF1. This doesn't mean I will not have support for other SWBF2 specific features, but cloth is just not happening.  Too many constraints (literally.)[/spoiler]

Will there be a way to hack animations?
[spoiler]
It's possible.
We have all the fields translated and there are now multiple ways of handling the CRC's.
I have not tested any animations, and this is one area where I would support the BF2 format completely (because it isn't much diferent than BF1.)
I have even been looking at industry standard animation file formats, thinking up ways to make them SWBF1 compatible.
All the animations are is a list of localized transforms paired with a bone by a CRC.  So converting something like a BVH should be as easy as rewriting that list in the way our list is written.
It's possible.
There is much work to be done before this is even close to reality, and may be it's own program because of the complexities involved.
[/spoiler]

What language is SchMEe written in?
[spoiler]
A scripting language called AutoIT.
AutoIT is most useful as a Windows automation software.

Why not a 'real' language?
Mainly because I am not a real programmer. Most your powerful languages are object oriented, and while I understand some oop concepts, such as encapsulation, my programming knowledge comes from linear basic on the old home consoles like the Vic-20 and C-64.

AutoIT exposes the windows API in a manner (and syntax) that is easy for me to understand and implement.  I tried to migrate to VB2012, but there is just too large a paradigm shift for me to have fun with it.  It is wrong that development on this is bottle-necked by my lack of knowledge, but I try where I can and learn very slowly. So it's really just a case of "it is what it is."
[/spoiler]

Why edit models through the commandline?
(It's very counter intuitive.)
[spoiler]
It really started as a way to automate specific hex edits to improve consistency and reduce errors. Specifically, updating all the parented chunk size entries. One error in a sequence of 6 mundane (and non creative) size field updates ruins the whole file.  Features have been added from there.

It isn't the only such program though. ImageMagick is a commandline image editor, that is quite robust and fun to work with.  I only know of one other program that allows you to do Fourier transforms on an image and filter it as though it were a sound file and then revert it back to an image. Mind blowing and really neat in that it forces you to look at the data in a different way.

We can all benefit from different perspectives.

I doubt SchMEe will ever grow out of the hobbiest game hack tool stage and into a full model editor. There is already another program well into development that does a much better job. (Noesis) It has full python scripting, a custom API, a sophisticated display, huge proprietary and industry standard file format support. I just want to focus SchMEe on SWBF. If other formats find their way in, then it will be as a convenience to porting those formats to the MSH format. (I'm thinking MS3D, GLM, and FBX.)
[/spoiler]