Commit Graph

41 Commits

Author SHA1 Message Date
ritenseki 30ef1b1929 cleanup: one shared property block, explicit resolve report, drop dead diagnostics
No behavioural change intended; this is the tidy-up pass after five rounds of track fixes.

Director.cs
  * Six MaterialPropertyBlock fields (chara / bgColor1 / bgColor2 / spotlight / uvScroll /
    blinkLight) become one shared `PropBlock`. Every use is the same self-contained
    Get -> modify -> Set, and the block carries no state across frames or handlers, so the
    separate fields were pure duplication. The reason the Get is mandatory (SetPropertyBlock
    replaces rather than merges — this is what made GlobalLight dead for 59/59 songs) now
    lives on the one shared field instead of being restated per handler.
  * ResolveStageTargets wrote four instance fields as de facto out-parameters that
    LogBgColor1Resolution read back. Replaced with a returned StageResolveReport, which also
    lets the logger become static. `props` is now a required parameter — the `= null` default
    silently meant "BgColor1's channel", which is the wrong default for a BgColor2 caller.
  * Three duplicated blocks removed: shader-description building (BgColor1 and BlinkLight
    logs -> DescribeRendererShaders), vocal entry resolution (InitializeMusic and
    GetLiveAllVoiceEntry -> ResolveVocalEntry), and the FOV frame marking copied verbatim
    into SaveCameraVMD and SaveMultiCameraVMD (-> MarkFovFrames, which additionally no longer
    throws on an empty frame list).
  * OnEffectUpdate's three identical "record the frame, bail out" branches collapse into
    LoadEffectPrefab returning null.
  * HdrBloom's handler and the Bloom volume override are gone. hdrBloomKeys is empty in all
    59 songs, and the field-to-URP mapping was never confirmed — so this was code that could
    only ever be wrong, plus an effect nobody wrote to. The data layer and the dispatch stay,
    so re-adding it is one subscription.
  * The BlinkLight TODO no longer lists palette slot mapping: that was reverse-engineered
    (slot = the lightNNN_/alphaNNN_ prefix of the renderer or its nearest ancestor).

StageEnvMapDiag.cs deleted (with StageEnvRateToggle and its F9 hotkey). It existed to test one
hypothesis — that the floor blow-out came from DefaultEnvMapNoAmbient's env reflection — and
the verdict experiment ran: _EnvRate = 0 changed nothing. The real cause turned out to be
mirror_a and is fixed. Keeping it meant a full-hierarchy sweep on every stage load and a
hotkey, for a question already answered.

StageController no longer calls it; StageMissingScriptCensus's doc comment stops restating the
signature list that CLAUDE.md already carries.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UzXXkLzVC8pNA3JjyUGMbq
2026-08-07 13:10:13 +08:00
ritenseki 64087b534e Live: fix five silently-failing track paths + one init bug
All found by auditing the tracks LIVE_DEV_MAP marked as done. Every one of
them parses its keyframes correctly and then drops the result downstream with
no error, so the picture looks plausible and nothing ever surfaces the failure.
Verified against the bundles with tools/ before changing anything.

GlobalLight (48) — 9636 keys / 59 songs, never worked
  * Renderer.SetPropertyBlock() replaces the whole block rather than merging.
    AlterLateUpdate runs GlobalLight then BgColor1, and both allocated a fresh
    block for the same container.Renderers, so BgColor1 wiped all 13 rim
    properties every frame. Song 1177 carries GlobalLight x2 and CharaColor x2,
    and bgColor1/globalLight both cover 59/59 songs — this was never once live.
  * Both handlers now GetPropertyBlock -> modify -> SetPropertyBlock, sharing
    one persistent block. The stage-side BgColor1 branch and BlinkLight already
    did this; the two character-side handlers were the only exceptions.
  * _UseOriginalDirectionalLight / _OriginalDirectionalLightDir moved into the
    block too. They were written through renderer.materials, which instantiates
    a material copy and allocates an array on every frame, per renderer.

