Bone ID issue when export from Max [SOLVED]

Started by Zombie, July 23, 2014, 07:41:29 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Zombie

Hey guys

I have the issue that most of the time when I export my mesh with bones from max to MD5, every bone has the same ID

http://i.imgur.com/Hnc0TN4.jpg

There is my mesh with my bones, all bones are attached to an origin bone. I did the exact same setup but with less bones and it worked fine. So I dunno how to fix this and it's frustrating as hell.

Good export, it works in DOOM just fine:

joints {
"Origin" -1 ( 1.15175 -597.698 0.0 ) ( 0.0 0.0 0.707107 ) //
"Bridge" 0 ( 0.000525713 -634.773 0.0 ) ( -0.5 0.5 -0.5 ) // Origin
"ChainRight" 1 ( -108.179 -637.397 260.084 ) ( 0.406459 0.578612 -0.406459 ) // Bridge
}


Bad export, forces DOOM to shut down:

joints {
"origin" -1 ( 16.9957695007 29.4303588867 11.1875534057 ) ( 0.0000000000 0.0000000000 -0.6389084339 ) //
"Bone001" 0 ( -48.5305709838 47.7777481079 0.0000000000 ) ( 0.0000000000 0.0000000000 0.7594769477 ) // origin
"Bone003" 0 ( -52.5416336059 -11.7044754028 0.0000000000 ) ( 0.0000000000 0.0000000000 0.5984609603 ) // origin
"Bone005" 0 ( -28.5580997467 -52.9919281005 0.0000000000 ) ( 0.0000000000 0.0000000000 0.1059574604 ) // origin
"Bone007" 0 ( 36.9395675659 -52.2604293823 0.0000000000 ) ( 0.0000000000 0.0000000000 -0.4673098564 ) // origin
"Bone009" 0 ( 35.9825706481 -25.9301223754 0.0000000000 ) ( 0.0000000000 0.0000000000 0.9946604728 ) // origin
"Bone011" 0 ( -23.8993091583 -18.6228008270 0.0000000000 ) ( 0.0000000000 0.0000000000 -0.8470067977 ) // origin
"Bone013" 0 ( -23.3992424011 35.7513122558 0.0000000000 ) ( 0.0000000000 0.0000000000 -0.0817928886 ) // origin
"Bone015" 0 ( 37.5858917236 23.0380325317 0.0000000000 ) ( 0.0000000000 0.0000000000 0.8847236633 ) // origin
"Bone017" 0 ( -0.1201276779 4.5263042449 0.0000000000 ) ( 0.0000000000 0.0000000000 -0.9999767303 ) // origin
}



Has anyone countered this and has a work around?

Maybe Bladeghost has some tips on good bone use in Max?

deadite4

does your hierarchy look different before/after you export?  I don't know modeling specifics but the overall format of the code looks off from my memory.  From modwiki:

Joints

Each element of the joints ordered list is structured like so ...

"[boneName]"   [parentIndex] ( [xPos] [yPos] [zPos] ) ( [xOrient] [yOrient] [zOrient] )

    boneName - The name of this bone.
    parentIndex - The index of this bone's parent.
    xPos - The X component of this bone's XYZ position.
    yPos - The Y component of this bone's XYZ position.
    zPos - The Z component of this bone's XYZ position.
    xOrient - The X component of this bone's XYZ orentation quaternion.
    yOrient - The Y component of this bone's XYZ orentation quaternion.
    zOrient - The Z component of this bone's XYZ orentation quaternion.

The number of elements is dependant on the number of joints.

For instance, if there are five joints, there should be five joint descriptors listed.

Zombie

I am just building something quick at work.

I also wanted to add, this happens for both dertons and berserkers exporter

Zombie

http://i.imgur.com/T5gHywl.jpg bone hierarchy is the same after export.

