@automovie/human 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (162) hide show
  1. package/README.md +18 -3
  2. package/lib/generation/AutoMovieHumanDigitJoints.d.ts +8 -26
  3. package/lib/generation/AutoMovieHumanDigitJoints.js +9 -37
  4. package/lib/generation/AutoMovieHumanDigitJoints.js.map +1 -1
  5. package/lib/generation/conic/AutoMovieHumanConicLoft.d.ts +154 -0
  6. package/lib/generation/conic/AutoMovieHumanConicLoft.js +430 -0
  7. package/lib/generation/conic/AutoMovieHumanConicLoft.js.map +1 -0
  8. package/lib/generation/conic/AutoMovieHumanConicPose.d.ts +92 -0
  9. package/lib/generation/conic/AutoMovieHumanConicPose.js +202 -0
  10. package/lib/generation/conic/AutoMovieHumanConicPose.js.map +1 -0
  11. package/lib/generation/conic/AutoMovieHumanConicRelief.d.ts +52 -0
  12. package/lib/generation/conic/AutoMovieHumanConicRelief.js +88 -0
  13. package/lib/generation/conic/AutoMovieHumanConicRelief.js.map +1 -0
  14. package/lib/generation/conic/AutoMovieHumanConicSection.d.ts +252 -0
  15. package/lib/generation/conic/AutoMovieHumanConicSection.js +567 -0
  16. package/lib/generation/conic/AutoMovieHumanConicSection.js.map +1 -0
  17. package/lib/generation/f1/AutoMovieHumanF1.d.ts +265 -0
  18. package/lib/generation/f1/AutoMovieHumanF1.js +1254 -0
  19. package/lib/generation/f1/AutoMovieHumanF1.js.map +1 -0
  20. package/lib/generation/f1/AutoMovieHumanF1Antihelix.d.ts +23 -0
  21. package/lib/generation/f1/AutoMovieHumanF1Antihelix.js +65 -0
  22. package/lib/generation/f1/AutoMovieHumanF1Antihelix.js.map +1 -0
  23. package/lib/generation/f1/AutoMovieHumanF1Arm.d.ts +18 -0
  24. package/lib/generation/f1/AutoMovieHumanF1Arm.js +82 -0
  25. package/lib/generation/f1/AutoMovieHumanF1Arm.js.map +1 -0
  26. package/lib/generation/f1/AutoMovieHumanF1Axilla.d.ts +18 -0
  27. package/lib/generation/f1/AutoMovieHumanF1Axilla.js +91 -0
  28. package/lib/generation/f1/AutoMovieHumanF1Axilla.js.map +1 -0
  29. package/lib/generation/f1/AutoMovieHumanF1Breast.d.ts +18 -0
  30. package/lib/generation/f1/AutoMovieHumanF1Breast.js +75 -0
  31. package/lib/generation/f1/AutoMovieHumanF1Breast.js.map +1 -0
  32. package/lib/generation/f1/AutoMovieHumanF1Concha.d.ts +40 -0
  33. package/lib/generation/f1/AutoMovieHumanF1Concha.js +81 -0
  34. package/lib/generation/f1/AutoMovieHumanF1Concha.js.map +1 -0
  35. package/lib/generation/f1/AutoMovieHumanF1FingerIndex.d.ts +18 -0
  36. package/lib/generation/f1/AutoMovieHumanF1FingerIndex.js +59 -0
  37. package/lib/generation/f1/AutoMovieHumanF1FingerIndex.js.map +1 -0
  38. package/lib/generation/f1/AutoMovieHumanF1FingerMiddle.d.ts +18 -0
  39. package/lib/generation/f1/AutoMovieHumanF1FingerMiddle.js +59 -0
  40. package/lib/generation/f1/AutoMovieHumanF1FingerMiddle.js.map +1 -0
  41. package/lib/generation/f1/AutoMovieHumanF1FingerPinky.d.ts +18 -0
  42. package/lib/generation/f1/AutoMovieHumanF1FingerPinky.js +75 -0
  43. package/lib/generation/f1/AutoMovieHumanF1FingerPinky.js.map +1 -0
  44. package/lib/generation/f1/AutoMovieHumanF1FingerRing.d.ts +18 -0
  45. package/lib/generation/f1/AutoMovieHumanF1FingerRing.js +75 -0
  46. package/lib/generation/f1/AutoMovieHumanF1FingerRing.js.map +1 -0
  47. package/lib/generation/f1/AutoMovieHumanF1FingerThumb.d.ts +18 -0
  48. package/lib/generation/f1/AutoMovieHumanF1FingerThumb.js +59 -0
  49. package/lib/generation/f1/AutoMovieHumanF1FingerThumb.js.map +1 -0
  50. package/lib/generation/f1/AutoMovieHumanF1Frames.d.ts +97 -0
  51. package/lib/generation/f1/AutoMovieHumanF1Frames.js +160 -0
  52. package/lib/generation/f1/AutoMovieHumanF1Frames.js.map +1 -0
  53. package/lib/generation/f1/AutoMovieHumanF1Hand.d.ts +18 -0
  54. package/lib/generation/f1/AutoMovieHumanF1Hand.js +81 -0
  55. package/lib/generation/f1/AutoMovieHumanF1Hand.js.map +1 -0
  56. package/lib/generation/f1/AutoMovieHumanF1Helix.d.ts +20 -0
  57. package/lib/generation/f1/AutoMovieHumanF1Helix.js +64 -0
  58. package/lib/generation/f1/AutoMovieHumanF1Helix.js.map +1 -0
  59. package/lib/generation/f1/AutoMovieHumanF1Joints.d.ts +231 -0
  60. package/lib/generation/f1/AutoMovieHumanF1Joints.js +249 -0
  61. package/lib/generation/f1/AutoMovieHumanF1Joints.js.map +1 -0
  62. package/lib/generation/f1/AutoMovieHumanF1Landmarks.d.ts +86 -0
  63. package/lib/generation/f1/AutoMovieHumanF1Landmarks.js +89 -0
  64. package/lib/generation/f1/AutoMovieHumanF1Landmarks.js.map +1 -0
  65. package/lib/generation/f1/AutoMovieHumanF1Leg.d.ts +18 -0
  66. package/lib/generation/f1/AutoMovieHumanF1Leg.js +82 -0
  67. package/lib/generation/f1/AutoMovieHumanF1Leg.js.map +1 -0
  68. package/lib/generation/f1/AutoMovieHumanF1Nose.d.ts +18 -0
  69. package/lib/generation/f1/AutoMovieHumanF1Nose.js +82 -0
  70. package/lib/generation/f1/AutoMovieHumanF1Nose.js.map +1 -0
  71. package/lib/generation/f1/AutoMovieHumanF1Nostril.d.ts +18 -0
  72. package/lib/generation/f1/AutoMovieHumanF1Nostril.js +59 -0
  73. package/lib/generation/f1/AutoMovieHumanF1Nostril.js.map +1 -0
  74. package/lib/generation/f1/AutoMovieHumanF1Placement.d.ts +75 -0
  75. package/lib/generation/f1/AutoMovieHumanF1Placement.js +151 -0
  76. package/lib/generation/f1/AutoMovieHumanF1Placement.js.map +1 -0
  77. package/lib/generation/f1/AutoMovieHumanF1Placing.d.ts +45 -0
  78. package/lib/generation/f1/AutoMovieHumanF1Placing.js +301 -0
  79. package/lib/generation/f1/AutoMovieHumanF1Placing.js.map +1 -0
  80. package/lib/generation/f1/AutoMovieHumanF1Plate.d.ts +18 -0
  81. package/lib/generation/f1/AutoMovieHumanF1Plate.js +59 -0
  82. package/lib/generation/f1/AutoMovieHumanF1Plate.js.map +1 -0
  83. package/lib/generation/f1/AutoMovieHumanF1ToeBig.d.ts +18 -0
  84. package/lib/generation/f1/AutoMovieHumanF1ToeBig.js +59 -0
  85. package/lib/generation/f1/AutoMovieHumanF1ToeBig.js.map +1 -0
  86. package/lib/generation/f1/AutoMovieHumanF1ToeIndex.d.ts +18 -0
  87. package/lib/generation/f1/AutoMovieHumanF1ToeIndex.js +59 -0
  88. package/lib/generation/f1/AutoMovieHumanF1ToeIndex.js.map +1 -0
  89. package/lib/generation/f1/AutoMovieHumanF1ToeLittle.d.ts +18 -0
  90. package/lib/generation/f1/AutoMovieHumanF1ToeLittle.js +75 -0
  91. package/lib/generation/f1/AutoMovieHumanF1ToeLittle.js.map +1 -0
  92. package/lib/generation/f1/AutoMovieHumanF1ToeMiddle.d.ts +18 -0
  93. package/lib/generation/f1/AutoMovieHumanF1ToeMiddle.js +75 -0
  94. package/lib/generation/f1/AutoMovieHumanF1ToeMiddle.js.map +1 -0
  95. package/lib/generation/f1/AutoMovieHumanF1ToeRing.d.ts +18 -0
  96. package/lib/generation/f1/AutoMovieHumanF1ToeRing.js +75 -0
  97. package/lib/generation/f1/AutoMovieHumanF1ToeRing.js.map +1 -0
  98. package/lib/generation/f1/AutoMovieHumanF1Trunk.d.ts +18 -0
  99. package/lib/generation/f1/AutoMovieHumanF1Trunk.js +79 -0
  100. package/lib/generation/f1/AutoMovieHumanF1Trunk.js.map +1 -0
  101. package/lib/generation/f1/AutoMovieHumanF1Vault.d.ts +18 -0
  102. package/lib/generation/f1/AutoMovieHumanF1Vault.js +75 -0
  103. package/lib/generation/f1/AutoMovieHumanF1Vault.js.map +1 -0
  104. package/lib/generation/frame/AutoMovieHumanSegmentFrame.d.ts +149 -0
  105. package/lib/generation/frame/AutoMovieHumanSegmentFrame.js +290 -0
  106. package/lib/generation/frame/AutoMovieHumanSegmentFrame.js.map +1 -0
  107. package/lib/index.d.ts +11 -0
  108. package/lib/index.js +11 -0
  109. package/lib/index.js.map +1 -1
  110. package/lib/skeleton/AutoMovieHumanCanonicalBody.d.ts +7 -3
  111. package/lib/skeleton/AutoMovieHumanCanonicalBody.js +31 -3
  112. package/lib/skeleton/AutoMovieHumanCanonicalBody.js.map +1 -1
  113. package/lib/skeleton/AutoMovieHumanCanonicalProfile.d.ts +22 -31
  114. package/lib/skeleton/AutoMovieHumanCanonicalProfile.js +112 -172
  115. package/lib/skeleton/AutoMovieHumanCanonicalProfile.js.map +1 -1
  116. package/lib/skeleton/AutoMovieHumanCanonicalSolids.d.ts +65 -0
  117. package/lib/skeleton/AutoMovieHumanCanonicalSolids.js +105 -0
  118. package/lib/skeleton/AutoMovieHumanCanonicalSolids.js.map +1 -0
  119. package/lib/skeleton/index.d.ts +1 -0
  120. package/lib/skeleton/index.js +1 -0
  121. package/lib/skeleton/index.js.map +1 -1
  122. package/package.json +21 -13
  123. package/src/generation/AutoMovieHumanDigitJoints.ts +12 -47
  124. package/src/generation/conic/AutoMovieHumanConicLoft.ts +566 -0
  125. package/src/generation/conic/AutoMovieHumanConicPose.ts +213 -0
  126. package/src/generation/conic/AutoMovieHumanConicRelief.ts +94 -0
  127. package/src/generation/conic/AutoMovieHumanConicSection.ts +609 -0
  128. package/src/generation/f1/AutoMovieHumanF1.ts +1448 -0
  129. package/src/generation/f1/AutoMovieHumanF1Antihelix.ts +64 -0
  130. package/src/generation/f1/AutoMovieHumanF1Arm.ts +82 -0
  131. package/src/generation/f1/AutoMovieHumanF1Axilla.ts +90 -0
  132. package/src/generation/f1/AutoMovieHumanF1Breast.ts +74 -0
  133. package/src/generation/f1/AutoMovieHumanF1Concha.ts +80 -0
  134. package/src/generation/f1/AutoMovieHumanF1FingerIndex.ts +58 -0
  135. package/src/generation/f1/AutoMovieHumanF1FingerMiddle.ts +58 -0
  136. package/src/generation/f1/AutoMovieHumanF1FingerPinky.ts +74 -0
  137. package/src/generation/f1/AutoMovieHumanF1FingerRing.ts +74 -0
  138. package/src/generation/f1/AutoMovieHumanF1FingerThumb.ts +58 -0
  139. package/src/generation/f1/AutoMovieHumanF1Frames.ts +191 -0
  140. package/src/generation/f1/AutoMovieHumanF1Hand.ts +81 -0
  141. package/src/generation/f1/AutoMovieHumanF1Helix.ts +63 -0
  142. package/src/generation/f1/AutoMovieHumanF1Joints.ts +319 -0
  143. package/src/generation/f1/AutoMovieHumanF1Landmarks.ts +101 -0
  144. package/src/generation/f1/AutoMovieHumanF1Leg.ts +82 -0
  145. package/src/generation/f1/AutoMovieHumanF1Nose.ts +82 -0
  146. package/src/generation/f1/AutoMovieHumanF1Nostril.ts +58 -0
  147. package/src/generation/f1/AutoMovieHumanF1Placement.ts +148 -0
  148. package/src/generation/f1/AutoMovieHumanF1Placing.ts +313 -0
  149. package/src/generation/f1/AutoMovieHumanF1Plate.ts +59 -0
  150. package/src/generation/f1/AutoMovieHumanF1ToeBig.ts +58 -0
  151. package/src/generation/f1/AutoMovieHumanF1ToeIndex.ts +58 -0
  152. package/src/generation/f1/AutoMovieHumanF1ToeLittle.ts +74 -0
  153. package/src/generation/f1/AutoMovieHumanF1ToeMiddle.ts +74 -0
  154. package/src/generation/f1/AutoMovieHumanF1ToeRing.ts +74 -0
  155. package/src/generation/f1/AutoMovieHumanF1Trunk.ts +79 -0
  156. package/src/generation/f1/AutoMovieHumanF1Vault.ts +74 -0
  157. package/src/generation/frame/AutoMovieHumanSegmentFrame.ts +309 -0
  158. package/src/index.ts +11 -0
  159. package/src/skeleton/AutoMovieHumanCanonicalBody.ts +53 -3
  160. package/src/skeleton/AutoMovieHumanCanonicalProfile.ts +153 -358
  161. package/src/skeleton/AutoMovieHumanCanonicalSolids.ts +175 -0
  162. package/src/skeleton/index.ts +1 -0