BgColor2 (9) — 14346 keys / 15 songs, at most one group survived
  * The dispatcher never filled the group name and the handler never read one,
    so up to 15 groups (son1010 carries BgWashA..BgWashO) each repainted the
    entire stage every frame and only the last one in list order survived.
  * Name is now threaded through and resolved via ResolveStageTargets, writing
    _AmbientColor through a MaterialPropertyBlock, resolved once and cached.
  * The name -> renderer mapping is still unknown and is NOT guessed here.
    BgWashA..O / LaserA..C are neither GameObject names nor _stageObjectUnits
    unit names (the three downloaded stages use concrete names like neonsign),
    and BlinkLight carries no index back into BgColor2. Unresolved names fall
    back to the previous whole-stage write and log a warning, so behaviour is
    never worse than before; delete the fallback once the mapping is known.

Spotlight3d (68) — 1089 keys / 31 songs
UVScrollLight (46)
  * Both wrote _Color. Enumerating all 499 shaders shows no Gallop/3D/Live/Stage
    shader declares it — the only two stage/Bg shaders that do are BgShadowOnly
    and RedAlphaGreenColorShadowFogUVScroll, neither related. Spotlight beams are
    StageBeamLight*, and UVScroll targets LightAdd1_UV and
    StageLightAdd1_UVAlphaMask_TransmittedLightMask; all use _MulColor0 /
    _MulColor1 / _ColorPower. The colour write was a no-op while _ColorPower kept
    working, so the lights tracked the music in brightness but never in colour.
  * This is the same defect as the BlinkLight _Color bug fixed in a3a7b83, twice
    over. "The property exists" is not "the target shader has it" — all three
    slipped through on that distinction.
  * UVScrollLight also gains the previously unused mulColor1, and both now use
    MaterialPropertyBlock with cached lookups instead of walking every renderer
    on the stage and touching r.materials each frame.

Transform (31) — 681 keys / 12 songs, never worked
  * UpdateTransform only consulted StageObjectUnitMap and had no else branch, so
    a group named after a GameObject silently did nothing. son1028's first group
    is light001_glow_001. This is the mirror image of the Object-track fix in
    a3a7b83, which was missing the unit-name path instead.
  * Also strips "(Clone)" on the child lookup, which UpdateObject already did.
  * TypeTree confirms LiveTimelineKeyTransformData has only position/rotate/
    scale and no OffsetType, so absolute writes are correct here.

StageController init — 4 permanently dark lights on live10149
  * SetActive(false) sat inside the dedupe check, so among same-named objects
    only the first was disabled. Track groups address containers, and the lights
    are their children: light001_wash_ground_a (x4), swing_wash_ground_a (x2),
    base_rotate_wash_ground_a (x2) and light000_wash_ground_a (x2) all sit under
    pfb_env_live10149_blinklight_wash_ground_a. The handler re-enables only the
    container, so that one disabled child was never turned back on.
  * Now only the topmost timeline-controlled light in each branch is disabled;
    descendants keep their prefab state and follow the parent. Dedupe and insert
    also agree on the stripped name now.

Only GlobalLight could be verified in the editor — song 1177 carries no
bgColor2, spotlight3d or transform data. The rest is code review plus bundle
ground truth.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-05 13:42:18 +08:00
ritenseki a3a7b83236 Live: fix six silently-failing track paths, add PostFilm data layer
Every fix here is the same shape: the keyframe data was already parsed
correctly and then dropped somewhere downstream, with no error logged.
Found by dumping the authoritative schema with tools/ and comparing against
what the handlers actually consume.

BgColor1 (8) — the largest track in the corpus, 43617 keys / 59 songs
  * AlterUpdate_BgColor1 filtered on a `validBgColorNames` whitelist of four
    character group names, discarding the other 16 stage groups outright.
    On song 1177 that is ~92% of the track's keys. Filter removed; Director
    now routes by group name (characters vs stage).
  * Stage branch resolves renderers by walking the whole stage hierarchy.
    StageObjectMap alone is not enough: it dedupes by name, and crowd groups
    have 66-570 same-named objects, so only the first was ever coloured.
  * Writes _MulColor0, confirmed by enumerating the shaders' property tables.
    _AmbientColor belongs to BgColor2 — they are separate channels on the
    same shader and must not be written by both.
  * Populates fields the dispatcher had always left at default: colorPower,
    scale, vertexColorToonPower, outlineWidthPower, LightBlendMode,
    IsSilhouette, IsProjector, TimelineName.

