SWBFGamers

Modding for the Original SWBF1 and SWBF2 => Requests => Topic started by: Phobos on November 15, 2011, 10:12:31 PM

Title: Unit Mesh Bone Fix Request
Post by: Phobos on November 15, 2011, 10:12:31 PM
Requesting a fix or workaround to hide bone_pelvis in game. This bone shows up as a black triangle between the unit's feet in SWBF1.

Download: http://www.mediafire.com/?d7g7cttk8w99mef

In-Game Bug View
(https://www.swbfgamers.com/proxy.php?request=http%3A%2F%2Fscreenshot.xfire.com%2Fs%2F119377700-4.jpg&hash=f0d5b88d590f87d2960588db4a6512323fdf4a24)

This same bug happens with the Kit Fisto (Nautolan) unit mesh also.
Title: Re: Unit Mesh Bone Fix Request
Post by: tirpider on November 16, 2011, 12:15:11 PM
2 pieces.
So far, I got the big, irregular piece out.
There is still a diamond shaped one left.

The pelvis was missing the FLGS section in it's MODL chunk.
I suspect thats what is wrong with the other piece, but I'm going to scan through all the MODL's to be sure.

-edit-

FIXED
I compared the tag structure of the MODL chunks to that of tat_inf_tusken.msh (It's what I had on hand at the moment) and saw that almost the entire skeleton for rep_hero_quinlan.msh were missing the FLGS field.
I pasted the FLGS field from the Tusken pelvis, to just before the TRAN field in 33 skeleton pieces (adding 396 bytes to the filesize.)
Doing just the pelvis left a piece, thats why I did all the things.

I don't know what the FLGS field does.
But it is apperantly important to BF1.

http://www.megaupload.com/?d=GWX3169E (http://www.megaupload.com/?d=GWX3169E)
Title: Re: Unit Mesh Bone Fix Request
Post by: SleepKiller on November 16, 2011, 02:57:04 PM
Nice work!
Title: Re: Unit Mesh Bone Fix Request
Post by: Phobos on November 16, 2011, 03:42:51 PM
Thank you very much for fixing Quinlan! You are very helpful. If I can ever get XSI working on my computer I will try what you did.

Here are assets for Kit Fisto and Cin Drallig, the only other units I can think of right now that have blackfoot. http://www.mediafire.com/?1ol0796foadb9bj
Title: Re: Unit Mesh Bone Fix Request
Post by: tirpider on November 16, 2011, 08:32:58 PM
Got it.

Same with these guys. No FLGS field, so I pasted it in.
Didn't use XSI on this. (Haven't opened it in 2 months.) Used my little msh2chunks tool, edited the chunks individually(with a hex editor) and then used chunk2msh and tested in my development/scratch level in bf.
(those tools are at the end of my msh structure notes. I'll make a proper post for them once they are more stable and documented) http://www.swbfgamers.com/index.php?topic=3905.0 (http://www.swbfgamers.com/index.php?topic=3905.0)

I did use my msh edit program to quickly look at the tag structure. I havent released it yet, because it is still very very hackish and buggy. But wingrep verified the non presence of the tags as well.

The trick was rembering how many chunks I edited so I could properly update the MSH2 and HEDR.

File name: KitFistoCinDrallig_no_blackfoot.rar
File size: 3.54 MB
http://www.megaupload.com/?d=K6FY7A50 (http://www.megaupload.com/?d=K6FY7A50)

-edit-
I'm still not 100% happy with these msh's.
There are several addon geometries and I'm not sure the absence of FLGS was the actuall prob. (The bones were nested pretty strangly compared to other msh's.)
I'm pretty sure there is a way to combine and properly name the textures.  (name is simple, but adjusting UV is not)
Fisto's weave animation(lack of it) bugs me, but I'm just glad he made it to BF1 at all. (after dealing with geometry outside of XSI, next is animations.)

Since I don't have answers to the above, I'll just have to promise to re-visit them in the future.
Title: Re: Unit Mesh Bone Fix Request
Post by: Phobos on November 16, 2011, 10:27:05 PM
Very nice work and thanks for doing this Tirpider. Perhaps when your tool is stable enough you can make a tutorial for how to fix bugs like blackfoot with it. I might upload alien model assets 3.5 to include the fixed units. The original gran made by spiderpig and fang is only used a low mesh now and it has blackfoot too, there is not any priority to fix it but you can if you want. http://www.sendspace.com/file/9vekmm

I'm wondering how we can stretch the neck of the Quermian meshes without having to build new animations or skeletons.

I'm wondering if you can inspect the Ithorian mesh and find out why it doesn't work in SWBF1 (instant crash). If you see anything out of place that isn't in other unit meshes that might be the cause. Here is link: http://www.sendspace.com/file/wslr1b
Title: Re: Unit Mesh Bone Fix Request
Post by: tirpider on November 16, 2011, 11:16:38 PM
The ultimate aim of my tool is to enable just these kind of fixes AND to facilitate experimenting with crazy values without having to swim through to much hex or forums that wont let you search without signing up. ;) So a write up on this fix is enevitable. (once I figure out how to explain it.) The main thing keeping it back is automaticly updating the size fields in a way that is transperant. IMO, having to adjust sizes for every edit is what makes hexing so intimidating.