@@ -45,13 +45,17 @@ var AutoMovieHumanCanonicalBody;
45
45
  * The joints then move onto the canonical rig: reflected from Human's
46
46
  * registered frame, each arm straightened along ±X by shortest arcs about
47
47
  * the shoulder, the elbow and the wrist and pronated until the palm faces
48
- * -Y, each thigh and shank straightened along -Y with the foot keeping its
48
+ * -Y, each finger straightened in the palm's plane along its own knuckle
49
+ * line and the thumb's two hinges along its metacarpal (the bind holds a
50
+ * relaxed hand, and a finger angle of zero is the extended finger, as in
51
+ * the VRM T-pose and the Neutral-0 position), each thigh and shank straightened along -Y with the foot keeping its
49
52
  * bind orientation, and the whole body raised or lowered so its lowest foot
50
53
  * joint sphere touches the floor. Every humanoid-named joint becomes a rig
51
54
  * bone with an identity rest rotation, the toes bone at the hallux's
52
55
  * metatarsophalangeal joint, and every other joint rides its nearest
53
56
  * humanoid ancestor. The contact profile is built from the same joints and
54
- * radii (`AutoMovieHumanCanonicalProfile`), so contacts meet what is drawn.
57
+ * radii (`AutoMovieHumanCanonicalProfile`), its colliders the convex hulls
58
+ * of the drawn ring points, so contacts meet what is drawn.
55
59
  *