joints {
   "origin"   -1 ( 4.7570800781 160.9770050048 0.0000000000 ) ( 0.0000000000 0.0000000000 0.5272026538 )      //
   "Bone001"   0 ( -71.9575805664 -2.7382812500 0.0000000000 ) ( -0.0319409632 0.0849499797 0.3504896640 )      // origin
   "Bone003"   0 ( -29.0417823791 -5.5023651123 0.0000000000 ) ( 0.0000000000 0.0000000000 0.2356657743 )      // origin
   "Bone005"   0 ( 17.4923400878 -0.8904266357 0.0000000000 ) ( 0.0000000000 0.0000000000 0.6653309345 )      // origin
   "Bone007"   0 ( 69.6966400146 -0.0153961181 0.0000000000 ) ( 0.0000000000 0.0000000000 0.5622115135 )      // origin
}

and messed up bone IDs

Zombie

If I make the bones with no parenting I get this:

joints {
   "bob"   -1 ( 17.4195404052 -19.2511901855 0.0000000000 ) ( 0.0000000000 0.0000000000 -0.6701621532 )      //
   "fred"   -1 ( -27.5577888488 -18.0804214477 0.0000000000 ) ( 0.0000000000 0.0000000000 -0.7554274082 )      //
   "greg"   -1 ( -98.0873107910 -24.8631744384 0.0000000000 ) ( 0.0000000000 0.0000000000 -0.7043939113 )      //
   "jim"   -1 ( 92.7416076660 -7.8547363281 0.0000000000 ) ( 0.0000000000 0.0000000000 -0.7612549781 )      //
}

but I parent each bone to one in another in a linear sequence it works fine. But that breaks my animations then.

Zombie

#5
There is for sure something wrong with the exporter or I am using a too newer version of Max.

I am working on the new Assassins Creed Unity, and I exported one of our game characters to MD5 and it exported fine but the bone IDs are all messed up.

This rig I used of course is fine since we use it all the time in game.

Zombie

Oh I also know why it worked for my Drawbridge, because each bone was parented to the previous bone. But if you have multiple bones parenting back to a single bone, like fingers, how do you export that and make it work?

deadite4

here's how our Roden NPC is set up, if it helps to your fingers question:

numJoints 112
numMeshes 9

