-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix player being overlayed on ScalingContainer
's background when storyboard is fully dimmed and replaces background
#22035
Conversation
I'm failing to understand what this PR is trying to achieve, and the description is not helping at all. The fact that you're essentially displaying the background when user sets 100% dim raises multiple question marks in my head. As a first step, can you show us a screenshot of where the issue is on master and how it looks with your PR? |
@frenzibyte did you miss the screenshots in the first post? they show the issue pretty clearly to me.
that said i'm also uncertain of the direction. doing what this PR does makes it so that a lot of pixels need to be filled black in front of the scaled background, even for players that aren't using screen scaling. i'd probably argue that this should not be the case, and that the background behind the scaled content should also have its dim % settable via settings (as much as i hate to add new settings). or it should use the same setting as gameplay background dim? or that doing this black box workaround should be based on the scaling setting rather than the storyboard dim %? dunno. yet another PR opened without an attempt of even asking us what the right thing to do would be. edit: reproduction requires a specific beatmap that has this logic enabled: osu/osu.Game/Storyboards/Storyboard.cs Lines 71 to 88 in 1262c44
example: https://osu.ppy.sh/beatmapsets/1016398#osu/2359368 i'm probably more fine with this PR knowing that, given that it doesn't affect as many beatmaps as i thought it would. i would still probably use screen scaling as the trigger for this logic to kick in rather than |
After a brief conversation in discord, I can understand the issue now. As demonstrated in the comment above after the edit, this only happens on beatmaps with a storyboard element that replaces the beatmap background. And put simply, on 100% dim the storyboard element becomes hidden and the beatmap background is already hidden due to the I do agree with checking whether scaling is active instead, but caution needs to be taken on non-opaque storyboard background elements (if that's a thing). Might be best combining both conditions with a proper explanatory comment. Alternative would be to just place a black background box behind the gameplay screen (or |
ScalingContainer
's background when storyboard is fully dimmed and replaces background
Hum, this is 100% repro for me(maybe some kind of coincidence), so I opted to fix it directly with dimlevel==1 (and it won't affect the break time so I think it is good), now it seems that I may have misunderstood its repro condition, I will adjust my pr |
As we've mentioned in discord, placing a black layer behind |
Agree with proposed direction (black layer when required). This doesn't affect many beatmaps and it's the best we can do (will be optimised away wherever front-to-back optimisations are available, too). |
I think inside the storyboard is also fine yes. |
Unfortunately, if only the drawableStoryboard is adjusted, the storyboard will be hidden under 100% dim (including the black background) Or the black background should be handled by all classes which use DrawableStoryboard |
What's the reason it can't be done in |
The most obvious reason is that the storyboard display problem does not only appear in and the main reason for this problem is that the storyboard design did not consider the issue of background transparency (because the background of stable is always black), so adding a black background behind the storyboard is the expected behavior (for the person who designed the storyboard, because they use alpha to achieve dimming) For performance issues, I have written the logic. When the "replace" storyboard is enabled, the background of the map will always be 100dim (to avoid potential visual problems) and storyboard will hide when DimLevel >= 1f like before I'll push it and you can check if it's as expected |
@@ -53,11 +53,11 @@ public abstract partial class UserDimContainer : Container | |||
|
|||
protected Bindable<bool> LightenDuringBreaks { get; private set; } = null!; | |||
|
|||
protected Bindable<bool> ShowStoryboard { get; private set; } = null!; | |||
protected Bindable<bool> ShowStoryboardConfig { get; private set; } = null!; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why rename?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I originally used ShowStoryboard
when I chose the showReplaceBackgroundStoryboard
variable name.
Because of the conflict, I added config after it, and I will restore it.
protected override bool ShowDimContent | ||
// The background needs to be hidden in the case of it being replaced by the storyboard | ||
=> (!ShowStoryboard.Value && !IgnoreUserSettings.Value) || !StoryboardReplacesBackground.Value; | ||
// But it should show when dim set to 100% anyway to avoid showing Scaling background. | ||
=> showReplaceBackgroundStoryboard || base.DimLevel >= 1f; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the changes in this class are so convoluted and self-referential for no apparent reason.
do not use the numerical dim level here. use the scaling mode itself as already requested. is there an issue with that? if yes then please explain clearly where. also remove the DimLevel
override as i believe it should not be required if scaling mode is used properly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
according to #22238, this is not only cause when scale settings set to Everything
and excluding overlay
, but also multi specter, so it can't just check scale settings.
for dim override, when dim set to 100% or turn into break time, it can cause particularly strange visual effects (backgroundBeatmap show undimmed background while storyboard fades out). So I force it to 100% when storyboardReplaceBackground is enabled
let me sort out the situation
all these need a storyboard which is and for why self-referential osu.development.2023-03-06.23-16-26_output_x264.mp4after 005e643#diff-7cb02fcd1e503e4d277ad1bde3dbd36855b0d735bddb15ffbc02254eeb8b8943R135-R136 osu.development.2023-03-06.23-24-19_output_x264.mp4which here I use base.DimLevel, because breakLightening |
When the player uses scale mode, the beatmap have storyboard and enable it, background(DimContent) will hide because storyboard enabled, and ScalingBackgroundScreen will show at playfield.
like this:
disable storyboard
and this pr force show DimContent when dim set to 100% to fix this problem