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:
co-authored by
Claude Opus 5
parent
27c4117c25
commit
c8b0337aa7
@@ -134,9 +134,13 @@ faces the other way, the two compose to a character running backwards — and
|
||||
nothing anywhere measures the finished result.
|
||||
|
||||
**Rule:** facing is measurable from the skeleton — the toes are forward of the
|
||||
ankles, and the nose/head is forward of the spine. Assert it on the OUTPUT, after
|
||||
every transform has been applied. A blanket constant like `facing_flip` is a
|
||||
guess about the source that must be replaced by a measurement.
|
||||
ankles. `flatten_and_scale()` now snaps that to Blender -Y, the convention the
|
||||
runtime flip is built around, so every character leaves the pipeline pointing the
|
||||
same way whatever the source did. Kiyoko was 180 degrees off and is now correct.
|
||||
|
||||
Snap to the nearest QUARTER TURN, not to the measured angle: a rest pose with the
|
||||
feet slightly splayed is not a character who is 7 degrees turned, and correcting
|
||||
it as one puts a permanent yaw on the whole skeleton.
|
||||
|
||||
---
|
||||
|
||||
@@ -174,9 +178,21 @@ against proportions like Taila's. A rig with different arm lengths, a different
|
||||
rest pose (A-pose vs T-pose) or a different bone roll will put the hands
|
||||
somewhere plausible for the maths and wrong for the eye.
|
||||
|
||||
**Rule:** the hold has measurable success criteria — the distance from each hand
|
||||
bone to the grip point it was solved onto. Assert those, per character, rather
|
||||
than judging by eye.
|
||||
**The real cause turned out to be #2's sibling, and it affected every model.**
|
||||
`set_weapon` mounted 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 a constant there mounts the weapon differently on every character.
|
||||
|
||||
It does not need to be right at all. The pose layer aims the gun by rotating the
|
||||
WRIST until the weapon's forward axis lies on the aim line, so handing it the
|
||||
IDENTITY means "the gun's forward is the hand bone's -Z" — true by construction
|
||||
on any rig — and the wrist absorbs whatever roll that bone happens to have. The
|
||||
grip is placed at the bone's origin, so the gun sits *in* the hand instead of at
|
||||
a fixed offset from a differently-oriented bone.
|
||||
|
||||
**Rule:** never express a mount as a constant in a bone's local frame. Either
|
||||
derive the frame from the skeleton, or hand the downstream solver an identity and
|
||||
let it do the work — it already knows where the gun must point.
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user