joints {
"origin" -1 ( 0.000000 0.000000 0.000000 ) ( -0.500000 -0.500000 -0.500000 ) //
"hips" 0 ( -2.441581 -0.000002 66.859856 ) ( -0.338746 0.338745 0.620686 ) // origin
"spine" 1 ( -3.394388 -0.000002 73.297157 ) ( 0.705199 0.051907 0.051907 ) // hips
"lwrobes1_front" 2 ( 6.022651 0.619565 64.566200 ) ( 0.698326 0.028608 0.026686 ) // spine
"lwrobes2_front" 3 ( 7.458486 1.047138 46.242867 ) ( 0.723856 -0.021213 0.015586 ) // lwrobes1_front
"lwrobes3_front" 4 ( 7.229933 -0.153314 21.481441 ) ( 0.722083 -0.002598 0.008855 ) // lwrobes2_front
"lwrobes1_left" 2 ( -1.945115 7.244762 65.679848 ) ( 0.043424 0.754587 -0.654751 ) // spine
"lwrobes2_left" 6 ( -0.949212 9.521703 49.465508 ) ( -0.020418 0.739116 -0.672496 ) // lwrobes1_left
"lwrobes3_left" 7 ( -2.279218 11.233120 31.516857 ) ( 0.665625 0.012324 0.017727 ) // lwrobes2_left
"lwrobes3_left.001" 8 ( -2.279218 11.233123 31.516846 ) ( 0.637829 -0.025714 0.003344 ) // lwrobes3_left
"lwrobes1_right" 2 ( -1.945105 -7.244766 65.679855 ) ( 0.754579 0.043426 -0.003684 ) // spine
"bigbag" 10 ( -1.090523 -9.488633 52.261459 ) ( 0.833807 -0.000689 0.000049 ) // lwrobes1_right
"lwrobes2_right" 10 ( -0.949199 -9.521699 49.465511 ) ( 0.739115 -0.020418 -0.032256 ) // lwrobes1_right
"lwrobes3_right" 12 ( -2.279202 -11.233110 31.516859 ) ( -0.012325 -0.665623 0.745976 ) // lwrobes2_right
"lwrobes1_back" 2 ( -7.879509 0.119820 67.426674 ) ( 0.713243 -0.012000 -0.013793 ) // spine
"lwrobes2_back" 14 ( -8.838302 -0.348775 41.141113 ) ( 0.711118 -0.045442 -0.001956 ) // lwrobes1_back
"lwrobes3_back" 15 ( -10.018746 -0.548238 23.661034 ) ( 0.717375 -0.054415 -0.042806 ) // lwrobes2_back
"waist" 1 ( -3.394388 -0.000002 73.297157 ) ( 0.010772 -0.707022 -0.707028 ) // hips
"ribs" 17 ( -3.580053 -0.000002 79.388367 ) ( 0.111186 -0.698310 -0.698311 ) // waist
"clavicle_l" 18 ( 0.685534 0.745040 89.168274 ) ( 0.084654 -0.625688 -0.250583 ) // ribs
"upperarm_l" 19 ( -4.233539 7.984430 89.706436 ) ( 0.237966 0.008863 0.088133 ) // clavicle_l
"forearm_l" 20 ( -1.347315 22.377129 82.127365 ) ( 0.264074 0.652674 0.130335 ) // upperarm_l
"hand_l" 21 ( 5.845336 33.665165 79.415840 ) ( 0.319195 0.616453 0.210267 ) // forearm_l
"finger_index1_l" 22 ( 8.957327 37.005531 79.550407 ) ( 0.197038 0.633780 0.200214 ) // hand_l
"finger_index2_l" 23 ( 9.799080 38.322353 79.503143 ) ( 0.261959 0.638058 0.236223 ) // finger_index1_l
"finger_index3_l" 24 ( 10.446131 39.061398 79.446922 ) ( 0.231331 0.603198 0.270569 ) // finger_index2_l
"finger_middle1_l" 22 ( 8.911466 37.078869 78.619682 ) ( 0.250103 0.621174 0.126335 ) // hand_l
"finger_middle2_l" 26 ( 9.801197 38.592125 78.244263 ) ( 0.341613 0.624562 0.208809 ) // finger_middle1_l
"finger_middle3_l" 27 ( 10.414077 39.181290 78.073166 ) ( 0.318256 0.584791 0.263226 ) // finger_middle2_l
"finger_ring1_l" 22 ( 8.819520 36.846760 77.657959 ) ( 0.305080 0.608260 0.137373 ) // hand_l
"finger_ring2_l" 29 ( 9.772655 38.147076 77.202141 ) ( 0.323285 0.648693 0.061152 ) // finger_ring1_l
"finger_ring3_l" 30 ( 10.096028 38.650417 76.968056 ) ( 0.346411 0.615420 0.170419 ) // finger_ring2_l
"finger_pinky1_l" 22 ( 8.669971 36.576477 77.029320 ) ( 0.336536 0.577708 0.077026 ) // hand_l
"finger_pinky2_l" 32 ( 9.433249 37.732700 76.408669 ) ( 0.407961 0.631928 0.042267 ) // finger_pinky1_l
"finger_pinky3_l" 33 ( 9.812661 38.173470 76.087746 ) ( 0.385289 0.604356 0.089684 ) // finger_pinky2_l
"thumb1_l" 22 ( 7.693716 34.562462 80.661644 ) ( 0.235293 0.687491 0.253293 ) // hand_l
"thumb2_l" 35 ( 8.516370 35.529953 80.722351 ) ( 0.253145 0.702450 0.299362 ) // thumb1_l
"thumb3_l" 36 ( 9.410604 36.400681 80.872993 ) ( 0.238416 0.632907 0.214089 ) // thumb2_l
"finger_middle1_l.001" 22 ( 8.306764 36.332298 78.772217 ) ( 0.273924 0.595325 0.203065 ) // hand_l
"finger_index1_l.001" 22 ( 8.436560 36.371494 79.622360 ) ( 0.268283 0.658069 0.207665 ) // hand_l
"finger_ring1_l.001" 22 ( 8.249817 36.179855 77.907219 ) ( 0.332162 0.615007 0.154844 ) // hand_l
"finger_pinky1_l.001" 22 ( 8.197562 36.051353 77.414185 ) ( 0.413840 0.633563 0.048243 ) // hand_l
"tprobes2main_l" 21 ( 0.545042 27.140177 79.088959 ) ( 0.751626 -0.131676 0.087303 ) // forearm_l
"tprobes2.1_l" 42 ( -1.236726 20.825157 73.466301 ) ( 0.308956 0.060639 0.129613 ) // tprobes2main_l
"tprobes3.1_l" 42 ( 0.448107 21.196642 75.988464 ) ( 0.308956 0.060640 0.129613 ) // tprobes2main_l
"tprobes1.1_l" 42 ( -5.875816 22.161150 74.970741 ) ( 0.308954 0.060638 0.129613 ) // tprobes2main_l
"tprobes1controler1_l" 21 ( 1.115623 26.446686 84.221458 ) ( 0.144327 -0.066856 0.295615 ) // forearm_l
"tprobes1main_l" 20 ( -2.519182 15.523667 82.834702 ) ( 0.749164 0.032488 0.182859 ) // upperarm_l
"tprobes2_l" 47 ( -2.034637 10.676375 79.283836 ) ( 0.308956 0.060640 0.129613 ) // tprobes1main_l
"tprobes3_l" 47 ( -0.349805 11.047863 81.805992 ) ( 0.308956 0.060640 0.129612 ) // tprobes1main_l
"tprobes1_l" 47 ( -6.673727 12.012368 80.788292 ) ( 0.308956 0.060640 0.129613 ) // tprobes1main_l
"tprobes1controler_l" 20 ( -2.637823 16.447449 87.717415 ) ( 0.162590 -0.021689 0.075426 ) // upperarm_l
"clavicle2_l" 20 ( -4.118257 11.183619 90.908325 ) ( 0.123194 -0.556837 0.204467 ) // upperarm_l
"clavicle2b_l" 19 ( -9.132840 7.938765 88.351295 ) ( -0.120959 -0.677488 -0.073611 ) // clavicle_l
"xbelt_l" 19 ( -3.561391 7.883228 92.250893 ) ( 0.616541 -0.333081 -0.547760 ) // clavicle_l
"clavicle_r" 18 ( 0.685535 -0.745038 89.168274 ) ( -0.625688 0.084654 -0.733864 ) // ribs
"upperarm_r" 55 ( -4.233528 -7.984435 89.706436 ) ( -0.008863 -0.237965 0.967226 ) // clavicle_r
"forearm_r" 56 ( -1.347285 -22.377127 82.127365 ) ( -0.652674 -0.264075 0.698064 ) // upperarm_r
"hand_r" 57 ( 5.845382 -33.665154 79.415840 ) ( -0.616452 -0.319195 0.688396 ) // forearm_r
"finger_index1_r" 58 ( 8.957378 -37.005512 79.550407 ) ( -0.633780 -0.197039 0.720703 ) // hand_r
"finger_index2_r" 59 ( 9.799133 -38.322334 79.503143 ) ( -0.638058 -0.261959 0.684440 ) // finger_index1_r
"finger_index3_r" 60 ( 10.446184 -39.061378 79.446922 ) ( -0.603198 -0.231332 0.713743 ) // finger_index2_r
"finger_middle1_r" 58 ( 8.911516 -37.078857 78.619682 ) ( -0.621174 -0.250103 0.731868 ) // hand_r
"finger_middle2_r" 62 ( 9.801250 -38.592106 78.244263 ) ( -0.624561 -0.341613 0.670539 ) // finger_middle1_r
"finger_middle3_r" 63 ( 10.414129 -39.181271 78.073166 ) ( -0.584791 -0.318257 0.698172 ) // finger_middle2_r
"finger_ring1_r" 58 ( 8.819571 -36.846748 77.657959 ) ( -0.608259 -0.305081 0.719774 ) // hand_r
"finger_ring2_r" 65 ( 9.772707 -38.147057 77.202141 ) ( -0.648693 -0.323286 0.686254 ) // finger_ring1_r
"finger_ring3_r" 66 ( 10.096081 -38.650398 76.968056 ) ( -0.615419 -0.346411 0.687179 ) // finger_ring2_r
"finger_pinky1_r" 58 ( 8.670022 -36.576466 77.029320 ) ( -0.577707 -0.336536 0.739638 ) // hand_r
"finger_pinky2_r" 68 ( 9.433299 -37.732681 76.408669 ) ( -0.631927 -0.407961 0.657609 ) // finger_pinky1_r
"finger_pinky3_r" 69 ( 9.812714 -38.173450 76.087746 ) ( -0.604356 -0.385289 0.691566 ) // finger_pinky2_r
"thumb1_r" 58 ( 7.693762 -34.562450 80.661644 ) ( -0.687491 -0.235294 0.638620 ) // hand_r
"thumb2_r" 71 ( 8.516418 -35.529942 80.722351 ) ( -0.702450 -0.253146 0.594023 ) // thumb1_r
"thumb3_r" 72 ( 9.410653 -36.400661 80.872993 ) ( -0.632907 -0.238416 0.704807 ) // thumb2_r
"finger_middle1_r.001" 58 ( 8.306813 -36.332287 78.772217 ) ( -0.595324 -0.273924 0.727543 ) // hand_r
"finger_index1_r.001" 58 ( 8.436608 -36.371483 79.622360 ) ( -0.658069 -0.268283 0.672194 ) // hand_r
"finger_ring1_r.001" 58 ( 8.249866 -36.179844 77.907219 ) ( -0.615006 -0.332163 0.698182 ) // hand_r
"finger_pinky1_r.001" 58 ( 8.197611 -36.051342 77.414185 ) ( -0.633562 -0.413840 0.651927 ) // hand_r
"tprobes2main_r" 57 ( 0.545079 -27.140175 79.088959 ) ( 0.131677 -0.751625 0.640390 ) // forearm_r
"tprobes2.1_r" 78 ( -1.236696 -20.825155 73.466309 ) ( -0.060639 -0.308955 0.940250 ) // tprobes2main_r
"tprobes3.1_r" 78 ( 0.448137 -21.196640 75.988464 ) ( -0.060639 -0.308955 0.940250 ) // tprobes2main_r
"tprobes1.1_r" 78 ( -5.875785 -22.161158 74.970741 ) ( -0.060638 -0.308954 0.940250 ) // tprobes2main_r
"tprobes1controler1_r" 57 ( 1.115659 -26.446684 84.221458 ) ( 0.066856 -0.144327 0.941972 ) // forearm_r
"tprobes1main_r" 56 ( -2.519160 -15.523670 82.834702 ) ( -0.032487 -0.749164 0.635815 ) // upperarm_r
"tprobes2_r" 83 ( -2.034621 -10.676376 79.283836 ) ( -0.060640 -0.308955 0.940250 ) // tprobes1main_r
"tprobes3_r" 83 ( -0.349789 -11.047862 81.805992 ) ( -0.060640 -0.308955 0.940250 ) // tprobes1main_r
"tprobes1_r" 83 ( -6.673709 -12.012375 80.788292 ) ( -0.060640 -0.308955 0.940250 ) // tprobes1main_r
"tprobes1controler_r" 56 ( -2.637800 -16.447453 87.717407 ) ( 0.021688 -0.162590 0.983568 ) // upperarm_r
"clavicle2_r" 56 ( -4.118241 -11.183623 90.908325 ) ( 0.556837 -0.123194 0.795581 ) // upperarm_r
"clavicle2b_r" 55 ( -9.132830 -7.938776 88.351295 ) ( -0.677487 -0.120960 -0.721776 ) // clavicle_r
"xbelt_r" 55 ( -3.561380 -7.883232 92.250893 ) ( -0.333081 0.616541 -0.457048 ) // clavicle_r
"clavicle1_l" 18 ( 2.993286 8.002431 83.273651 ) ( 0.044216 -0.650735 -0.174383 ) // ribs
"clavicle1_r" 18 ( 2.993297 -8.002423 83.273643 ) ( -0.650735 0.044215 -0.737685 ) // ribs
"clavicle1.1_l" 18 ( 4.668050 3.010785 81.513664 ) ( 0.044215 -0.650736 -0.174384 ) // ribs
"clavicle1.1_r" 18 ( 4.668054 -3.010777 81.513657 ) ( -0.650736 0.044214 -0.737684 ) // ribs
"clavicle1b_l" 18 ( -10.319237 10.302326 84.166084 ) ( -0.178052 -0.681649 -0.016307 ) // ribs
"clavicle1b_r" 18 ( -10.319224 -10.302338 84.166092 ) ( -0.681647 -0.178053 -0.709499 ) // ribs
"chest" 18 ( 9.027701 0.000007 81.948296 ) ( 0.054434 -0.705008 -0.705009 ) // ribs
"back" 18 ( -12.111722 -0.000010 76.781860 ) ( 0.123973 -0.696154 -0.696155 ) // ribs
"Shoulders" 18 ( -5.795223 -0.000004 86.168304 ) ( 0.000000 -0.707107 -0.707107 ) // ribs
"xbelt1_r" 17 ( -1.284388 -7.958091 74.759613 ) ( -0.446981 0.521582 -0.551167 ) // waist
"smallbag" 100 ( -1.284388 -7.958091 74.759613 ) ( 0.795355 0.011183 0.023620 ) // xbelt1_r
"xbelt1_l" 17 ( -1.284398 7.958090 74.759613 ) ( 0.521582 -0.446981 -0.473684 ) // waist
"ongbholder6" 102 ( -7.189560 7.031372 73.392593 ) ( 0.324028 -0.203680 -0.289673 ) // xbelt1_l
"ongbholder5" 103 ( -9.527071 9.302979 71.747749 ) ( 0.320698 -0.094767 -0.379939 ) // ongbholder6
"ongbholder4" 104 ( -12.310373 11.268002 69.877701 ) ( 0.293840 0.304330 0.701738 ) // ongbholder5
"ongbholder3" 105 ( -5.834027 10.230372 70.471992 ) ( 0.412031 0.388379 0.674441 ) // ongbholder4
"ongbholder2" 106 ( 1.174713 8.408926 71.446762 ) ( 0.380277 0.412143 0.688187 ) // ongbholder3
"longbholder1" 107 ( 7.372104 6.861843 72.867645 ) ( 0.123555 -0.553446 -0.749340 ) // ongbholder2
"book" 106 ( -2.044874 10.045159 70.980164 ) ( 0.567312 -0.018124 0.127740 ) // ongbholder3
"bholder1" 102 ( 4.710008 5.915873 76.026497 ) ( 0.581219 0.252401 0.196028 ) // xbelt1_l
"bholder2" 110 ( 5.642291 6.309113 74.801613 ) ( 0.627421 0.242307 0.214669 ) // bholder1
}

