animate1978 / MB-Lab

MB-Lab is a character creation tool for Blender 4.0 and above, based off ManuelBastioniLAB
Other
1.85k stars 314 forks source link

Pose Warping from Pose File Imported after Finalization #358

Open F0xxify1 opened 3 years ago

F0xxify1 commented 3 years ago

Describe the bug Imported pose is warped before applied to armature. In this example, I just used the default a-pose, but it happens with any other pose in my testing.

To Reproduce Steps to reproduce the behavior:

  1. Create any character
  2. Export any "rest pose"
  3. Finalize character
  4. Import saved "rest pose" (or choose from drop-down menu)
  5. The imported pose will be warped from what it should be

Expected behavior The imported pose should be a 1:1 copy of what was exported.

Screenshots Intended Pose pose Pose when imported warped-pose

Additional context I tried with and without basic muscles and I primarily tested on M_AN01 but it seems to happen with all models. For M_AN01, the heels end up below the root bone/floor, but not for M_CA01 for some reason. It appears to change depending on the model and/or body measures?

Logs The following spoilers are from exported pose files

What the imported pose is (default a-pose, clean & neat) {"root": [1.0, 0.0, 0.0, 0.0], "pelvis": [1.0, 0.0, 0.0, 0.0], "thigh_R": [1.0, 0.0, 0.0, 0.0], "calf_R": [1.0, 0.0, 0.0, 0.0], "foot_R": [1.0, 0.0, 0.0, 0.0], "toes_R": [1.0, 0.0, 0.0, 0.0], "calf_twist_R": [1.0, 0.0, 0.0, 0.0], "thigh_twist_R": [1.0, 0.0, 0.0, 0.0], "thigh_L": [1.0, 0.0, 0.0, 0.0], "calf_L": [1.0, 0.0, 0.0, 0.0], "foot_L": [1.0, 0.0, 0.0, 0.0], "toes_L": [1.0, 0.0, 0.0, 0.0], "calf_twist_L": [1.0, 0.0, 0.0, 0.0], "thigh_twist_L": [1.0, 0.0, 0.0, 0.0], "spine01": [1.0, 0.0, 0.0, 0.0], "spine02": [1.0, 0.0, 0.0, 0.0], "spine03": [1.0, 0.0, 0.0, 0.0], "clavicle_L": [1.0, 0.0, 0.0, 0.0], "upperarm_L": [1.0, 0.0, 0.0, 0.0], "lowerarm_L": [1.0, 0.0, 0.0, 0.0], "hand_L": [1.0, 0.0, 0.0, 0.0], "thumb01_L": [1.0, 0.0, 0.0, 0.0], "thumb02_L": [1.0, 0.0, 0.0, 0.0], "thumb03_L": [1.0, 0.0, 0.0, 0.0], "index00_L": [1.0, 0.0, 0.0, 0.0], "index01_L": [1.0, 0.0, 0.0, 0.0], "index02_L": [1.0, 0.0, 0.0, 0.0], "index03_L": [1.0, 0.0, 0.0, 0.0], "middle00_L": [1.0, 0.0, 0.0, 0.0], "middle01_L": [1.0, 0.0, 0.0, 0.0], "middle02_L": [1.0, 0.0, 0.0, 0.0], "middle03_L": [1.0, 0.0, 0.0, 0.0], "ring00_L": [1.0, 0.0, 0.0, 0.0], "ring01_L": [1.0, 0.0, 0.0, 0.0], "ring02_L": [1.0, 0.0, 0.0, 0.0], "ring03_L": [1.0, 0.0, 0.0, 0.0], "pinky00_L": [1.0, 0.0, 0.0, 0.0], "pinky01_L": [1.0, 0.0, 0.0, 0.0], "pinky02_L": [1.0, 0.0, 0.0, 0.0], "pinky03_L": [1.0, 0.0, 0.0, 0.0], "lowerarm_twist_L": [1.0, 0.0, 0.0, 0.0], "upperarm_twist_L": [1.0, 0.0, 0.0, 0.0], "clavicle_R": [1.0, 0.0, 0.0, 0.0], "upperarm_R": [1.0, 0.0, 0.0, 0.0], "lowerarm_R": [1.0, 0.0, 0.0, 0.0], "hand_R": [1.0, 0.0, 0.0, 0.0], "thumb01_R": [1.0, 0.0, 0.0, 0.0], "thumb02_R": [1.0, 0.0, 0.0, 0.0], "thumb03_R": [1.0, 0.0, 0.0, 0.0], "index00_R": [1.0, 0.0, 0.0, 0.0], "index01_R": [1.0, 0.0, 0.0, 0.0], "index02_R": [1.0, 0.0, 0.0, 0.0], "index03_R": [1.0, 0.0, 0.0, 0.0], "middle00_R": [1.0, 0.0, 0.0, 0.0], "middle01_R": [1.0, 0.0, 0.0, 0.0], "middle02_R": [1.0, 0.0, 0.0, 0.0], "middle03_R": [1.0, 0.0, 0.0, 0.0], "ring00_R": [1.0, 0.0, 0.0, 0.0], "ring01_R": [1.0, 0.0, 0.0, 0.0], "ring02_R": [1.0, 0.0, 0.0, 0.0], "ring03_R": [1.0, 0.0, 0.0, 0.0], "pinky00_R": [1.0, 0.0, 0.0, 0.0], "pinky01_R": [1.0, 0.0, 0.0, 0.0], "pinky02_R": [1.0, 0.0, 0.0, 0.0], "pinky03_R": [1.0, 0.0, 0.0, 0.0], "lowerarm_twist_R": [1.0, 0.0, 0.0, 0.0], "upperarm_twist_R": [1.0, 0.0, 0.0, 0.0], "neck": [1.0, 0.0, 0.0, 0.0], "head": [1.0, 0.0, 0.0, 0.0], "breast_L": [1.0, 0.0, 0.0, 0.0], "breast_R": [1.0, 0.0, 0.0, 0.0]}
What the applied pose changes to (gunky mess of values) {"root": [1.0, 3.725290298461914e-09, 2.842170943040401e-14, -7.105427357601002e-15], "pelvis": [1.0, -4.023313522338867e-07, 4.4592162851131434e-08, 2.155831069217129e-12], "spine01": [0.9900930523872375, 0.14041317999362946, 9.276770462918194e-10, -2.46432598771662e-08], "spine02": [1.0, -4.656611762854368e-10, -9.783836169344456e-16, 6.661338677146531e-16], "spine03": [1.0, -1.4901162970204496e-08, 1.776357474674961e-15, 1.7763570511584873e-15], "neck": [0.9683415293693542, -0.24962909519672394, 1.766136570324761e-08, 5.76395997597956e-08], "head": [1.0, 7.450580596923828e-09, 1.0609568779074152e-14, 1.2212454329667906e-15], "breast_L": [0.98801589012146, 0.0646081492304802, 0.0036780762020498514, 0.14013150334358215], "breast_R": [0.98801589012146, 0.06460805237293243, -0.0036778529174625874, -0.14013168215751648], "clavicle_R": [1.0, -9.313222970597224e-10, 3.7252894102834944e-09, -1.1175864678136804e-08], "upperarm_R": [0.9923285245895386, 0.03466610983014107, 0.11866762489080429, -0.0006271208985708654], "lowerarm_R": [0.9991685748100281, 0.04002707824110985, 0.005904502235352993, 0.005013530608266592], "hand_R": [0.9992047548294067, -0.01715664379298687, 0.0006247085402719676, 0.03598813712596893], "thumb01_R": [0.9868126511573792, -0.15087944269180298, -0.019221218302845955, -0.05537877604365349], "thumb02_R": [0.9923023581504822, 0.08983778208494186, 0.07315022498369217, 0.04375234246253967], "thumb03_R": [0.9961977005004883, 0.08221985399723053, -0.01583273895084858, 0.024071399122476578], "index00_R": [1.0, 7.450578820566989e-09, -5.5879341154252415e-09, 2.7939670577126208e-09], "index01_R": [0.9931932091712952, 0.1161116510629654, -0.005790785886347294, 0.007242801133543253], "index02_R": [0.9965150952339172, -0.08288799226284027, -0.007337472401559353, 0.0057748123072087765], "index03_R": [0.9996801018714905, 0.005772293079644442, -0.010509876534342766, 0.022269319742918015], "middle00_R": [1.0, -1.4901164746561335e-08, -9.313227522511625e-09, 9.313225746154785e-10], "middle01_R": [0.9967976808547974, 0.0795898586511612, -0.007711008191108704, -0.0005971887148916721], "middle02_R": [0.9986043572425842, -0.05277291312813759, 0.001482602208852768, 0.0014980598352849483], "middle03_R": [0.9997870326042175, -0.008623545989394188, -0.006744202692061663, 0.017496174201369286], "ring00_R": [1.0, -7.450577044210149e-09, 0.0, 1.1102230246251565e-16], "ring01_R": [0.9987766742706299, 0.0449310801923275, -0.009615662507712841, 0.018276803195476532], "ring02_R": [0.9995179176330566, -0.019786091521382332, 0.004024006426334381, -0.023585014045238495], "ring03_R": [0.999023973941803, 0.03446253389120102, -0.006240133661776781, 0.026917044073343277], "pinky00_R": [1.0, 0.0, 0.0, -2.3283064365386963e-09], "pinky01_R": [0.9975791573524475, 0.0637340098619461, -0.00829597469419241, 0.02656427025794983], "pinky02_R": [0.9987741708755493, -0.04827579855918884, 0.004545410163700581, 0.009948843158781528], "pinky03_R": [0.9993590116500854, 0.034231822937726974, 0.00094817258650437, -0.010429753921926022], "rot_helper02_R": [1.0, 0.0, 0.0, 0.0], "clavicle_L": [1.0, 5.1222723840282924e-09, -5.587931894979192e-09, 3.725288078015865e-09], "upperarm_L": [0.9923300743103027, 0.03467056527733803, -0.11865422129631042, 0.0003039981529582292], "lowerarm_L": [0.9991685748100281, 0.03999592363834381, -0.005917492788285017, -0.0052434829995036125], "hand_L": [0.9992047548294067, -0.017156513407826424, -0.0006247613346204162, -0.035988107323646545], "thumb01_L": [0.9868126511573792, -0.15087935328483582, 0.01922132633626461, 0.05537876486778259], "thumb02_L": [0.9923009872436523, 0.09005088359117508, -0.07316876947879791, -0.04331197962164879], "thumb03_L": [0.9961977005004883, 0.08221878856420517, 0.015849830582737923, -0.024064157158136368], "index00_L": [1.0, -1.4901161193847656e-08, 3.725291186640334e-09, -4.6566133171666024e-09], "index01_L": [0.9931927919387817, 0.11609857529401779, 0.00582285737618804, -0.007449124474078417], "index02_L": [0.9965141415596008, -0.0830865278840065, 0.007431308273226023, 0.0010044308146461844], "index03_L": [0.999680757522583, 0.005768427159637213, 0.010386830195784569, -0.02229832485318184], "middle00_L": [1.0, 7.450580596923828e-09, 1.1102230246251565e-15, -9.313223525708736e-10], "middle01_L": [0.9967976808547974, 0.07958996295928955, 0.0077110035344958305, 0.0005972223589196801], "middle02_L": [0.9986040592193604, -0.052195630967617035, -0.0016722321743145585, -0.007927339524030685], "middle03_L": [0.9997860789299011, -0.009226633235812187, 0.006972660776227713, -0.017150480300188065], "ring00_L": [1.0, -7.450580596923828e-09, 0.0, -1.862645149230957e-09], "ring01_L": [0.9987788200378418, 0.04591339826583862, 0.009383386000990868, -0.015646230429410934], "ring02_L": [0.9995192885398865, -0.020361436530947685, -0.0038045155815780163, 0.023069269955158234], "ring03_L": [0.9990246295928955, 0.03488503396511078, 0.0061503807082772255, -0.026364903897047043], "pinky00_L": [1.0, -1.4901162970204496e-08, -9.313223525708736e-10, 1.3969840839678227e-09], "pinky01_L": [0.9975839257240295, 0.0658201202750206, 0.007662130054086447, -0.020866191014647484], "pinky02_L": [0.9987747669219971, -0.047969479113817215, -0.003954944666475058, -0.01150751207023859], "pinky03_L": [0.999358594417572, 0.03330039232969284, -0.0012920883018523455, 0.01311087142676115], "rot_helper02_L": [1.0, 0.0, 0.0, 0.0], "rot_helper03_R": [0.999640166759491, 0.026724541559815407, 3.4646936910576187e-06, 0.002323718275874853], "thigh_R": [0.9991486668586731, 0.04110711067914963, -0.0001512093876954168, 0.0035809108521789312], "calf_R": [0.9995233416557312, -0.006671189330518246, -0.00034706410951912403, -0.030141154304146767], "foot_R": [0.9992751479148865, -0.02976960502564907, 0.022812483832240105, 0.006523615214973688], "toes_R": [0.9995874166488647, 0.01481728907674551, -4.858398824580945e-06, 0.024608364328742027], "rot_helper04_R": [0.9998188018798828, -0.014887501485645771, 0.01140832994133234, 0.0032624013256281614], "rot_helper01_R": [1.0, 0.0, 0.0, 0.0], "rot_helper03_L": [0.999640166759491, 0.026724422350525856, -3.324526460346533e-06, -0.002323879161849618], "thigh_L": [0.9991486668586731, 0.04110740125179291, 0.000151095911860466, -0.0035809511318802834], "calf_L": [0.9995233416557312, -0.006671014241874218, 0.0003469943767413497, 0.030141036957502365], "foot_L": [0.9992752075195312, -0.02976887673139572, -0.022812414914369583, -0.006522647105157375], "toes_L": [0.99958735704422, 0.014816221781075, 4.691115918831201e-06, -0.024608375504612923], "rot_helper04_L": [0.9998188018798828, -0.014887158758938313, -0.011408296413719654, -0.0032619128469377756], "rot_helper01_L": [1.0, 0.0, 0.0, 0.0], "rot_helper06_R": [0.9999659657478333, 0.008223931305110455, 1.3595222299045417e-06, 0.0007150231976993382], "rot_helper06_L": [0.9999659061431885, 0.00822379719465971, -1.3309821724760695e-06, -0.000715073139872402]}