Skip to content

Fix editor background taking too long to load with certain storyboards#37038

Merged
bdach merged 4 commits intoppy:masterfrom
peppy:editor-background-fix
Mar 23, 2026
Merged

Fix editor background taking too long to load with certain storyboards#37038
bdach merged 4 commits intoppy:masterfrom
peppy:editor-background-fix

Conversation

@peppy
Copy link
Copy Markdown
Member

@peppy peppy commented Mar 19, 2026

TL;DR the clock was being set too late, causing more transforms to be created than necessary.

This solves the issue by way of a refactor (sorry). Overall this should simplify handling of things as more of the logic is shared with the known good-state BeatmapBackgroundWithStoryboard.

I did try without a refactor (just delaying the creation until the clock arrives) but this version made more sense because background generally expect to do their main load in BDL to aid in smooth transitions. And we can't get the clock by there. (although arguably we could just use a similar method to BeatmapBackgroundWithStoryboard and forego using the editor clock).

Of note, I removed the black background overdraw hack. There are edge cases where it will lead to weird transitions, but these are far and few between. Basically you need a storyboard which sets the flag to hide the beatmap background and has transparency in it. This is no longer as flagrantly bad as things used to be (which led to the inline fix) as far as I can tell, but feel free to prove me wrong. If this is a blocker I'll probably just add a permanent black box (which does fix this).

Closes #36875.

TL;DR the clock was being set too late, causing more transforms to be
created than necessary.

This solves the issue by way of a refactor (sorry). Overall this should
simplify handling of things as more of the logic is shared with the
known good-state `BeatmapBackgroundWithStoryboard`.

Of note, I removed the black background overdraw hack. There are edge
cases where it will lead to weird transitions, but these are far and few
between. Basically you need a storyboard which sets the flag to hide the
beatmap background and has transparency in it. This is no longer as
flagrantly bad as things used to be (which led to the inline fix) as far
as I can tell, but feel free to prove me wrong.

Closes ppy#36875.
@peppy peppy requested a review from bdach March 19, 2026 11:07
@bdach
Copy link
Copy Markdown
Collaborator

bdach commented Mar 19, 2026

This has some pretty horrible visual issues with transitions, both on editor entry and exit:

Screen.Recording.2026-03-19.at.12.37.09.mov
  • On entry the song select background instafades out => bad flicker
  • On exit... I don't even know what's happening on exit. It's like the storyboard is trying to jump out of the screen to scare me. Maybe something to do with the audio track jerking forward and the storyboard seeking to match it or something of that sort.

@peppy
Copy link
Copy Markdown
Member Author

peppy commented Mar 19, 2026

The ultra wide reveals all 😅

I'll add a black box for now yeah?

@bdach
Copy link
Copy Markdown
Collaborator

bdach commented Mar 19, 2026

Probably easiest at this stage.

@peppy
Copy link
Copy Markdown
Member Author

peppy commented Mar 19, 2026

Please check that the updated code has fixed both your weird scenarios.

@bdach bdach merged commit 95648a3 into ppy:master Mar 23, 2026
7 of 9 checks passed
bdach added a commit to bdach/osu that referenced this pull request Mar 26, 2026
…ackground is disabled

Man this "storyboard replaces background" baloney has taken hours of
bugfixing alone. So many forehead indentations from stepping onto this
stupid rake.

This still fails in one more case: when you download a no-video variant
of a beatmap that has video, but then edit it, all of the flags checked
here will claim that the beatmap has a storyboard that replaces a
background, but the video asset is missing, so the background will still
be black. There's currently no way to check for this and the simplest
way to address this as far as I can see would be reverting
ppy#37038 and going with the non-refactor
route to fix ppy#36875 instead.
bdach added a commit to bdach/osu that referenced this pull request Mar 26, 2026
…eplace background is disabled

Man this "storyboard replaces background" baloney has taken hours of
bugfixing alone. So many forehead indentations from stepping onto this
stupid rake.

