Aller au contenu

Photo

mmh and skinning issue


  • Veuillez vous connecter pour répondre
8 réponses à ce sujet

#1
tmp7704

tmp7704
  • Members
  • 11 156 messages
Trying to modify my exporter so it can calculate the vertex weight map IDs itself and generate .mmh file accordingly, but experiencing a problem -- in game, parts of the skinned armour mesh are all over the place rather than where expected.

as far as i can tell --comparing generated binary .mmh files side by side in the Toolset-- the skeleton hierarchy is re-generated virtually identical to what it's like in the source .mmh file. (through cheating, but that's a story for another day) So i'm inclined to chalk this up to the game interpreting the weight map IDs in different manner than i do.

I have presumed (based on the default game files) weight maps are stored like this:

* bone nodes in the skeleton defined in .mmh have assigned IDs, ranging "0 to amount of bones - 1". Nodes which aren't bones have ID of -1.
* each chunk has list of "used bones" which is a list of these global bone IDs utilized by the chunk
* in the .msh file weight map IDs are indices to that "used bones" list starting from 0. e.g. if the used bones list for chunk is 2, 65, 33 and weight map ID of a vertex is 2 then it means "3rd position in the used bones list -> bone with global id of 33"

this part also seems to work in the exporter. At least, importing a regular .mmh, exporting that and re-importing resulting file produces the same weight maps in the 3d program. The only factor which does change is the global IDs assigned to the bones.

Pretty much stumped what exactly is causing the issue then, and how it can be fixed. Image IPB

i have uploaded a sample of default heavy armour mesh exported and showing the error in question here: http://social.biowar...ct_file_id=5620 if someone wants to take a look.

Modifié par tmp7704, 05 août 2010 - 03:46 .


#2
DarthParametric

DarthParametric
  • Members
  • 1 412 messages
Best to contact Eshme and Chewy Gumball about this directly, as they'll have the most experience with it.

#3
tmp7704

tmp7704
  • Members
  • 11 156 messages
Well, for what it's worth turns out the issue can be resolved by assigning the bones identical IDs with the ones they had in the original .mmh file.

Since values of these IDs aren't fixed but seem to vary depending on race and/or gender i'm guessing it's to do with something convoluted like the game taking "parent" version of the skeleton from something like head model and then ignoring the IDs from the "child" components or whatever? Mildly annoying.

#4
Eshme

Eshme
  • Members
  • 756 messages
Yes you can ask anytime. We had lenghty arguments with Chewy and You too some time ago.



The parent skeleton can be either of a chain. Last of the chain is Eyes as far i know. The ID's need to match over all parts thats all. Your model works fine as i import it, except that the ID's are not retained. If the model had no parts, like cats or something it wouldnt matter.



How we do in max is attaching the ID as a custom, useraccesible, and changable property to each bone. Upon import it is stored, on export retrieved.



See these posts

http://social.biowar...5/index/1920497

http://social.biowar...2/index/2674696

#5
tmp7704

tmp7704
  • Members
  • 11 156 messages

Eshme wrote...

The parent skeleton can be either of a chain. Last of the chain is Eyes as far i know. The ID's need to match over all parts thats all. Your model works fine as i import it, except that the ID's are not retained. If the model had no parts, like cats or something it wouldnt matter.

Yeah, the need to match IDs caught me unguarded since i imagined with the way the .mmh defines them they could be independent for each mmh-msh pair -- the animation is done through associated controllers after all. I can store the IDs on import and re-apply them on export so it's not a large issue, just makes things less elegant. Oh well.

#6
Eshme

Eshme
  • Members
  • 756 messages
Interesting how you worked on your mod without this.



Dont be afreaid to ask me any

#7
tmp7704

tmp7704
  • Members
  • 11 156 messages
The version of exporter i was using was developed just for .msh export at first, so it'd read and preserve the IDs assigned for individual mesh chunks. For simple editing work that was enough Image IPB

I normally try to post questions in the forums really since i figure if nothing else who know, maybe someone else is going to have problem like that at some point so this way they'll have something in the forums that may help them, too.

#8
Eshme

Eshme
  • Members
  • 756 messages
fair enough =D

#9
ChewyGumball

ChewyGumball
  • Members
  • 282 messages
Indeed, this was really the only major problem with my export and Eshme solved it. I would not hesitate to ask her if you need any more help.