56
60
  * @param params The Human's parameters.
57
61
  * @param options Body mass in kilograms and the skeleton id.
@@ -139,7 +143,7 @@ var AutoMovieHumanCanonicalBody;
139
143
  * `(x, y, z) -> (z, y, x)`. The drawing's parent must carry that same
140
144
  * reflection (`REFLECTION`, a column-major 4x4) so the figure shows in the
141
145
  * canonical world; a reflected world matrix keeps faces outward because
142
- * three.js and the CPU rasterizer reverse winding for it.
146
+ * three.js reverses winding for it.
143
147
  *
144
148
  * @param body The canonical body.
145
149
  * @param pose A canonical pose; omitted, the T-pose rest.
@@ -214,6 +218,15 @@ function canonical(bind, options) {
214
218
  const pivot = position.get(`${side}${from}`);
215
219
  turn(descendants(`${side}${from}`), (0, engine_1.rotationBetween)(engine_1.Vector3.subtract(position.get(`${side}${to}`), pivot), direction), pivot);
216
220
  };
221
+ const straighten = (chain, direction) => {
222
+ chain.forEach((bone, i) => {
223
+ const pivot = position.get(bone);
224
+ const end = i + 1 < chain.length ? position.get(chain[i + 1]) : tip.get(bone);
225
+ if (end === null)
226
+ return;
227
+ turn(descendants(bone), (0, engine_1.rotationBetween)(engine_1.Vector3.subtract(end, pivot), direction), pivot);
228
+ });
229
+ };
217
230
  const down = engine_1.Vector3.create(0, -1, 0);