This still fails in one more case: when you download a no-video variant
of a beatmap that has video, but then edit it, all of the flags checked
here will claim that the beatmap has a storyboard that replaces a
background, but the video asset is missing, so the background will still
be black. There's currently no way to check for this and the simplest
way to address this as far as I can see would be reverting
ppy#37038 and going with the non-refactor
route to fix ppy#36875 instead.
peppy pushed a commit that referenced this pull request Mar 27, 2026
…eplace background is disabled (#37112)

Man this "storyboard replaces background" baloney has taken hours of
bugfixing alone. So many forehead indentations from stepping onto this
stupid rake.

This still fails in one more case: when you download a no-video variant
of a beatmap that has video, but then edit it, all of the flags on
storyboard will claim that the beatmap has a storyboard that replaces a
background, but the video asset is missing, so the background will still
be black. There's currently no way to check for this and the simplest
way to address this as far as I can see would be reverting
#37038 and going with the non-refactor
route to fix #36875 instead. The
alternative is adding all sorts of weird jingles and checks in the
storyboard machinery that can be used to be able to tell that a video
was supposed to be present in the storyboard but is missing.

Also when entering editor on a map that has background video and
storyboard enabled the background will be black until you hit play.
Something to do with `Video` idiosyncrasies for sure.

Closes #37104 maybe? Kind of?
Partially? I don't know. This is all very low effort because I'm not
confident about digging this ditch any deeper, but just PRing a direct
revert would feel pretty offensive I guess?
MingxuanGame pushed a commit to GooGuTeam/osu that referenced this pull request Mar 29, 2026
ppy#37038)

TL;DR the clock was being set too late, causing more transforms to be
created than necessary.

This solves the issue by way of a refactor (sorry). Overall this should
simplify handling of things as more of the logic is shared with the
known good-state `BeatmapBackgroundWithStoryboard`.

I did try without a refactor (just delaying the creation until the clock
arrives) but this version made more sense because background generally
expect to do their main load in BDL to aid in smooth transitions. And we
can't get the clock by there. (although arguably we could just use a
similar method to `BeatmapBackgroundWithStoryboard` and forego using the
editor clock).

Of note, I removed the black background overdraw hack. There are edge
cases where it will lead to weird transitions, but these are far and few
between. Basically you need a storyboard which sets the flag to hide the
beatmap background and has transparency in it. This is no longer as
flagrantly bad as things used to be (which led to the inline fix) as far
as I can tell, but feel free to prove me wrong. If this is a blocker
I'll probably just add a permanent black box (which does fix this).

Closes ppy#36875.
MingxuanGame pushed a commit to GooGuTeam/osu that referenced this pull request Mar 29, 2026
…eplace background is disabled (ppy#37112)

Man this "storyboard replaces background" baloney has taken hours of
bugfixing alone. So many forehead indentations from stepping onto this
stupid rake.

This still fails in one more case: when you download a no-video variant
of a beatmap that has video, but then edit it, all of the flags on
storyboard will claim that the beatmap has a storyboard that replaces a
background, but the video asset is missing, so the background will still
be black. There's currently no way to check for this and the simplest
way to address this as far as I can see would be reverting
ppy#37038 and going with the non-refactor
route to fix ppy#36875 instead. The
alternative is adding all sorts of weird jingles and checks in the
storyboard machinery that can be used to be able to tell that a video
was supposed to be present in the storyboard but is missing.

Also when entering editor on a map that has background video and
storyboard enabled the background will be black until you hit play.
Something to do with `Video` idiosyncrasies for sure.

Closes ppy#37104 maybe? Kind of?
Partially? I don't know. This is all very low effort because I'm not
confident about digging this ditch any deeper, but just PRing a direct
revert would feel pretty offensive I guess?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dimming and storyboards sometimes do not work in the editor

2 participants