Object (33) — the neon sign never descended from the ceiling
  * The group name `neonsign` is a StageController._stageObjectUnits *unit*
    name; no GameObject of that name exists, so the whole track never fired.
    UpdateObject now falls back to StageObjectUnitMap and applies to each
    child of the unit.
  * ObjectUpdateInfo.OffsetType was populated by the dispatcher but never
    read, so Add-relative positions were written as absolute and objects
    snapped to their parent's origin. Now honoured against a lazily captured
    base local TRS.

BlinkLight (45) — 19420 keys / 57 songs, the biggest lighting payload
  * Wrote _Color, which does not exist on Gallop/3D/Live/Stage/LightBlinkBlend
    (its colour channel is _BlinkLightColor), so the write was a no-op and the
    lights rendered black. Now probes the shader for the real property.
  * Brightness goes to _ColorPower instead of being folded into the colour,
    falling back to colour*power only where that property is absent.
  * Uses MaterialPropertyBlock; the old path hit Renderer.materials every
    frame, allocating and breaking batching.

PostFilm (39) — ~20200 keys / 59 songs, previously recorded as empty
  * Data class fields reordered to the bundle's TypeTree order and the five
    missing BlinkLight* fields added; LiveTimelineKeyPostFilmDataList created;
    postFilmKeys / postFilm2Keys / postFilm3Keys declared on the worksheet.
    Runtime now deserializes 100 / 161 / 87 keys on song 1177.
  * AlterUpdate_PostFilm dispatch with interpolation, PostFilmUpdateInfo,
    a URP ScriptableRendererFeature and a full-screen blit shader.
  * Rendering is disabled by default: filmOptionParam's geometry is undefined
    anywhere we can read. All 100 keys on song 1177 are Vignette variants, so
    that parameter decides the whole look, and the shader that defines it is
    not in the `shader` bundle (all 499 searched by name and by property
    signature) — it ships inside the app binary.

Diagnostics
  * LiveTimelineWorksheetDiag dumps every track field with group names and key
    counts, and Probe() tests whether a candidate field name matches the
    bundle TypeTree. Confirmed worksheetList.Count == 1 (SheetType MainLive),
    and that WashLightList really is spelled with a capital W — upstream
    katboi01 uses washLightList, which never populates.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-05 01:11:57 +08:00
ritenseki 5fdbad92d2 Fix BgColor2 dispatch and unify Director handler style
- Fix LiveTimelineBgColor2Data.keys type (BgColor1DataList → BgColor2DataList)
- Add AlterUpdate_BgColor2 call and implementation in LiveTimelineControl
- Subscribe OnUpdateBgColor2 in Director with ambient color handler
- Extract all anonymous delegates in Director to named OnXxxUpdate methods
- Add LIVE_TRACKS.md: full track reference table (IDs 0–102)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 16:08:22 +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 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
ritenseki abdbfc0f42 Add Live Effect track (track ID 60) implementation
- LiveTimelineEffectData.cs: new data class with full field set
  (color, offset, owner, occurrenceSpot, IsLinkOwner*, etc.)
  derived from actual cutt asset bundle TypeTree dump
