Commit Graph

4 Commits

Author SHA1 Message Date
ritenseki 3b4485506a Billboard: fix the stale camera reference, and gate the unverified facing behaviour off
Reported from a live run: a light keeps rotating, and the object visibly should not be
rotating. Two separate problems, only one of which is a bug.

The bug — BillboardController resolved its target camera once and cached it forever, while
Director.MainCameraTransform is reassigned every frame (_cameraTransforms[_activeCameraIndex])
and switches between three cameras whenever the CameraSwitcher track fires. After the first
switch the billboards face a camera the viewer is not looking through, and that camera keeps
moving along its own timeline — which reads exactly as "spinning for no reason". Now resolved
per frame. Any stage script that references "the current camera" has this hazard.

The guess — whether _rotationType == 0 means "face the camera on all axes" at all, and whether
the up vector should be the camera's (screen-aligned, rolls with the shot) or world up (yaw
only), have no ground truth behind them, and the two look completely different on screen. Per
the project rule, that goes off: EnableRotation now defaults to false, same treatment as
PostFilmRendererFeature._enableRendering. With it off the quads keep the orientation the prefab
author gave them, which is real data rather than my inference.

Target selection was checked rather than assumed, and it holds up: all 106 type-0 instances are
named *_billbord / *_billboard / glow_plane / spotlight, all 106 carry a MeshRenderer, and the
lamp bodies are further up the chain (swing_ < arm_ < stand_). So "these should billboard" is
probably right; "how they should turn" is what is unsupported.

Docs also walk back an over-claim from 050a2c9. That commit said the mirror ball rotation was
settled and "already correct in our build". The clip rate is ground truth for the clip
(-179.50 deg/s, and currentLiveTime is in seconds so there is no unit error), but the same live
run reports the balls are still too fast — so the original either applies a playback multiplier
or does not drive the ball with this clip at all. Data settles the asset, not what the original
does with the asset. The multiplier goes back on the unknowable list.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UzXXkLzVC8pNA3JjyUGMbq
2026-08-07 13:41:37 +08:00
ritenseki 4d7a7c3373 Live: rebind the stage's own scripts; fix mirror ball colour; map what is recoverable
The big finding is structural, and it corrects something I asserted two commits ago.

Stage prefabs reference 11 script classes and UmaViewer implemented one of them, leaving
892 MonoBehaviour instances with a null script. I claimed those serialized fields were
unreachable at runtime and that reimplementing the scripts would need name heuristics or a
baked parameter table. That was wrong, and the diagnostic I wrote to confirm it disproved it
instead: among the 7 surviving components were AssetHolder (bundle namespace Gallop) and
StageController (Gallop.Live). Unity resolves MonoScript by class name + namespace +
assembly, and Assets/Scripts/umamusume.asmdef is named "umamusume", exactly matching every
MonoScript in the bundles. The project was organised for this from the start — it is the same
mechanism LiveTimelineWorkSheet relies on to read cutt data.

So the 892 are simply unwritten. Declaring a class with the matching signature makes Unity
deserialize the real fields.

BillboardController (Gallop.Live, 164 instances) is the first one rebuilt, and it confirms
the mechanism: missing-script count drops 892 -> 728, exactly -164. _rotationType is now read
per object rather than guessed. Type 0 (106 objects) faces the camera; type 2 (58, all
glow_ramp) is logged and left alone — the enum's meaning is not recoverable, see below.

BlinkLight palette slots — the mirror ball was solid pink
  * color0Array/powerArray are a 10-slot palette and every renderer was taking slot 0.
    The slot is the object's own or nearest ancestor's `lightNNN_` / `alphaNNN_` name prefix.
    Confirmed across all groups on live10149: the number of distinct prefixes equals the
    number of distinct colours in slots 0..N-1, with slots N..9 uniform white filler, in
    every group without exception. mirrorball 3 (pink/blue/yellow), wash_truss 4, glow_object
    2, audience_light 9.
  * Renderers with no prefix are not palette lights and are now skipped when the group has
    any. The mirror ball body uses Gallop/3D/Bg/BgMirrorBall, whose _MulColor0 belongs to
    BgColor1 — which drives it to white, the silver ball seen in the reference footage.
    BlinkLight runs after BgColor1 and was overwriting it with palette pink.

Stage animation is now driven by the timeline, not Unity's clock. Using Animation.Play() plus
a default clip with playAutomatically meant the stage kept moving while the live was paused
and ignored scrubbing. AnimationState.time is now set from currentLiveTime and sampled.

CLAUDE.md gains a ground-truth map: what the bundles yield, the rebinding trick above with
its signature table, and what is permanently blocked. global-metadata.dat is neither on disk
nor inside GameAssembly.dll (magic 0xFAB11BAF absent, identifier strings absent) — the game's
anti-tamper keeps it encrypted until runtime. Every enum's meaning, the original method
bodies, and any tuning constants are therefore unrecoverable; rebuilding a signature yields
data, never behaviour. The mirror ball's 2.0s-per-revolution is authored in the clip and
reproduced faithfully; if the reference looks slower, the factor lives in code we cannot read.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-05 14:25:37 +08:00
katboi01 7e08e9f88b Cleanup (#54)
Removed most of Gallop and DereScript code that did not affect the application.
2023-12-31 05:21:12 +01:00
左右看 10e3f51669 You can load LiveStage and LiveSheet now 2022-09-04 09:59:21 +08:00