SWBFGamers

Modding for the Original SWBF1 and SWBF2 => SWBF1 Modding Tutorials => Topic started by: tirpider on November 17, 2011, 02:45:16 PM

Title: Blackfoot Repair (kludge)
Post by: tirpider on November 17, 2011, 02:45:16 PM
Blackfoot Repair (kludge)

Blackfoot is the un-intentional appearance of part of the skeleton of a model.
In some cases, it appears on or below the ground, directly between the legs of the character.
Sometimes it is a diamond shape inside the body of the model, and only appears (passing through the body or head,) during animation.

I believe what causes this, is the lack of, or improper FLGS in the skeleton MODL chunk(s).
There may be more to the issue, but this repair will get the blackfoot off the model and the game.

I'm going to ramble about some stuff now, feel free to skip to "Ok. So how do I do that?" to avoid boredom.
Bear with me as I am as good a writer, as I am a programmer. (meh)

First off, What is a MODL chunk?
[spoiler]MODL is a tag inside the msh file that defines geometries, points, and spaces for that model.
There are several types of geometries, and usually many MODL chunks per msh. Each can have it's own skin, shape, and visiblility settings. Those settings are contained in sub tags. To see an example of all these tags, load up a msh in the Starwars Battlefront Viewer and select "Show" then "Debug Window."[/spoiler]

Ok, What does all that mean?
[spoiler]Good question. Some of it is self explanitory, some isn't. I've got a thread on the msh structure [here]http://www.swbfgamers.com/index.php?topic=3905.0 (http://www.swbfgamers.com/index.php?topic=3905.0). I don't know what most of it means and am learning more about it every day. You don't have to know all about it to interact with it though. (Just like BFBuilder, eh?) Basicly, it's all the settings, geometries, material, camera, translation information, the game needs to render the model.[/spoiler]

What part Fixes blackfoot?
[spoiler]FLGS.
I don't know what setting diferent values for it does. GT has a thread on it and I'll link to it from here.
Browse through a known, good model's debug view in the viewer, and note which models have a FLGS field, and which ones don't.  FLGS will be located after NAME and PRNT, and before TRAN and GEOM.  Almost all the eff_*, bone_*, and root_* MODL chunks have it, while few of the others don't.
Now check the debug view of your model that has blackfoot. I'm almost certain, there are several skeleton pieces (eff_*, bone_*, and root_*) that don't have a FLGS tag.
The fix is to insert a FLGS field into the proper place.[/spoiler]

How will that fix it?
[spoiler]I'm guessing that FLGS has something to do with whether the engine renders a MODL or not. Perhaps it is just a visability setting. An XSI guru can tell you more about that part, cause I don't know.
What I do know is that copyig a FLGS field from a known good model into the skeleton pieces of one with blackfoot, makes the blackfoot go away. So this is more of a kludge than a fix.[/spoiler]

Ok. So how do I do that?
Finally. The meat and bones.

Tools:
Make a work folder containing the following:

SetupOne at a time, open each chunk with XVI32 and do the following:
Ok, now you have a folder full of 'fixed' MODL chunks.
Time to put it all back together.

Have a look at it in the MSH Viewer. If nothing shows up, then something is wrong with a size field somewhere. (most likely HEDR or MSH2)

Now rename the file, munge and test the msh in Battlefront.
If Battlefront crashes, then one of the 'fixed' MODL chunks probably didn't need fixing. Make sure you only did the bone_ root_ eff_ ones and not any of the actual geometry ones like 068_MODL_054_l_hand.chunk (note, no root, eff, or bone in it's name.)

Thats's it.
If it's working, rename it appropriatly and add it to your arsenal of assets, and delete the chunk work folder.
If it isn't working, go over the steps again, if it still isnt working, feel free to ask questions.

NOTE
I updated the chunk2MSH tool. If you are using "chunk2MSH_v2.exe" then you don't need to preform the purple steps. The program does it for you.

-edits-[spoiler]
11/22/2011 -marked un-needed steps, due to tool upgrade.
[/spoiler]
EhPortal 1.34 © 2024, WebDev