- LiveTimelineWorkSheet: add effectList field
- LiveTimelineControl: add OnUpdateEffect event and AlterUpdate_EffectControl
- Director: add OnEffectUpdate handler and ApplyEffectTransform helper
  loads prefab from 3d/effect/live/pfb_{name}, instantiates per key frame

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-06 21:24:52 +08:00
CroakFang d66991c2ef Add support for exporting prop, compatible with the new version, add the EnableRootMotion option (#143)
* update BillboardBuilder

* add a new enum value

* Add the EnableRootMotion option to support scenarios where the character is not within the camera view

* Add support for exporting prop

* update

* compatible with the new version 2

* update

---------

Co-authored-by: 左右看 <1918891542@qq.com>
2025-09-28 12:10:18 +02:00
CroakFang 204752d7d6 Add custom head, live character shader control, and live stage control. (#88)
* Bug fix, improved UI layout and live vocals

* Bug Fixes, New Live Compatibility

* Android build support

* Update build.yml

* Update build.yml

* Update build.yml

* Update build.yml

* Update build.yml

* Update build.yml

* Fix issues with the new version of the game

* bug fix

* add config button

* Improve performance

* Sync fork

* bug fix, new uma compatibility

* Add /UserSettings to gitignore

* bug fix, add live characher shader control

* fix compilation errors

* fix compilation errors 2

* fix the live lighting calculation logic

* bug fix, add editor layout settings to gitignore

* bug fix, add editor layout settings to gitignore

* Add time scale keys for live

* live camera bug fix

* add live stage control, optimize live performance

* fix build error

* add uma head custom
2025-07-11 17:23:57 +02:00
katboi01 d97cb906de Sync fork (#73)
* Improved UI layout and live vocals

* New Live Compatibility

* Android build support

* Update build.yml

* Fix issues with the new version of the game

* add config button

* Improve performance

* bug fix, new uma compatibility

---------

Co-authored-by: CroakFang <1605296300@qq.com>
2024-11-06 23:58:45 +01: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
CroakFang 2a0b8082c0 bug fix 2023-09-18 01:00:56 +08:00
CroakFang 1189922fcc fix new live camera 2023-08-28 01:26:46 +08:00
CroakFang 070b005216 fix new live error, add live Lyrics ui 2023-08-28 00:57:47 +08:00
CroakFang ee5ca42421 improve live recording 2023-08-05 22:30:16 +08:00
CroakFang f624b6e0de minor update 2023-08-05 15:50:57 +08:00
左右看 5e664c73fc update formation 2023-08-01 12:33:21 +08:00
CroakFang bb92a849b0 bug fix 2023-08-01 08:56:20 +08:00
CroakFang 2a3cb02153 add live multi camera (WIP) 2023-07-31 01:05:51 +08:00
左右看 6b476cf1dc minor bug fix 2023-07-30 18:30:20 +08:00
左右看 2f6cbde87c add lipsync2 2023-07-30 01:32:43 +08:00
CroakFang bbc2cbb171 add live vmd recording support (wip) 2023-07-29 23:56:55 +08:00
左右看 949146f7d0 set float for every timeline 2023-07-28 00:39:41 +08:00
左右看 82d747395a minor bug fix 2023-07-25 22:54:47 +08:00
CroakFang 48b1bfda00 update 2023-07-25 07:21:21 +08:00
左右看 b9fdb1c97f add formation rotation 2023-07-25 03:33:38 +08:00
左右看 1ff1ec02af imporve live camera 2023-07-24 11:42:01 +08:00
CroakFang a13cac6ede add live camera support 2023-07-23 17:48:49 +08:00
CroakFang 060ca0f259 Improve Asset Loading 2023-07-13 01:41:59 +08:00
左右看 d1d1a2f771 simple progress bar 2023-07-12 17:22:00 +08:00
左右看 c7f254a025 add simple live mode 2023-07-09 16:12:39 +08:00
左右看 f0c76b12b2 improve live lipsync 2023-07-07 11:01:19 +08:00
左右看 6a89bba5e3 improve live 2023-07-07 05:30:20 +08:00
左右看 e9c0a7a428 improve live 2023-07-06 17:34:17 +08:00
左右看 998ec9d14f LiveTimelineEyeData support 2023-07-06 02:48:51 +08:00
左右看 1a49208ad2 ripSyncKeys support 2023-07-03 18:51:54 +08:00
左右看 0e71fc6d56 live motion support 2023-07-02 18:41:31 +08:00
左右看 e19124cd2c improve assetbundles loading 2023-07-02 00:47:02 +08:00
左右看 1642fabc93 Uma script update 2023-07-01 12:33:16 +08:00
1605296300@qq.com d55c0ecd4d big fix 2022-09-04 15:33:54 +08:00
左右看 10e3f51669 You can load LiveStage and LiveSheet now 2022-09-04 09:59:21 +08:00