Zombie

Hahah unfortunately that doesn't tell me anything.

Is it possible to see a max file, you can strip out the mesh and everything, I just need to see the rig. you can email it to me at garth.hendy@gmail.com if it's possible.

deadite4

I don't have the max file, but if you want it I can send the md5mesh?  Do you have an importer?

Zombie

yeah that should be OK I think, I'll give it a try for sure.

BUt a max file would be super great if you can get your hands on one over the next few days.

deadite4

Mesh sent.  This thing was completely made in Blender so even if I could track down the source file it wouldn't be Max format.

Zombie

#12
Thanks for sending that.

I solved the problem I think, I exported a few different meshes and it all worked perfectly in the engine with no errors :D

I built basically the same thing as I showed, but of course I never bothered to test it in engine.

But the problem was I had 2 origins, which is a -1 ID, you can only have one of these of course, and it seems perfectly fine to have multiple bones using the same ID.

Thanks for peoples help and inspiration to think outside the box to fix it :)

:chaingun: :fatty: :baron: :mastermind: :cyberdemon: :cacodemon:

Bladeghost

Quote from: Zombie on July 23, 2014, 07:41:29 AM
Maybe Bladeghost has some tips on good bone use in Max?

Glad to hear it's working, multiple origin bones will confuse for sure.
sorry I couldn't be much help as I just read this today.