Unit Mesh Bone Fix Request

Started by Phobos, November 15, 2011, 10:12:31 PM

Previous topic - Next topic
The Riley pages have great info.
The many boxes around his sections represent the nesting. Pretty novel, I thought.
All his info is specificly relevant to lvl files.
I got most of my tag info from there, from GT, the Debug Window in the msh viewer, the archived docs in the modding encyclopedia, and from the documented options in the BF1 and 2 modding tools. (I need to update the end of my notes page to reflect my sources)
If he was working at my speed, the Riley pages would have taken years to make.

The msh stuff he does have is refering to how the msh is stored in the lvl file and not the msh's in our asset folders.
It's still points, triangle strips and material info, but a lot of the details, tag structure, and byte encoding are different. Once the assets, scripts and such make it to the lvl, they need to be in a state thats ready to be consumed by the engine as quick as possible. The .msh is still pretty high level and un-optimized (though I was suprised to find triangle strip info).
He mentions some of the directx formats and refers to msdn for further study on them. They make my brain hurt.

The biggest (most inconvienient) difference is that the tags used in the lvl sections of the lvl files have 3 or 4 characters and are not case sensitive. I went crosseyed trying to find that pistol in the ps2 lvl and had to give up till I can dedicate some time to learning all the lvl tags. I seem to remember that some of the info is broken up and stored in diferent areas once it's munged. Like the actual skeleton geometry. Info like that is relevant to whether we can stretch neck bones without making a new skeleton rig.

I see you guys hexing the lvl files and it blows me away. I can't make sense of em.

[spoiler]too many words - too many words[/spoiler]

The riley pages were released within months of the game being released and I know there is a lot of info but I can't put very much of it to use. Do you think the msh files can be extracted from LVL?

The trick to hex editing is knowing what characters to search for. You must try upper and lower case combinations. Words like boundary, Boundary, capture, and vehicle_spawn.

Have you seen how yarael poof (quermian) looks in mesh viewer compared to in-game?

November 18, 2011, 12:19:40 PM #17 Last Edit: November 18, 2011, 01:16:45 PM by tirpider
Can msh's be extracted? Yes and no.
Once extracted, they wont be msh's as we know it. It would be the same as a msh that passes through ModelMunge.exe.
I'm sure the extracted msh could some how be shoe-horned into a lvl file, or even properly munged back in. (I don't know the details of how.) That would require knowing how the bfbuilder tools and all the munge.bat files work.

Yarael Poof.
heh. I'm not certain I loaded him right. I test without skins, so he looked like an angry wad of paper.
If that's his main issue, my first guess is that he is enveloped all goofy.
What animations does he use?

-edit-
I tried the blackfoot repair on him. (for giggles.) It cleaned it up a little, but still has geometry on the floor, not animating, and his arms are placed and animating in strange ways.

The yareal1 chunk (the one with the actual mesh data) has 3 SEGM's in it's GEOM. I haven't seen that before.

His bone hierarchy seems to be intact.

-still digging

Does this guy work in BF2? (can't test that, don't have it.)


bamdur ported the yarael poof mesh from a ravensoft GLM basemodel I located some months ago. You could ask him what he did different. From what I can see the neck obviously is much longer than stock unit skeleton rigs.

November 18, 2011, 11:52:45 PM #19 Last Edit: November 19, 2011, 12:17:24 AM by tirpider
I got hung up on this poof guy all day. Got it in the hex editor right now. checking things I know and looking for wildly different things.

Aside from the stuff in the last post the only thing I've noticed is he is weighted funny. Most the bf models have a single weight ref and value, even though there are 4 slots per weight. this guy has 2. They all balance to 100%, but the idea is wierd.

Even with the long neck, his head should still be where the normal soldier's head would be though and not 2 feet to his right and on the ground. All the ENVL settings are correct. So the stuff it's weighted and enveloped to are just in the wrong place.

I'll get a small screen in here to see if it's what your seeing.

November 19, 2011, 12:25:54 AM #20 Last Edit: November 19, 2011, 05:26:30 AM by Phobos Developer
Video http://www.xfire.com/video/506347/

In-game screenshot


SWBF1's idea of abstract art.

lol
this has to be something messed up with the envelope.

I'm going to do some major surgery on his skeleton. (replace all the bones) I've been itching to try it anyway.
The worst that can happen is he will look stranger.

i wish you luck. he is such a cool alien

It's 100% a weighting problem.

I isolated the head SEGM and it's weights.
It starts off with the spine, works it's way around the neck then to a hand, then the other hand.

I thought I was looking at the wrong wght section. nope, triple checked.

So, the fix is to go through and re weight this guy. the envelope parts seem ok (by my untrained eye.)

I'm going to try to do the head by hand (527 points, so roughly 1054 edits), then see if I can make a somewhat automated process for the others.
(or at least a way to get the #'s into a spreadsheet then back again)

This might take a couple of min.
(by min, I mean days, and by couple, I mean a whole bunch of)

Quote from: tirpider on November 23, 2011, 01:24:16 AM
This might take a couple of min.
(by min, I mean days, and by couple, I mean a whole bunch of)
LOL! At that. Good luck man.

i wonder if you could randomize/scramble unit mesh weighting to produce bizarre, abstract renditions such as this. it would be fun for certain mods.

heh. I don't see why not.

We could put them in game without textures and call it "Angry Wads of Paper"