I'll have a go at the Gran. The blackfoot I can do pretty quick. (tomorrow sometime)
As for adding the fixed ones to your pack, cool, I'm honored. Don't sweat crediting me for the fixs though, I'm just in this for the fun. I'd be more worried about the original authors.

re: neck stretching.
For me it would start with isolating the points in POSL, then shifting them up and testing.
The skin would stretch as well and might need to be tweaked to accomodate that.
I haven't a clue on how to stretch a bone. No GEOM in the bones, just TRAN , NAME, and MATI. But I'm certain that it can be done.
If there is anything else, then it would have to be discovered from there.
(like if it messes with collisions, looks natural, ect)

I have succesfully moved points within a POSL (MODL chunk) without crashing or messing up envelopes, skins, or animations.
But it took all day (12+ hours) to isolate the points, cycling between the msh viewer, hex editor, and 3d object converter.
That was just to isolate the head.  The last 6 hours were spent on the neck, and I ended up cutting to much out.
It was after doing just that, that I decided a gui msh editor was needed for me to accomplish my dream of a better Tusken army. (without learning XSI.)
Title: Re: Unit Mesh Bone Fix Request
Post by: Led on November 16, 2011, 11:51:12 PM
If you want me to search on GT for something, just give me the keywords.  I can send you links by PM or something.
Title: Re: Unit Mesh Bone Fix Request
Post by: Phobos on November 17, 2011, 12:00:01 AM
Quote from: Buckler on November 16, 2011, 11:51:12 PM
If you want me to search on GT for something, just give me the keywords.  I can send you links by PM or something.
Since I am touching up the release of alien assets 3.5 for tomorrow do you think you could search gametoast for any new alien model releases? There probably aren't any but it doesn't hurt to check.
Title: Re: Unit Mesh Bone Fix Request
Post by: tirpider on November 17, 2011, 01:05:12 AM
got it.

File name: gran(old version) (visible bone_ribcage fixed).rar
File size: 117.73 KB
http://www.megaupload.com/?d=ZE8QYMNC (http://www.megaupload.com/?d=ZE8QYMNC)
(msh only)

I accidentaly 'fixed' the granmodel4 and BF1 choked(munged fine though), so not all the MODL chunks need to have a FLGS field.

On that same note, I'm testing in the actual game, not sptest, so I have no idea if these msh's are throwing errors in it or not.

re:GT searches.
That was more of a jab at the site. It was terribly inconvienient when I started out and all the answers I read were filled with 'use the search' replies. Their noob control almost turned me off of BF modding altogether. But they have since opened the register function again, and I figured out how to search their site via yahoo and google. (still haven't registered though.)
More for the site than the users though, as they have an incredible amount of information and a lot of hard working modders over there.
Title: Re: Unit Mesh Bone Fix Request
Post by: Phobos on November 17, 2011, 02:08:21 AM
thanks again tirpider, alien asset 3.5 pack is almost ready for release
http://www.swbfgamers.com/index.php?topic=3969.0

I just tested qui-gon jinn and he also has blackfoot. If you can would you fix his mesh too? I will reupload a patched alien assets 3.5 pack when you do
http://www.sendspace.com/file/vi6sun

Fisto, cin drallig, vos, and jinn all come from a heroes side assets pack. I think it was made for swbf2 though which might explain the bugs.
Title: Re: Unit Mesh Bone Fix Request
Post by: tirpider on November 17, 2011, 11:47:20 AM
got it.

File name: Qui-Gon_no_blackfoot.rar
File size: 1.56 MB
http://www.megaupload.com/?d=EI7R9WVY (http://www.megaupload.com/?d=EI7R9WVY)

Blackfoot gone.

I'm going to review some of the BF2 models. All these guys with blackfoot has me wondering if it's a feature dropped in BF2 altogether, or just a glitch in someone's exporter. They were also 'missing' (don't know if they were ever there to begin with) the post-MSH2 stuff, like SKL2, BLN2, ANM2, and the first one was missing CL1L. I'm guessing its an exporter issue, but don't know it it is the MSH Viewer, or the XSI one.