218
231
  for (const [side, sign] of [
219
232
  ["left", 1],
@@ -233,6 +246,19 @@ function canonical(bind, options) {
233
246
  180) /
234
247
  Math.PI;
235
248
  turn(descendants(`${side}LowerArm`), engine_1.Quaternion.fromAxisAngle(lateral, angle), position.get(`${side}LowerArm`));
249
+ // Straight digits: the bind holds a relaxed hand, and a clinical zero is
250
+ // the extended one (Neutral-0), so each finger lies in the palm's plane
251
+ // along its own knuckle line and the thumb's two hinges continue its
252
+ // metacarpal.
253
+ for (const finger of ["Index", "Middle", "Ring", "Little"]) {
254
+ const line = engine_1.Vector3.subtract(position.get(`${side}${finger}Intermediate`), position.get(`${side}${finger}Proximal`));
255
+ straighten([
256
+ `${side}${finger}Proximal`,
257
+ `${side}${finger}Intermediate`,
258
+ `${side}${finger}Distal`,
259
+ ], engine_1.Vector3.normalize(engine_1.Vector3.create(line.x, 0, line.z)));
260
+ }
261
+ straighten([`${side}ThumbProximal`, `${side}ThumbDistal`], engine_1.Vector3.normalize(engine_1.Vector3.subtract(position.get(`${side}ThumbProximal`), position.get(`${side}ThumbMetacarpal`))));
236
262
  // Straight legs; each foot turns back to its bind orientation.
237
263
  align(side, "UpperLeg", "LowerLeg", down);
238
264
  align(side, "LowerLeg", "Foot", down);
@@ -291,6 +317,8 @@ function canonical(bind, options) {
291
317
  profile: AutoMovieHumanCanonicalProfile_1.AutoMovieHumanCanonicalProfile.build(new Map(bind.map((bone) => [
292
318
  bone.bone,
293
319
  {
320
+ parent: bone.parent,
321
+ carrier: carrier.get(bone.bone),
294
322
  position: position.get(bone.bone),
295
323
  tip: tip.get(bone.bone),
296
324
  radius: bone.radius,
@@ -1 +1 @@
1
- {"version":3,"file":"AutoMovieHumanCanonicalBody.js","sourceRoot":"","sources":["../../src/ske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AM;QACN,UAAU;QACV,UAAU;QACV,MAAM;QACN,MAAM;QACN,iBAAiB;QACjB,eAAe;QACf,aAAa;QACb,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,CAAS,EAAY,EAAE,CACvE,CAAC,UAAU,EAAE,cAAc,EAAE,QAAQ,CAAC,CAAC,GAAG,CACxC,CAAC,CAAS,EAAU,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAClC,CACF;KACF,CAAC,GAAG,CAAC,CAAC,CAAS,EAAU,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CACzC;CACF,CAAC,CAAC;AAEH,4DAA4D;AAC5D,SAAS,OAAO,CAAC,IAAY;IAC3B,MAAM,CAAC,GAA2B,6BAA6B,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC3E,OAAO,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAE,CAAC;AACnC,CAAC;AAED,2BAA2B;AAC3B,SAAS,MAAM,CAAC,CAAoB;IAClC,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAE,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAE,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAE,EAAE,CAAC;AAC1C,CAAC"}
@@ -1,23 +1,21 @@
1
- import type { IAutoMovieVector3, IAutoMoviePhysicalProfile as P } from "@automovie/interface";
1
+ import type { IAutoMoviePhysicalProfile as P } from "@automovie/interface";
2
+ import { AutoMovieHumanCanonicalSolids as Solids } from "./AutoMovieHumanCanonicalSolids";
2
3
  /**
3
4
  * The contact and mass profile of a polygon man, built from the same joints
4
5
  * and girth radii its drawing is built from, at the canonical T-pose rest.
5
6
  *
6
- * Colliders follow the drawn primitives: each limb segment and each phalanx
7
- * is a capsule of its girth radius whose axis runs from its joint to its child
8
- * joint, so its caps are the drawn joint balls and every joint lies inside its
9
- * own segment's collider, while a capsule to a surface tip (a distal phalanx
10
- * to its fingertip, the head to its crown) ends with its cap on the tip, so
11
- * the stature and the fingertips are where they are drawn; the pelvis, abdomen
12
- * and thorax are boxes between their joints whose half breadths and half
13
- * depths are the drawing's elliptical sections scaled by `sqrt(pi / 4)` (a box
14
- * of the ellipse's area); the neck is a capsule to the head joint and the head
15
- * a capsule from the head joint to the crown; the palm is a box from the wrist
16
- * to the finger roots' balls, as broad as the finger roots; the rear foot is
17
- * the box of the ankle, subtalar and midfoot joints' spheres and the toe
18
- * roots' (the ball), standing on the floor, and the toes the box of the toe
19
- * joints' spheres to their tips, riding the toes bone so they bend at the
20
- * ball as the drawn toes do.
7
+ * Colliders are the drawn solids. The trunk, the neck, the head, each limb
8
+ * segment, the palm, the rear foot and every toe phalanx collide as the
9
+ * convex hulls of the very ring points the drawing lofts its mesh through
10
+ * (`AutoMovieHumanCanonicalSolids`), so the collision surface is the drawn
11
+ * surface: no corner stands outside what is seen and no drawn surface lies
12
+ * outside its collider. A rig bone carries the hulls of every drawn module
13
+ * that rides it: the foot its two modules through the subtalar and midfoot
14
+ * joints, the toes bone every toe phalanx, so the toes bend at the ball as
15
+ * drawn. Each phalanx of the hand is a capsule of its girth radius from its
16
+ * joint to its child joint, a distal one ending with its cap on the
17
+ * fingertip, because a curl solves its contact in closed form on capsules
18
+ * and the drawn phalanx is that round.
21
19
  *
22
20
  * Masses are Dempster's shares of body mass as tabulated by Winter
23
21
  * (Biomechanics and Motor Control of Human Movement, 4th ed., table 4.1):
@@ -25,30 +23,23 @@ import type { IAutoMovieVector3, IAutoMoviePhysicalProfile as P } from "@automov
25
23
  * 0.0145, thorax 0.216, abdomen 0.139, pelvis 0.142 and head with neck 0.081,
26
24
  * the head taking de Leva's (1996) 0.0694 and the neck the rest; the hand's
27
25
  * share is split over the palm and the phalanges by collider volume, a
28
- * uniform density within the hand, and the foot's over the rear foot and
29
- * the toes by box volume. Each
30
- * segment's centre of mass is its collider's centre and its inertia the
31
- * collider's as a uniform solid, the way physics engines derive inertia from
32
- * shapes. Joints sit at each child joint with identity frames; every clinical
33
- * axis of `DEFAULT_HUMANOID_ROM` becomes a physical axis along its
26
+ * uniform density within the hand, and the foot's over the rear foot and the
27
+ * toes the same way. Each segment's centre of mass and inertia are those of
28
+ * its colliders as uniform solids, combined by the parallel-axis theorem,
29
+ * the way physics engines derive inertia from shapes. Joints sit at each
30
+ * child joint with identity frames; every clinical axis of
31
+ * `DEFAULT_HUMANOID_ROM` becomes a physical axis along its
34
32
  * `HUMANOID_JOINT_AXES` direction with limits read through
35
33
  * `HUMANOID_REST_FRAME`, so the physical zero is the T-pose. Drive gains are
36
34
  * placeholders kinematic motion never reads: 50 N m per downstream kilogram.
37
35
  */
38
36
  export declare namespace AutoMovieHumanCanonicalProfile {
39
37
  /** One drawn joint: its canonical rest position, its girth radius and its carrier. */
40
- interface IJoint {
41
- /** Rest joint centre, canonical metres. */
42
- position: IAutoMovieVector3;
43
- /** Rest tip of a leaf segment, canonical metres. */
44
- tip: IAutoMovieVector3 | null;
45
- /** Girth radius, metres. */
46
- radius: number;
47
- }
38
+ type IJoint = Solids.IJoint;
48
39
  /**
49
40
  * Build the profile.
50
41
  *
51
- * @param joints Every drawn Human joint by id.
42
+ * @param joints Every drawn Human joint by id, parent before child.
52
43
  * @param mass Body mass, kilograms.
53
44
  * @param id Profile id.
54
45
  * @returns The profile on the rig's bones.
@@ -2,25 +2,23 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AutoMovieHumanCanonicalProfile = void 0;
4
4
  const engine_1 = require("@automovie/engine");
5
+ const AutoMovieHumanCanonicalSolids_1 = require("./AutoMovieHumanCanonicalSolids");
5
6
  /**
6
7
  * The contact and mass profile of a polygon man, built from the same joints
7
8
  * and girth radii its drawing is built from, at the canonical T-pose rest.
8
9
  *
9
- * Colliders follow the drawn primitives: each limb segment and each phalanx
10
- * is a capsule of its girth radius whose axis runs from its joint to its child
11
- * joint, so its caps are the drawn joint balls and every joint lies inside its
12
- * own segment's collider, while a capsule to a surface tip (a distal phalanx
13
- * to its fingertip, the head to its crown) ends with its cap on the tip, so
14
- * the stature and the fingertips are where they are drawn; the pelvis, abdomen
15
- * and thorax are boxes between their joints whose half breadths and half
16
- * depths are the drawing's elliptical sections scaled by `sqrt(pi / 4)` (a box
17
- * of the ellipse's area); the neck is a capsule to the head joint and the head
18
- * a capsule from the head joint to the crown; the palm is a box from the wrist
19
- * to the finger roots' balls, as broad as the finger roots; the rear foot is
20
- * the box of the ankle, subtalar and midfoot joints' spheres and the toe
21
- * roots' (the ball), standing on the floor, and the toes the box of the toe
22
- * joints' spheres to their tips, riding the toes bone so they bend at the
23
- * ball as the drawn toes do.
10
+ * Colliders are the drawn solids. The trunk, the neck, the head, each limb
11
+ * segment, the palm, the rear foot and every toe phalanx collide as the
12
+ * convex hulls of the very ring points the drawing lofts its mesh through
13
+ * (`AutoMovieHumanCanonicalSolids`), so the collision surface is the drawn
14
+ * surface: no corner stands outside what is seen and no drawn surface lies
15
+ * outside its collider. A rig bone carries the hulls of every drawn module
16
+ * that rides it: the foot its two modules through the subtalar and midfoot
17
+ * joints, the toes bone every toe phalanx, so the toes bend at the ball as
18
+ * drawn. Each phalanx of the hand is a capsule of its girth radius from its
19
+ * joint to its child joint, a distal one ending with its cap on the
20
+ * fingertip, because a curl solves its contact in closed form on capsules
21
+ * and the drawn phalanx is that round.
24
22
  *
25
23
  * Masses are Dempster's shares of body mass as tabulated by Winter
26
24
  * (Biomechanics and Motor Control of Human Movement, 4th ed., table 4.1):
@@ -28,12 +26,12 @@ const engine_1 = require("@automovie/engine");
28
26
  * 0.0145, thorax 0.216, abdomen 0.139, pelvis 0.142 and head with neck 0.081,
29
27
  * the head taking de Leva's (1996) 0.0694 and the neck the rest; the hand's
30
28
  * share is split over the palm and the phalanges by collider volume, a
31
- * uniform density within the hand, and the foot's over the rear foot and
32
- * the toes by box volume. Each
33
- * segment's centre of mass is its collider's centre and its inertia the
34
- * collider's as a uniform solid, the way physics engines derive inertia from
35
- * shapes. Joints sit at each child joint with identity frames; every clinical
36
- * axis of `DEFAULT_HUMANOID_ROM` becomes a physical axis along its
29
+ * uniform density within the hand, and the foot's over the rear foot and the
30
+ * toes the same way. Each segment's centre of mass and inertia are those of
31
+ * its colliders as uniform solids, combined by the parallel-axis theorem,
32
+ * the way physics engines derive inertia from shapes. Joints sit at each
33
+ * child joint with identity frames; every clinical axis of
34
+ * `DEFAULT_HUMANOID_ROM` becomes a physical axis along its
37
35
  * `HUMANOID_JOINT_AXES` direction with limits read through
38
36
  * `HUMANOID_REST_FRAME`, so the physical zero is the T-pose. Drive gains are
39
37
  * placeholders kinematic motion never reads: 50 N m per downstream kilogram.
@@ -43,7 +41,7 @@ var AutoMovieHumanCanonicalProfile;
43
41
  /**
44
42
  * Build the profile.
45
43
  *
46
- * @param joints Every drawn Human joint by id.
44
+ * @param joints Every drawn Human joint by id, parent before child.
47
45
  * @param mass Body mass, kilograms.
48
46
  * @param id Profile id.
49
47
  * @returns The profile on the rig's bones.
@@ -55,39 +53,33 @@ var AutoMovieHumanCanonicalProfile;
55
53
  throw new Error(`The polygon profile needs the joint ${name}`);
56
54
  return found;
57
55
  };
58
- const k = Math.sqrt(Math.PI / 4);
59
56
  const identity = engine_1.Quaternion.identity();
60
- const segments = [];
61
- const add = (bone, share, shape, inertia, origin = j(bone).position) => {
62
- const m = share * mass;
63
- segments.push({
64
- bone,
65
- neutral: { position: origin, rotation: identity },
66
- mass: m,
67
- centerOfMass: shape.transform.position,
68
- inertia: engine_1.Vector3.scale(inertia, m),
69
- inertiaRotation: shape.transform.rotation,
70
- shapes: [shape],
71
- });
72
- };
73
- const box = (bone, share, min, max, origin = j(bone).position) => {
74
- const half = engine_1.Vector3.scale(engine_1.Vector3.subtract(max, min), 0.5);
75
- const centre = engine_1.Vector3.subtract(engine_1.Vector3.scale(engine_1.Vector3.add(min, max), 0.5), origin);
76
- add(bone, share, {
77
- id: "body",
78
- material: "skin",
79
- transform: { position: centre, rotation: identity },
80
- kind: "box",
81
- halfExtents: half,
82
- }, {
83
- x: (half.y ** 2 + half.z ** 2) / 3,
84
- y: (half.x ** 2 + half.z ** 2) / 3,
85
- z: (half.x ** 2 + half.y ** 2) / 3,
86
- }, origin);
57
+ const at = (name) => j(name).position;
58
+ // A rig bone's origin is its joint; the toes bone sits at the hallux's root.
59
+ const origin = (bone) => at(bone.replace(/Toes$/u, "HalluxProximal"));
60
+ const parts = new Map();
61
+ const put = (bone, part) => {
62
+ parts.set(bone, [...(parts.get(bone) ?? []), part]);
87
63
  };
88
- // A capsule between two joints ends in the joints' balls; one to a surface
89
- // tip (the crown, a fingertip) ends with its cap on the tip.
90
- const capsule = (bone, share, from, end, radius, tip = false) => {
64
+ for (const solid of AutoMovieHumanCanonicalSolids_1.AutoMovieHumanCanonicalSolids.build(joints))
65
+ put(solid.carrier, {
66
+ shape: {
67
+ id: solid.id,
68
+ material: "skin",
69
+ transform: {
70
+ position: engine_1.Vector3.subtract(solid.centre, origin(solid.carrier)),
71
+ rotation: identity,
72
+ },
73
+ kind: "hull",
74
+ points: solid.points,
75
+ },
76
+ volume: solid.volume,
77
+ inertia: solid.inertia,
78
+ inertiaRotation: solid.inertiaRotation,
79
+ });
80
+ // A phalanx between two joints ends in the joints' balls; a distal one
81
+ // ends with its cap on the fingertip.
82
+ const capsule = (bone, from, end, radius, tip) => {
91
83
  const span = engine_1.Vector3.length(engine_1.Vector3.subtract(end, from));
92
84
  const inward = tip ? Math.min(radius, span) : 0;
93
85
  const to = span > 1e-9
@@ -96,146 +88,94 @@ var AutoMovieHumanCanonicalProfile;
96
88
  const axis = engine_1.Vector3.subtract(to, from);
97
89
  const length = engine_1.Vector3.length(axis);
98
90
  const rotation = length > 1e-9 ? (0, engine_1.rotationBetween)({ x: 0, y: 1, z: 0 }, axis) : identity;
99
- const centre = engine_1.Vector3.subtract(engine_1.Vector3.scale(engine_1.Vector3.add(from, to), 0.5), j(bone).position);
100
- const half = length / 2;
101
- const full = 2 * half + 2 * radius;
102
- const axial = (radius * radius) / 2;
91
+ const full = length + 2 * radius;
103
92
  const transverse = (3 * radius * radius + full * full) / 12;
104
- add(bone, share, {
105
- id: "body",
106
- material: "skin",
107
- transform: { position: centre, rotation },
108
- kind: "capsule",
109
- radius,
110
- halfLength: half,
111
- }, { x: transverse, y: axial, z: transverse });
93
+ put(bone, {
94
+ shape: {
95
+ id: "body",
96
+ material: "skin",
97
+ transform: {
98
+ position: engine_1.Vector3.subtract(engine_1.Vector3.scale(engine_1.Vector3.add(from, to), 0.5), origin(bone)),
99
+ rotation,
100
+ },
101
+ kind: "capsule",
102
+ radius,
103
+ halfLength: length / 2,
104
+ },
105
+ volume: Math.PI * radius * radius * length + (4 / 3) * Math.PI * radius ** 3,
106
+ inertia: { x: transverse, y: (radius * radius) / 2, z: transverse },
107
+ inertiaRotation: rotation,
108
+ });
112
109
  };
113
- const at = (name) => j(name).position;
114
- const span = (a, b) => Math.abs(at(a).x - at(b).x) / 2;
115
- // Trunk boxes from the drawing's sections (half breadth, half depth = girth radius).
116
- const hips = j("hips");
117
- const spine = j("spine");
118
- const chest = j("chest");
119
- const legRadius = Math.max(j("leftUpperLeg").radius, j("rightUpperLeg").radius);
120
- const armRadius = Math.max(j("leftUpperArm").radius, j("rightUpperArm").radius);
121
- const hipBreadth = Math.max(hips.radius, span("leftUpperLeg", "rightUpperLeg") + legRadius);
122
- const shoulderBreadth = Math.max(chest.radius, span("leftUpperArm", "rightUpperArm") + armRadius);
123
- const lumbar = Math.max(spine.radius, 0.75 * shoulderBreadth);
124
- const thorax = Math.max(chest.radius, 0.85 * shoulderBreadth);
125
- const trunk = (bone, share, bottom, top, breadth, depth, z) => box(bone, share, { x: -k * breadth, y: bottom, z: z - k * depth }, { x: k * breadth, y: top, z: z + k * depth });
126
- trunk("hips", 0.142, hips.position.y -
127
- Math.min(j("leftUpperLeg").radius, j("rightUpperLeg").radius), spine.position.y, hipBreadth, hips.radius, hips.position.z);
128
- trunk("spine", 0.139, spine.position.y, chest.position.y, (lumbar + thorax) / 2, (spine.radius + chest.radius) / 2, spine.position.z);
129
- trunk("chest", 0.216, chest.position.y, at("neck").y, (thorax + shoulderBreadth) / 2, chest.radius, chest.position.z);
130
- capsule("neck", 0.081 - 0.0694, at("neck"), at("head"), j("neck").radius);
131
- const crown = j("head").tip ??
132
- engine_1.Vector3.add(at("head"), { x: 0, y: 2 * j("head").radius, z: 0 });
133
- capsule("head", 0.0694, at("head"), crown, j("head").radius, j("head").tip !== null);
134
- for (const side of ["left", "right"]) {
135
- const b = (name) => `${side}${name}`;
136
- capsule(b("UpperArm"), 0.028, at(b("UpperArm")), at(b("LowerArm")), j(b("UpperArm")).radius);
137
- capsule(b("LowerArm"), 0.016, at(b("LowerArm")), at(b("Hand")), j(b("LowerArm")).radius);
138
- const knuckles = FINGERS.map((d) => j(b(`${d}Proximal`)));
139
- const across = Math.abs(at(b("IndexProximal")).z - at(b("LittleProximal")).z) / 2 +
140
- j(b("IndexProximal")).radius;
141
- const thick = k * j(b("Hand")).radius;
142
- const wrist = at(b("Hand"));
143
- const xs = [
144
- wrist.x,
145
- ...knuckles.flatMap((n) => [
146
- n.position.x - n.radius,
147
- n.position.x + n.radius,
148
- ]),
149
- ];
150
- const digits = DIGITS.flatMap((chain) => chain.map((name, i) => {
151
- const joint = j(b(name));
152
- const next = chain[i + 1];
153
- return {
154
- bone: b(name),
155
- from: joint.position,
156
- to: next === undefined ? (joint.tip ?? joint.position) : at(b(next)),
157
- tip: next === undefined && joint.tip !== null,
158
- radius: joint.radius,
159
- };
160
- }));
161
- // The hand's Dempster share split over its palm and phalanges by volume (uniform density).
162
- const palmHalf = {
163
- x: (Math.max(...xs) - Math.min(...xs)) / 2,
164
- y: thick,
165
- z: across,
166
- };
167
- const capsuleVolume = (r, length) => Math.PI * r * r * length + (4 / 3) * Math.PI * r ** 3;
168
- const volumes = digits.map((d) => capsuleVolume(d.radius, engine_1.Vector3.length(engine_1.Vector3.subtract(d.to, d.from))));
169
- const palmVolume = 8 * palmHalf.x * palmHalf.y * palmHalf.z;
170
- const handVolume = palmVolume + volumes.reduce((s, v) => s + v, 0);
171
- box(b("Hand"), (0.006 * palmVolume) / handVolume, { x: Math.min(...xs), y: wrist.y - thick, z: wrist.z - across }, { x: Math.max(...xs), y: wrist.y + thick, z: wrist.z + across });
172
- digits.forEach((d, i) => capsule(d.bone, (0.006 * volumes[i]) / handVolume, d.from, d.to, d.radius, d.tip));
173
- capsule(b("UpperLeg"), 0.1, at(b("UpperLeg")), at(b("LowerLeg")), j(b("UpperLeg")).radius);
174
- capsule(b("LowerLeg"), 0.0465, at(b("LowerLeg")), at(b("Foot")), j(b("LowerLeg")).radius);
175
- // The rear foot to the balls of the toes' roots, and the toes from their roots to their tips.
176
- const named = (pattern) => [...joints.entries()]
177
- .filter(([name]) => name.startsWith(side) && pattern.test(name))
178
- .map(([, joint]) => joint);
179
- const roots = named(/(HalluxProximal|Toe\dProximal)$/);
180
- const extent = (parts, floor, top, tips) => {
181
- const min = { x: Infinity, y: floor, z: Infinity };
182
- const max = { x: -Infinity, y: top, z: -Infinity };
183
- for (const joint of parts)
184
- for (const p of [
185
- joint.position,
186
- ...(tips && joint.tip !== null ? [joint.tip] : []),
187
- ]) {
188
- min.x = Math.min(min.x, p.x - joint.radius);
189
- min.z = Math.min(min.z, p.z - joint.radius);
190
- max.x = Math.max(max.x, p.x + joint.radius);
191
- max.z = Math.max(max.z, p.z + joint.radius);
192
- }
193
- return { min, max };
194
- };
195
- const toes = named(/(Hallux|Toe\d)/);
196
- const rear = extent([...named(/(Foot|Subtalar|Midfoot)$/), ...roots], 0, at(b("Foot")).y, false);
197
- const front = extent(toes, Math.min(...toes.map((t) => Math.min(t.position.y, t.tip?.y ?? Infinity) - t.radius)), Math.max(...toes.map((t) => t.position.y + t.radius)), true);
198
- const volume = (e) => (e.max.x - e.min.x) * (e.max.y - e.min.y) * (e.max.z - e.min.z);
199
- const share = volume(front) / (volume(front) + volume(rear));
200
- box(b("Foot"), 0.0145 * (1 - share), rear.min, rear.max);
201
- box(b("Toes"), 0.0145 * share, front.min, front.max, at(b("HalluxProximal")));
202
- }
203
110
  const parentOf = {
204
111
  spine: "hips",
205
112
  chest: "spine",
206
113
  neck: "chest",
207
114
  head: "neck",
208
- leftUpperArm: "chest",
209
- rightUpperArm: "chest",
210
- leftLowerArm: "leftUpperArm",
211
- rightLowerArm: "rightUpperArm",
212
- leftHand: "leftLowerArm",
213
- rightHand: "rightLowerArm",
214
- leftUpperLeg: "hips",
215
- rightUpperLeg: "hips",
216
- leftLowerLeg: "leftUpperLeg",
217
- rightLowerLeg: "rightUpperLeg",
218
- leftFoot: "leftLowerLeg",
219
- rightFoot: "rightLowerLeg",
220
- leftToes: "leftFoot",
221
- rightToes: "rightFoot",
222
115
  };
116
+ // Each group of rig bones shares one Dempster share by collider volume.
117
+ const groups = [
118
+ { share: 0.142, bones: ["hips"] },
119
+ { share: 0.139, bones: ["spine"] },
120
+ { share: 0.216, bones: ["chest"] },
121
+ { share: 0.081 - 0.0694, bones: ["neck"] },
122
+ { share: 0.0694, bones: ["head"] },
123
+ ];
223
124
  const hands = [];
224
125
  for (const side of ["left", "right"]) {
225
126
  const b = (name) => `${side}${name}`;
226
127
  const hand = [b("Hand")];
227
128
  for (const chain of DIGITS)
228
129
  chain.forEach((name, i) => {
130
+ const joint = j(b(name));
131
+ const next = chain[i + 1];
132
+ capsule(b(name), joint.position, next === undefined ? (joint.tip ?? joint.position) : at(b(next)), joint.radius, next === undefined && joint.tip !== null);
229
133
  parentOf[b(name)] = i === 0 ? b("Hand") : b(chain[i - 1]);
230
134
  hand.push(b(name));
231
135
  });
232
136
  hands.push(hand);
137
+ parentOf[b("UpperArm")] = "chest";
138
+ parentOf[b("LowerArm")] = b("UpperArm");
139
+ parentOf[b("Hand")] = b("LowerArm");
140
+ parentOf[b("UpperLeg")] = "hips";
141
+ parentOf[b("LowerLeg")] = b("UpperLeg");
142
+ parentOf[b("Foot")] = b("LowerLeg");
143
+ parentOf[b("Toes")] = b("Foot");
144
+ groups.push({ share: 0.028, bones: [b("UpperArm")] }, { share: 0.016, bones: [b("LowerArm")] }, { share: 0.006, bones: hand }, { share: 0.1, bones: [b("UpperLeg")] }, { share: 0.0465, bones: [b("LowerLeg")] }, { share: 0.0145, bones: [b("Foot"), b("Toes")] });
145
+ }
146
+ const segments = [];
147
+ for (const group of groups) {
148
+ const members = group.bones.map((bone) => {
149
+ const found = parts.get(bone);
150
+ if (found === undefined)
151
+ throw new Error(`The polygon profile has no collider on ${bone}`);
152
+ return found;
153
+ });
154
+ const density = (group.share * mass) /
155
+ members
156
+ .flat()
157
+ .reduce((sum, part) => sum + part.volume, 0);
158
+ group.bones.forEach((bone, index) => {
159
+ const whole = (0, engine_1.combinePhysicalMassProperties)(members[index].map((part) => ({
160
+ mass: density * part.volume,
161
+ centerOfMass: part.shape.transform.position,
162
+ inertia: engine_1.Vector3.scale(part.inertia, density * part.volume),
163
+ inertiaRotation: part.inertiaRotation,
164
+ })));
165
+ segments.push({
166
+ bone,
167
+ neutral: { position: origin(bone), rotation: identity },
168
+ mass: whole.mass,
169
+ centerOfMass: whole.centerOfMass,
170
+ inertia: whole.inertia,
171
+ inertiaRotation: whole.inertiaRotation,
172
+ shapes: members[index].map((part) => part.shape),
173
+ });
174
+ });
233
175
  }
234
176
  const children = (bone) => Object.keys(parentOf).filter((c) => parentOf[c] === bone);
235
177
  const downstream = (bone) => segments.find((s) => s.bone === bone).mass +
236
178
  children(bone).reduce((sum, c) => sum + downstream(c), 0);
237
- const origin = (bone) => segments.find((s) => s.bone === bone).neutral
238
- .position;
239
179
  const links = Object.keys(parentOf).map((child) => {
240
180
  const parent = parentOf[child];
241
181
  return {
@@ -281,7 +221,7 @@ var AutoMovieHumanCanonicalProfile;
281
221
  damping: 0,
282
222
  },
283
223
  ],
284
- provenance: "Polygon-man contact profile: drawn primitives, Dempster segment masses (Winter table 4.1), uniform-solid collider inertia.",
224
+ provenance: "Polygon-man contact profile: convex hulls of the drawn ring points with capsule phalanges, Dempster segment masses (Winter table 4.1), uniform-solid collider inertia.",
285
225
  };
286
226
  }
287
227
  AutoMovieHumanCanonicalProfile.build = build;