[tool] SWBF_MSH_INFO v0.05 alpha

How to create models in XSI and other 3D applications and make them work in Battlefront 1 & 2. Post models, tips for application usage and share anything XSI, 3DMax, SketchUp, etc.

Moderator: Moderators

User avatar
tirpider
Lance Corporal
Posts: 97
Joined: Fri Nov 25, 2011 3:58 pm

[tool] SWBF_MSH_INFO v0.05 alpha

Post by tirpider »

SWBF_MSH_INFO
v0.05 alpha

This will eventually become a tool for tweaking and modifying MSH files outside of a model editor.

Currently it is simply a viewer of raw data with no editing capabilities.
If you want to 'see' how the tags fit together in a msh, this will do it.

The plan is to make it into a full-on, MSH file tweak and edit tool. With advanced chunk swapping, attribute managment and vertex/polygon manipulation features.

It doesn't do any of that right now.
Currently, it displays raw and translated information contained in a MSH.
Once this program can display the information correctly, I'll start making things editable. (very alpha right now.)

I have been on this for several months and it is now stable enough to get it into the hands of the curious.

FEATURES:
  • -32 and 64 bit versions (I can't test 64 bit on my end)
    -Open and Save SWBF1 and 2 MSH files
    -Tag and Tag Chunk export
    -Displays MSH Tag information in readable format (for known tags)
    -Displays MSH Tag information in hex format (for unknown tags)
KNOWN PROBLEMS:
  • -The GUI is not displaying properly on Win7 64 bit. (this one may cause me to change languages)
    -It is written in AutoIT, so the initial loading of the file is a bit slow (several min for the AT-AT.)
    -Size validation hasen't been tested a lot, so it may fail.
    -Fix Sizes hasen't been tested a lot and may break a msh.
    -A lot of the descriptions are messy, missing and/or inaccurate. These will be fixed.
PLANNED FEATURES
in no particular order
  • -Better display of tag data
    -Import Tag and Chunk files
    -Import/Export txt or xml of all data
    -Possibly save as Obj or other 3d formats (don't count on this one)
    -Validate Skeleton Names and Heirarchy
    -More Translated tags
    -Move Tags or Chunks, up or down the heirarchy
    -Tag specific controls for editing data
    -Overall Scalling of geometry
    -Insert/Delete Vertexes and associated normals, uv's, ect
    -Switch between HEX and translated data display
    -Display the bone heirarchy
    -Move MODLs around the bone heirarchy
    -Merge Geometries (for shadow volumes)
    -A help file and or proper documentation.
    -MSH Summery/Report (Poly counts, Textures used)
    -.option and basic ODF generation
    -Very Basic projection of Geometry (for visualizing vertex placement)
    -User Notes and calculator(s) for planning edits to achieve certain goals
WISHLIST FEATURES:
these will probably never happen.
  • -Rendering a MSH
    -Convert MSH to XSI source
    -Munge / Un-Munge a MSH
For an idea of what this program is showing you, my MSH Notes are here: [info].msh structure notes
And Ande's MSH research here: Star Wars: Battlefront MSH File Information

DOWNLOAD HERE:
SWBF_MSH_INFO_v0_05_alpha.zip
MediaFire

There are 2 versions in the archive. The 32 bit version is marked with 'x86' and the 64 bit version is marked 'x64'.
There may still be issues with the 64 bit version. If the issues can't be nailed out, I will port over to another language that doesn't have issues.

Any questions, suggestions, corrections, ideas, flames, or comments are welcome. I'm not a programmer, but I will try.

This post can be found at the following forums:
www.swbfgamers.com
gametoast.com

History:
Hidden/Spoiler:
01/31/2012 v0.05 alpha
-Moving forward on this release as I am seeing a dentist soon and that
may interfere with the programs progress.

-[new bug]something in the way I'm decoding FWGT is breaking the
'validate tag size' function so I'm disabling it for now. Also
disabling the 'save msh' till I am confident with the size issues.

-Customizing the data display for each tag is getting annoying from my
end. I'm switching to a generic [line number] [data] format till I
get past the translation hurdles.

-Started implementing tag definitions again. Got a bunch showing, and
they look correct. (so far) Time to catch up on the known MSH tag
translations.

-Started working on a 'Move Tag UP/DOWN' feature. Initially it works,
but hoses up the parent structure. I'll probably make it a
'Move Chunk'feature and limit movements to valid positions. Maybe
only allowing MODL chunks to be moved since that's all it would be
good for anyway.

-[resolved bug] - The loading slowdown is caused by resizing the arrays
on every entry. So I just need to resize the arrays before my loops
begin. (initial tests show a 1600% increase in tag conversion speed)
'THE' fix so far is to split up how I save data during conversion
into 3 functions, instead of one.

-the upshot of the following 3 is that the determiniation of sizes for
each tag are now correct, that chunk exporting is reliable, and the
summery display of tags within a chunk no longer bleeds into the next
chunk or to the end of the parent chunk.

-[resolved bug] - It's truncating 4 bytes off of some tags during
load. This one trumps everything. I was guessing at the chunk size,
now I'm actualy measuring. Doesn't slow it down much. (+/- .001 sec)

-[resolved bug] - CLTH's size in dummy.msh, was including SWCI (16 bytes)
Corrected size. It was probaby caused by the last child error below.

-[resolved bug] - The last child tag is not being calculated
correctly for (a lot of tags). This affects is what summery info is
displayed for it. And it IS affecting how chunks are saved. Just
re-wrote the hole function to explicitly define end tags.

01/25/2012 v0.04 alpha
-[note] - The difference in this version is subtle on the outside, but I
promise you, a lot of code got moved around.

-Some 3rd party MSHs have MTYP misspelled as MYTP. For now, I am
silently correcting but not saving. It's only 3 or 4 models, so I
think it was a typo on the modder's part and not a tool issue. In
the future the program will offer to save if this change is made.

-Adding some column labels.(this will continue until all tags have
sensible labels)

-re-organizing line labels.(this will continue until all tags have
sensible labels)

-[unresolved bug] - When opening a MSH while one is already loaded, the
program 'remembers' the selected tag and selects the same tag # on
the tree.
-[unresolved bug] - Some of the tags have an extra blank line in the
display. This doesn't affect saved files, but still needs to go away.

-[fixed bug] - The order I was assigning variables in the MSH parser was
causing incorrect offsets to be read in some fixed length, multiline
Tags. (like BBOX, DATA)

-The reason some tags take so long to convert is not the way I'm
converting them, It's the way I'm juggling variables and arrays. The
'fix' is to get everything passed as pointers instead of copying
values in memory. A rewrite of the parser is happening, but won't be
implemented until it is 100% working.

01/21/2012 v0.03 alpha
-Cleaned up debug menu. Added array descriptions

-increased the selected tag box height. It might be to big, but thats
better than to small.

-started organizing column descriptions (not yet complete)

01/20/2012 v0.02 alpha
-Greyed out disabled menu options.

-Disabled chunk export when a chunk is not selected.

-Validate Tag Size now asks if you want to repair an invalid size
field or not.

-Fix_AllTagSizes removed. It was redundant.

-still experimenting with different tag data displays

-added 64-bit build

01/20/2012 v0.01 alpha - released as is.
Last edited by tirpider on Tue Jan 31, 2012 6:06 am, edited 10 times in total.
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: [tool]SWBF_MSH_INFO (v0.02 alpha)[wip]

Post by Marth8880 »

This is excellent! I can't wait for newer builds! :D :thumbs:
User avatar
tirpider
Lance Corporal
Posts: 97
Joined: Fri Nov 25, 2011 3:58 pm

Re: [tool]SWBF_MSH_INFO (v0.02 alpha)[wip]

Post by tirpider »

Thanks.
I can't wait either.

Thats the catch, though. I'm neither a programmer or a 3d modeler, but I have time and patience, so there is probably going to be some waiting involved.
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: [tool]SWBF_MSH_INFO (v0.02 alpha)[wip]

Post by Marth8880 »

Well then that's just the thing now, isn't it? There's always room to learn new skills! :)
User avatar
ANDEWEGET
Ancient Force
Ancient Force
Posts: 1266
Joined: Tue Apr 01, 2008 8:42 am
Location: Germany
Contact:

Re: [tool]SWBF_MSH_INFO (v0.02 alpha)[wip]

Post by ANDEWEGET »

The 64-bit version works better. Theres just one UI bug left:
Hidden/Spoiler:
Image
(Dunno if the debug menu item should exist.)
I suppose its one, the # |TAG | SIZE | COUNT table in the upper right is still somewhat hidden.
Outstanding work otherwise! ;)
User avatar
tirpider
Lance Corporal
Posts: 97
Joined: Fri Nov 25, 2011 3:58 pm

Re: [tool]SWBF_MSH_INFO (v0.02 alpha)[wip]

Post by tirpider »

Groovy!

I know what is shorting the upper box. That will be fixed in the next one.

-edit.
I increased the size a hard 10px. That should get the box contents exposed.
There is a better (dynamic sizing) fix, but I am still deciding if that box is the best way to show what tag is selected and the details that don't logicly fit in the main tag data display area.
It may be replaced with a simple label or disappear altogether.
User avatar
ANDEWEGET
Ancient Force
Ancient Force
Posts: 1266
Joined: Tue Apr 01, 2008 8:42 am
Location: Germany
Contact:

Re: [tool]SWBF_MSH_INFO (v0.03 alpha)[wip]

Post by ANDEWEGET »

Ah thank you very much. The tag display works fine now.
You might want to quote/copy your old message, then delete it and paste the old message with your new message into a new post so people notice you added a new release.
User avatar
tirpider
Lance Corporal
Posts: 97
Joined: Fri Nov 25, 2011 3:58 pm

Re: [tool]SWBF_MSH_INFO v0.05 alpha

Post by tirpider »

I'm going to hold off on bumping type activity till the major changes.

The next big-ish change(s) to expect will be:
-tag specific cloumn and line labels.
-more organized data display in the big gridview.

Those should be ready in a day or 2.

I'd like to make each tag or chunk have it's own set of controls for displaying the data.
Like options for FLGS SHVO and ATRB.
A file select for CTEX and TX0D.
A color select pane for the various DATAs.
Sliders for WGHT percents.
UV0L is an interesting problem in itself. Could write a whole program that does nothing but figure out uv's.
But that is a different task for a different day.

Today I am figuring out what to call the columns and how to do it.


-edit-

(as soon as I said I wasn't bumping...)

Fresh version in first post.

I bump this because more tags are translated (confirming a lot of Ande's work.)
And it's loading a bit faster.
Still gets hung up on NDXL/XT but big models are no longer taking 15-20 min to load. 1 or 2 at the most.

Other than that, not much new.
User avatar
ANDEWEGET
Ancient Force
Ancient Force
Posts: 1266
Joined: Tue Apr 01, 2008 8:42 am
Location: Germany
Contact:

Re: [tool]SWBF_MSH_INFO v0.05 alpha

Post by ANDEWEGET »

Feels way more progressed and stable now. The better perfromance is very noticeable, too. Keep up the good work! ;)
User avatar
tirpider
Lance Corporal
Posts: 97
Joined: Fri Nov 25, 2011 3:58 pm

Re: [tool] SWBF_MSH_INFO v0.05 alpha

Post by tirpider »

Thanks, ANDEWEGET.

Dev is going fast and slow.

I was asked if this will fix tag sizes on SWBFGamers. It can't, and won't for a while. (not till v0.5 at least.)
BUT, in the mean-time, I am building a small standalone tool that will do nothing but that. (more details when it's done.)

Before I could get to far with it, my drive accidentalied itself. :faint:
Thought I lost all my source and MSHs but I was able to recover them.

I'm in the process of rebuilding my dev environment and a better back up routine.

Then back to msh grinding. :thumbs:

-EDIT-
The promised details on the standalone tool mentioned above.

I've made a small tool that when run, it will scan a selected msh file and determine if any of the size fields are incorrect. It will offer to fix them and offer to save a report (whether it fixes anything or not.)

I've been using it with great success. It allows me to hex a msh without having to worry about all the size entries that need to be updated.

Instructions are in the zip.
The thread for it is on swbfgamers.com , and a download link is here.

The way it loads a msh is different than my main tool. I plan on integrating it in the future, but I'm taking a break from programming to work on my models right now, so in the future might mean in several weeks/months.
User avatar
ANDEWEGET
Ancient Force
Ancient Force
Posts: 1266
Joined: Tue Apr 01, 2008 8:42 am
Location: Germany
Contact:

Re: [tool] SWBF_MSH_INFO v0.05 alpha

Post by ANDEWEGET »

Good job! Keep it up.
User avatar
AceMastermind
Gametoast Staff
Gametoast Staff
Posts: 3284
Joined: Mon Aug 21, 2006 6:23 am
Contact:

Re: [tool] SWBF_MSH_INFO v0.05 alpha

Post by AceMastermind »

This program is very easy to use and understand. I like how you can delete MODL chunks or export them out which saves time from doing it by hand but it doesn't save changes. Is this still being developed? How far along are you on implementing MODL chunk insertion? Once completed this would be a good tool for those who don't want to touch XSI or a hex editor. Nice work!
kinetosimpetus
Imperial Systems Expert
Imperial Systems Expert
Posts: 2381
Joined: Wed Mar 25, 2009 4:15 pm
Projects :: A secret project
Games I'm Playing :: Warframe STO

Re: [tool] SWBF_MSH_INFO v0.05 alpha

Post by kinetosimpetus »

I am getting this text on the download link...
Hidden/Spoiler:
[code]
Gateway Anti-Virus Alert

This request is blocked by the SonicWALL Gateway Anti-Virus Service. Name: KillAV.NOP (Trojan)[/code]
It's not a popup, it's directly in the page, and in fact, is the entire page.
User avatar
AceMastermind
Gametoast Staff
Gametoast Staff
Posts: 3284
Joined: Mon Aug 21, 2006 6:23 am
Contact:

Re: [tool] SWBF_MSH_INFO v0.05 alpha

Post by AceMastermind »

I'd say its a false positive thrown by your AV. The file was clean when I scanned it.
User avatar
ANDEWEGET
Ancient Force
Ancient Force
Posts: 1266
Joined: Tue Apr 01, 2008 8:42 am
Location: Germany
Contact:

Re: [tool] SWBF_MSH_INFO v0.05 alpha

Post by ANDEWEGET »

tirpider's not really active right now. The last time I talked to him about this tool he said that he wanted to turn this into more of a converter between .msh files and some text format. He used parts of this program in this thing: http://dl.dropbox.com/u/58361588/MSH_Ki ... sh_kit.zip. He has some tutorials about switching around MODL's on swbfgamers.com: http://www.swbfgamers.com/index.php?topic=4752.0

I use this all the time to look at exported .mshes etc when working on the ZETools. Very handy.
kinetosimpetus
Imperial Systems Expert
Imperial Systems Expert
Posts: 2381
Joined: Wed Mar 25, 2009 4:15 pm
Projects :: A secret project
Games I'm Playing :: Warframe STO

Re: [tool] SWBF_MSH_INFO v0.05 alpha

Post by kinetosimpetus »

SonicWALL isn't on my machine though.
User avatar
tirpider
Lance Corporal
Posts: 97
Joined: Fri Nov 25, 2011 3:58 pm

Re: [tool] SWBF_MSH_INFO v0.05 alpha

Post by tirpider »

I had to take a break to handle domesic issues, but I am still checking in, periodicly.

re:AV block
I did a quick search for SonicWALL, and foung a wikipedia link (http://en.wikipedia.org/wiki/SonicWALL)
They look like a legitimate branch of the Dell guys. They appear to make network hardware and virtual appliances.

The rest of the search results looked to sketchy to click. I'm still using ie so I don't hit random links (things that end with .us .info, ect.)

I have never heard of any of my tools being stopped by an AV before.
I make everything in AutoIT (an easy to use scripting language that offers compiling options)
While I do use some of the user generated code from thier forum, I don't use 3rd party libraries, so the exe is just my source and AutoIT.

I have seen sketchy redirects and wierd adfly-like download portals.. I avoid those and link directly to my dropbox, so there shouldnt be anything between the link and the file.

If you would like to review the source I can put it up somewhere.
I can't imagine why it would get flagged.

re:Further development
It's been a while.
The version of the info tool that in the kit Ande linked to above is the latest but still pretty much the same as the .05a.
Thanks for posting the link :)

The kit it'self is a little (a lot) awkward to use and is very hack-ish. (I appologize for that)
I reach a slowdown point and saw that it was going to be a while before I could add anything major to it so I wanted to share my process.
I now realize that explaining this process is harder than trying to automate it.

Injecting MODL chunks still requires a bit of hex-editing, and msh structure knowledge on the user side. I disabled saving in the program because of a quirk in the code that handled the pieces. (It was adding nulls to chunks that didn't need them. Sometimes it broke the msh.)

For now, I have that kit, that I use to break the entire msh into chunks, then handle the chunks as files (editing, moving, deleting) and then reassembling into a msh.
Some of the editing takes place in a spreadsheet, but the spreadsheet itself is more cumbersome than just using a hex-editor.

The advancment of the program is waiting on me to learn how to handle memory better.
Each new programming technique I learn seems to lead to a restructuring of how to address the msh structure itself, which is the core of the programs.
I finally got that part isolated, so I have a kind of 'library' of swbf msh functions that I can share between programs, but it is still very kludgy.

Right now, it is really only usefull to see the msh data. It can help you plan hex edits, or check tga names.
If you are bold, you can check the 'tutorial' I am writing on how to use that kit to isolate mesh pieces from thier MODL chunks.
But the write up isn't finished, and I have been slow to update these last few months.


I am sorry for the long delay in progress and then a wall of text :/
I do intend to continue with this project, even though Ande's fully armed and operational exporter defines a much more productive pipeline for modeling. It's just slow right now because life got in my way.
User avatar
ANDEWEGET
Ancient Force
Ancient Force
Posts: 1266
Joined: Tue Apr 01, 2008 8:42 am
Location: Germany
Contact:

Re: [tool] SWBF_MSH_INFO v0.05 alpha

Post by ANDEWEGET »

Glad to hear you're still checking in. I see you're back working at hex edits over on swbfgamers, too. :)
User avatar
tirpider
Lance Corporal
Posts: 97
Joined: Fri Nov 25, 2011 3:58 pm

Re: [tool] SWBF_MSH_INFO v0.05 alpha

Post by tirpider »

Yes.
It's been a while.
I promised a lot of edits before taking my break, so I have a lot of catch-up to do.
Only doing one at a time now, though. It is soooooo easy to get over booked and overwhelmed.

I haven't made any breakthroughs, but I have noticed you have :)
Your site is fleshing out nicely. I've already refered someone to your Render Types list. (and having only just discovered it myself, plan on studying it heavily.)
User avatar
ANDEWEGET
Ancient Force
Ancient Force
Posts: 1266
Joined: Tue Apr 01, 2008 8:42 am
Location: Germany
Contact:

Re: [tool] SWBF_MSH_INFO v0.05 alpha

Post by ANDEWEGET »

I try to collect all information you need for .msh files inone place. I found out some smaller things while writing the importer which still need to be added to the page. It generally needs a bit of an overhaul.
Post Reply