Commit Graph

7 Commits

Author SHA1 Message Date
ritenseki 546d8ef7ba Live: implement MirrorReflection — and it resolves the stage floor blow-out
Rebuilt Gallop.MirrorReflection from its original signature, so Unity deserializes the real
fields out of the bundle rather than anything being inferred. All 13 field names are copied
verbatim from the TypeTree, including the original's typo `_mirrorCliipPlaneOffset` — spelling
it correctly would silently receive no data.

The receiving end was looked up, not guessed. mtl_env_liveNNNNN_mirror000 uses
Cygames/MirrorAndShadow/ReceiveMirror, which declares exactly four properties — _MainTex,
_ReflectionTex, _Color, _ReflectionRate — and the component's _mirrorReflectionColor and
_mirrorReflectionRate line up with the last two name for name. Texture size, cull mask, clear
colour and clip-plane offset all come straight from the serialized values, which differ per
stage (256/12544 on live10149, 512/12288 on live10132), confirming real data is arriving.

Deliberately not implemented, because there is no ground truth for them:
  * _direction is an enum whose meaning is unrecoverable — IL2CPP metadata is encrypted.
    The mirror plane is derived from the mesh's own normals instead, which is geometry rather
    than a guess, and yields (0,1,0) on both stages. The field's value is logged as unused.
  * _mirrorDistortionTileOffset / _mirrorDistortionPower belong to the ReceiveDistortionMirror
    variant; these materials use the plain one.
  * _useMirrorTextureScale / _mirrorTextureScaleForBaseCamera — semantics unknown.

Rendering goes through RenderPipelineManager.beginCameraRendering and RenderSingleCamera.
Camera.Render() is not supported under SRP and would have failed silently.

This also settles the long-standing floor blow-out, and the diagnosis I had been running was
aimed at the wrong objects the entire time. ReceiveMirror's _ReflectionRate defaults to 1.0
while _ReflectionTex had never been assigned, and Unity substitutes a white texture for an
unbound sampler — a full-strength white reflection, i.e. a solid white floor. Binding the
reflection RT fixes it.

CLAUDE.md recorded the blown-out objects as plane_000 / stage_object_001 / specular_002 and I
took that as given, spending four rounds eliminating mechanisms on those three. The actual
culprit is mirror_a, which sits at the same position and scale under the same parent — visually
indistinguishable, entirely different name. The earlier "_EnvRate = 0 changes nothing" result
was consistent all along: it was toggling a different set of objects.

Both files gain the lesson: field values and shader property tables are hard data, but a
document's description of which object looks wrong is not, and a visual bug should start by
confirming which object the symptom belongs to.

Water surfaces are absent, not broken — none of the three downloaded stages has a ReceiveWater
material; each has exactly one ReceiveMirror.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-05 14:45:12 +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
ritenseki d6c262ba93 docs: correct the track data, record what is blocked and why
The pre-2026-08-04 scan data was wrong in two systematic ways, and acting on
it wasted real time. Re-measured everything with tools/ against all 59 songs.

  * Eleven tracks marked "WorkSheet 无 X 字段" do have the field, several with
    substantial data: MobControlKeys (2392 keys), CyalumeControlKeys (2372),
    nodeScaleList (57/59 songs), monitorCameraPos/LookAtKeys, sweatLocatorList,
    facialNoiseKeys, charaMotionNoiseKeys, LipSyncPattern*, and the multi-camera
    bloom keys. These are "just needs a C# declaration", not blocked.
  * Six tracks marked "全 0 keyframe 空占位" carry thousands of keys. PostFilm
    is the worst case at ~20200 keys over 59/59 songs; live-shader-todo.md was
    right to rank it first and LIVE_TRACKS.md was wrong to write it off.

Rows that have been re-measured are tagged ✅实测; untagged rows are still old
data and should be re-verified before anyone acts on them. Priorities are now
ordered by measured data volume crossed with the kind of work required.