All these models have a very simular, Jedi body, so it might just be a problem with this body.

If you run across any more with the blackfoot, post them here and I'll fix them, but I'm also going to try to do a how-to today to spread some of the hex-love.
Title: Re: Unit Mesh Bone Fix Request
Post by: Phobos on November 17, 2011, 07:00:05 PM
great job tirpider. I will include your blackfoot repair kit in the release.

The final upload is done. http://www.mediafire.com/?cmc0791tufpupsk
Title: Re: Unit Mesh Bone Fix Request
Post by: tirpider on November 17, 2011, 10:53:02 PM
Right on.
I hope the info helps.
Sorry if it seems unclear at points, been working through severe headaches the last few days.

I like the name 'Blackfoot Repair Kit' :)
And this asset pack is fantastic. It's come a long way since 1.4.
Title: Re: Unit Mesh Bone Fix Request
Post by: Phobos on November 17, 2011, 11:57:14 PM
Quote from: tirpider on November 17, 2011, 10:53:02 PM
Right on.
I hope the info helps.
Sorry if it seems unclear at points, been working through severe headaches the last few days.

I like the name 'Blackfoot Repair Kit' :)
And this asset pack is fantastic. It's come a long way since 1.4.
i will be testing your tutorial within the next few days. i want to try removing blackfoot from one of the models using your method. btw have you found any information in the riley pdfs? it seems to talk alot about chunks but mostly lvl not msh
Title: Re: Unit Mesh Bone Fix Request
Post by: tirpider on November 18, 2011, 12:37:06 AM
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]
Title: Re: Unit Mesh Bone Fix Request
Post by: Phobos on November 18, 2011, 01:18:25 AM
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?
Title: Re: Unit Mesh Bone Fix Request
Post by: tirpider on November 18, 2011, 12:19:40 PM
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.)

Title: Re: Unit Mesh Bone Fix Request
Post by: Phobos on November 18, 2011, 11:38:37 PM
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.
Title: Re: Unit Mesh Bone Fix Request
Post by: tirpider on November 18, 2011, 11:52:45 PM
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.
Title: Re: Unit Mesh Bone Fix Request
Post by: Phobos on November 19, 2011, 12:25:54 AM
Video http://www.xfire.com/video/506347/

In-game screenshot
(https://www.swbfgamers.com/proxy.php?request=http%3A%2F%2Fscreenshot.xfire.com%2Fs%2F119453036-4.jpg&hash=bc74d03581cdd3e9bdc7d2906bcd087a95d73dd1)

SWBF1's idea of abstract art.
Title: Re: Unit Mesh Bone Fix Request
Post by: tirpider on November 19, 2011, 12:31:29 AM
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.
Title: Re: Unit Mesh Bone Fix Request
Post by: Phobos on November 19, 2011, 12:34:54 AM
i wish you luck. he is such a cool alien
Title: Re: Unit Mesh Bone Fix Request
Post by: tirpider on November 23, 2011, 01:24:16 AM
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)
Title: Re: Unit Mesh Bone Fix Request
Post by: SleepKiller on November 23, 2011, 01:35:09 AM
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.
Title: Re: Unit Mesh Bone Fix Request
Post by: Phobos on November 23, 2011, 05:23:58 PM
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.
Title: Re: Unit Mesh Bone Fix Request
Post by: tirpider on November 25, 2011, 12:32:32 PM
heh. I don't see why not.

We could put them in game without textures and call it "Angry Wads of Paper"
EhPortal 1.34 © 2024, WebDev