The Eyes Position rotation was added to the Aswid's own twist, which works on
the head bone's raw axes: bone X points out of the face and bone Z sideways,
so Rotation X rolled the eyes and the mirrored Rotation Z tipped one eye up
and the other down. The slider rotation is now conjugated by the face frame,
so X tips, Y turns toward the temple and Z raises the outer corner on both
eyes alike. The female rotation defaults go back to 0, since the old numbers
meant other axes.
One 'Eyes Position - <race>' section each for the Alfar, Aswid, Dvergar and
Sverm, with a female and a male set: forward, height, separation and size,
plus rotation X/Y/Z for the Alfar and Aswid. All are deltas on the computed
placement (0 and size 1 change nothing), read live, and left local by
ConfigSync because they only change how this client draws faces.
Playtest on female characters: every race's eyes still sat about an eye-height
above the painted ones. Female height shift goes from -6 to -14 mm. Alfar and
Dvergar centres move 4 mm forward out of the face, and the Aswid socket goes
from 0.5 to 0.75 of the borrowed size so it covers the painted eye.
The female body maps the painted eyes about 6 mm lower and a quarter closer
together than the male one (read from bodymale/bodyfem and the skin UVs), so
every race's male-tuned eyes sat on the female brow. PlayerFace moves them for
the Dvergar, Aswid, Sverm and Alfar.
Dvergar eyes shrink to an 18 mm radius. The Aswid's borrowed sockets are
halved before the config multiplier and the smoke is off by default.
Alfar eyes become slanted, wrapped black almonds with a wet sheen. They are
placed in fixed head-local units: the live lossyScale under the non-uniform
Alfar body drifted as the head turned, and the 0.5 s cosmetic pass made the
eyes trail the face.
The eye frame was read from the head bone's pose ON THE FRAME THE EYES
WERE BUILT, snapped to the nearest axis, then cached for the life of the
eyes. Catch the head a few degrees into a turn and the snap picks the
neighbouring axis, and the pair stays wrong until something rebuilds it.
Each race met this separately and each added the same guard - do not
build while attached, mid-attack or asleep - which caught the loud cases
and left the quiet one: a race change rebuilds while the rig is still
settling, which is none of those three. That is why resetting into a
race could break the placement while logging out and back in silently
fixed it. The logout was never a fix, only a rebuild at a calmer moment,
and no fourth guard condition would have closed it - the read itself had
to stop depending on when it happens.
sharedMesh.bindposes[headBone] is the rig as authored: no animation in
it, no timing, the same answer on frame one and frame ten thousand. A
rebuild is now deterministic and a bad moment cannot exist. Falls back to
the live read, warning once, on a rig that carries no bind pose.
Lives in one shared RigBindPose rather than in three copies. The three
eye implementations are separate files by design - they differ in what
they hang and how it is coloured - but this is the one piece of maths
where a divergence would be a bug in whichever copy got fixed second,
and it had already been fixed twice. The three now-dead private
SnapToAxis copies go with it.
Also updates the Aswid eye defaults to the values dialled in on screen:
forward 0.013, height 0.004, yaw 22.068.
Scale is inherited, so source.localScale could not come across either:
it is authored under a parent that puts the object at 0.02 lossy scale,
and re-parenting it under a head bone at ~95 drew the mesh some 4750x
too big - an eye the size of the character, centred near the face,
therefore mostly inside the skull with the corners reading as flat
rectangles. "Wrong place" and "blocky" were one scale error seen from
two angles. Carries lossyScale (the size the game actually draws it at
on a real skeleton) over the new parent's scale instead.
The remaining offset would not compute cleanly from either rig, so it
was dialled in on screen and written down as the new defaults rather
than guessed at again - size 1.1, forward 0.01, separation 0.007, yaw
24.664, roll -180 (the socket arrives upside down on a player's head
bone; that is the half turn that rights it).
The sliders that found those numbers could not have: they were bound at
+/-0.1 m and 0.1-5x, nowhere near far enough to pull the pair out of the
skull, so they read as doing nothing at all. Widened to +/-0.5 m and
0.01-50x.
Eye Rotation Y is now mirrored - the left eye takes the negative - so
the pair toes in or out together instead of both turning off the same
shoulder. X and Z stay shared on purpose: both eyes pitching up is a
face looking up, where mirroring pitch or roll would cross them.
Confirmed correct in game.
player.transform (previous commit) fixed the frame used for the
shift/rotation config offsets, but that code path is inert at every
offset's default of 0 - so it never touched the actual bug. The real
placement came from source.localPosition, copied straight off the
Skeleton creature's eye_l/eye_r and reinterpreted under the player's
own head bone. That only works if the two rigs agree on scale, and
they do not: the Skeleton's rig measured 0.02 lossy scale at the eye
bone against this player rig's ~95-100, with nothing tying one
prefab's authored scale to another's. Taken as-is it put the eyes
roughly 0.2 world units off the head bone - visibly floating above
the face, on every single build, matching the "never fixes, not even
after logout" report exactly.
Eyes are now placed from the player's own measured frame and three
fixed constants (BaseEyeForward/Height/Separation) - the pre-rewrite
sphere code's own numbers, already tuned and playtested on this exact
rig. Still borrows eye_l/eye_r for their mesh and material (the actual
point of the rewrite - real lit sockets instead of painted spheres),
just not their transform.
Confirmed against real numbers from in-game diagnostic logging rather
than guessed a third time; that logging has been removed.
Both files built their eye holder's forward/up axes from headBone.root
- the top of whatever hierarchy the head bone (from
VisEquipment.m_bodyModel's own bone array) happens to sit in. That
does not reliably resolve back to the player, so the measurement came
out wrong on every single build rather than on an occasional
bad-timing one - which is why resetting the race or logging out never
fixed it for Aswid, only starting a fresh build at the same wrong
reference every time.
DvergarVisuals.BuildEyes already reads player.transform directly and
does not have this problem - its own eye glitches are the ordinary
bad-pose-timing kind the attach/attack/sleep guard mostly covers,
which is why relogging (a fresh, differently-timed build) usually
fixes it. AswidVisuals and SvermVisuals now do the same.
Also gives SvermVisuals.ApplyEyes the same attach/attack/sleep guard
Aswid and Dvergar already had before building fresh, which it was
missing entirely.
Brings in the Sverm race, the War Vulture flying mount, and Skadi's
Crystal Golem (replacing the Hidden Hollow). Resolved conflicts:
AswidVisuals.cs took war-vulture's skeleton-eye-light rewrite with
main's attach/attack/sleep timing guard re-applied on top, and
RaceCompendium.cs kept main's rewritten race entries while folding in
war-vulture's Sverm/War Vulture pages and the new Claws paragraphs for
Aswid and Fenrir.
AswidVisuals/DvergarVisuals measure which way the head bone faces
exactly once, the first time BuildEyes runs for a given character, by
reading the bone's live pose at that instant and snapping it to the
nearest axis - then cache the result for as long as the eyes exist.
Taken while sitting, attached, mid-attack or asleep, the head can be
turned away from the body's own forward, and the snap picks whichever
axis is closest to that pose - landing the eyes behind the skull
instead of on the face, and staying wrong for the rest of the session.
ApplyEyes now defers the first build while the player is attached,
attached to a ship, mid-attack or asleep, since it runs again on every
subsequent UpdateColors anyway. Reduces the obvious bad-timing cases;
does not by itself rule out a mistimed read during ordinary idle
animation, which would need the measurement moved to the model's bind
pose (animation-independent) to close out completely.
Also shrinks the Aswid's eyes by 10% (EyeSize 0.062 -> 0.0558), per
request.
Confirmed improved by playtest.