fix(characters): rig-independent weapon mount, measured facing, revert Miku

WEAPON MOUNT, all models. set_weapon() seated the gun with a fixed
rotation_degrees = (0, 90, -90). A bone attachment is expressed in the
BONE's axes and no two rigs agree on those, so one constant mounted the
weapon differently on every character. It never needed to be right: the
pose layer aims the gun by rotating the wrist until the weapon's forward
lies on the aim line, so the identity means "forward is the hand bone's
-Z", which is true on any rig, and the wrist absorbs the roll. The grip
now sits at the bone origin, so the gun is in the hand rather than at an
offset from a differently-oriented bone. Verified by render on kiyoko:
rifle shouldered, both hands on it.

FACING. flatten_and_scale() now measures toes-versus-ankles and snaps the
character to face Blender -Y, the convention the runtime's blanket flip is
built around. Kiyoko was 180 degrees off. Snapped to the nearest quarter
turn so splayed feet in a rest pose are not read as a turned character.

MIKU. Re-imported without --grow-cloth. Her grown hair chains were the
cause of the stretching: cloth_bones.py clears a vertex's body weights and
re-assigns it to the fitted polyline, so a poor fit does not degrade to
"stiff", it degrades to "torn". She now has no hair simulation — stiff but
correct — until that tool blends against the weights it replaces instead
of destroying them.

ARIA'S SKIRT IS NOT SIMULATED. Worth recording plainly, because it looks
better than Taila's and the obvious conclusion is the wrong one: aria has
ZERO cloth chains. Her skirt never clips because it is rigidly skinned and
follows the legs it is weighted to. There is nothing to port to Taila
except switching her simulation off.

Co-Authored-By: Claude Opus 5 <[email protected]>
This commit is contained in:
Nicholas Butzke
2026-07-26 16:29:04 -04:00
co-authored by Claude Opus 5
parent 27c4117c25
commit c8b0337aa7
12 changed files with 609 additions and 2310 deletions
+5 -5
View File
@@ -15,16 +15,16 @@
"shin.L": "J_Bip_L_LowerLeg",
"thigh.R": "J_Bip_R_UpperLeg",
"thigh.L": "J_Bip_L_UpperLeg",
"shoulder.R": "J_Bip_R_Shoulder",
"shoulder.L": "J_Bip_L_Shoulder",
"shoulder.R": "J_Bip_R_Shoulder",
"forearm.R": "J_Bip_R_LowerArm",
"forearm.L": "J_Bip_L_LowerArm",
"upper_arm.R": "J_Bip_R_UpperArm",
"upper_arm.L": "J_Bip_L_UpperArm",
"upper_arm.R": "J_Bip_R_UpperArm",
"toe.L": "J_Bip_L_ToeBase",
"toe.R": "J_Bip_R_ToeBase",
"foot.R": "J_Bip_R_Foot",
"foot.L": "J_Bip_L_Foot",
"foot.R": "J_Bip_R_Foot",
"hand.L": "J_Bip_L_Hand",
"hand.R": "J_Bip_R_Hand"
},
@@ -550,7 +550,7 @@
],
[
-0.02312,
0.02503,
0.02504,
0.00687
]
],
@@ -1899,7 +1899,7 @@
0.0013
],
[
-0.01334,
-0.01333,
0.01982,
-0.00015
],