Also recorded:
  * The stage shader colour/brightness channel table, and the warning that a
    material's m_SavedProperties lists properties its current shader no longer
    has — enumerate the shader, never trust that table.
  * A working rule: no ground truth, no implementation. Guessing cost two wrong
    PostFilm vignette implementations before it turned out the defining shader
    is not shipped in any bundle. Note that "the property exists" is not "this
    field maps to that property" — that distinction is why BgColor1's power ->
    _ColorPower write was reverted while BlinkLight's was kept.
  * A 「已知未解问题」 section splitting open items into: has ground truth so
    can be built, lacks it so disabled, and rendering problems unrelated to the
    timeline (the stage floor blowing out predates all of this work; the small
    bulbs render black because their shaders expose no colour property at all).
  * Song 1177 (stage live10149) is the reference song used throughout. Earlier
    notes said 1157, which was wrong — that song uses stage live10146.
  * The old UmaCrack tool paths are gone; tools/ replaces them.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-05 01:12:22 +08:00
ritenseki 7fc1511fd4 Fix StageController light filter: use explicit patterns instead of Contains("light")
Replace broad Contains("light") with IsTimelineControlledLight() that matches
only objects actually controlled by timeline handlers (blinklight, spotlight3d,
_wash_, laser). Neonsigns, glow meshes, UV scroll objects and other static stage
props now keep their prefab default state instead of being silently disabled.

Also fix UVScrollLight handler to use GetComponentsInChildren<Renderer>(true)
so inactive renderers are included in material search.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 20:19:45 +08:00
ritenseki fefcd96b07 Add ChromaticAberration, HdrBloom, ColorCorrection post-processing tracks
Three new URP Volume Override tracks (Path A):

ChromaticAberration (73): power → intensity, isEnable toggles effect.
Per-channel redOffset/greenOffset/blueOffset not expressible in URP built-in CA.

HdrBloom (38): bloomIntensity → Bloom.intensity, threshold → Bloom.threshold.
Fields unconfirmed (no bundle data in 30-song scan).

ColorCorrection (61): saturation (game 1.0=neutral) → ColorAdjustments.saturation
(URP range -100..100). redCurve/greenCurve/blueCurve → ColorCurves via TextureCurve.
Depth curves and selective color have no URP equivalent.

Director.InitializeTimeline() acquires or creates a Volume on Camera.main and
adds the required overrides programmatically.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 14:17:41 +08:00
ritenseki c0c7a5bfbe Fix BlinkLight flicker and ParticleGroup dual-rate emission
BlinkLight (pattern != 0): was always on; now computes intensity each
frame from turnOnTime/keepTime/turnOffTime/intervalTime/waitTime/
loopCount/powerMin/powerMax — supports fade-in, hold, fade-out, interval
cycle. pattern == 0 retains the original static per-light path.

ParticleGroup: was driving emission from FlickerLightRate only;
now uses MinMaxCurve(FlickerDarkRate, FlickerLightRate) so Unity
randomly samples between the two rates each emission event.

Also adds TODO comments on WashLight, Laser, UVScrollLight incomplete
fields, updates CLAUDE.md track table and live-shader-todo.md.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 13:16:44 +08:00
ritenseki 2e0f28ad7e Add Live stage lighting and effects tracks
New data classes (11):
  BlinkLight, GlobalFog, Spotlight3d, UVScrollLight,
  VolumeLight, LightShafts, Particle, ParticleGroup,
  WashLight, Laser + CLAUDE.md

WorkSheet: added 11 new [SerializeField] fields
LiveTimelineControl: added 9 new events + AlterUpdate_SimpleListControl helper
Director: added handlers for all new tracks

Key fixes:
  - StageController: register light objects in StageObjectMap (was skipped
    with continue), fixes missing stage props like ceiling neonsign
  - Spotlight3d handler: use keyData.assetName for StageObjectMap lookup
  - BlinkLight: SetActive + child Light color/intensity from timeline data

Coverage (58 songs): BlinkLight 56/58, Effect 55/58, GlobalFog 40/58,
  UVScrollLight 32/58, Spotlight3d 30/58

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 11:34:04 +08:00