Skip to content
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

Images cropped and interface problems on non-16:9 screens #133

Open
vstax opened this issue Aug 22, 2018 · 19 comments
Open

Images cropped and interface problems on non-16:9 screens #133

vstax opened this issue Aug 22, 2018 · 19 comments

Comments

@vstax
Copy link

vstax commented Aug 22, 2018

I'm pretty sure this bug isn't only for Onikakushi but I'm not sure where it would be better to report them. At very least, I'm reproducing them on Onikakushi here.

I'm comparing two systems, Linux running 2560x1600 (16:10) resolution and Windows running 2880x1920 (3:2) resolution. Latest steam version in both cases and latest releases of all the patches. I've installed all patches except for UI mod. I made screenshots on Linux PC here but the same problems exists on Windows system as well.

Problem 1: backgrounds are cropped in full-screen :( I expected black borders on top/bottom but the image is just cropped instead. UI is also cropped. I post here UI crop because screenshots are smaller but the same happens to any background
Window: 2018-08-22 16-40-38
Fullscreen: 2018-08-22 16-40-41

Problem 2: at very start, after the intro, there is vertical scroll of Hinamizawa. After that it's covered by black bars "cropping" the image. Well unfortunately they do that in wrong place and instead of crop you get ugly picture:
2018-08-22 16-42-07

Now I installed UI mod. There are two problems, first is that buttons on the right are cropped and second is that "CLOSE" (and other text) doesn't fit the buttons. This happens both in window and fullscreen, though in fullscreen the interface is cropped even more due to problem 1. Window screenshots:
2018-08-22 16-44-17
2018-08-22 16-44-24

@enumag
Copy link
Member

enumag commented Aug 22, 2018

We're working on a fix, see 07th-mod/watanagashi#87 for details.

@enumag enumag closed this as completed Aug 22, 2018
@vstax
Copy link
Author

vstax commented Aug 22, 2018

@enumag
Would you please reopen this issue, because it seems to be a different problem?

I checked Watanagashi and the most serious problems 1 and 2 - with cropped backgrounds and other images - don't happen there at all. Only buttons go off the screen. That's with original dll from latest release, without fixes from 07th-mod/watanagashi#87.

And this issue turns to be actually specific to Onikakushi.

EDIT Also, buttons "640x480", "800x600" and "1024x768" work for Watanagashi (obviously resulting resolution is not the specified one due to different aspect ratio, but they scale the window at least). For Onikakushi on Linux, they don't do anything, window is always open to maximum size, very similar to fullscreen (as seen on screenshots above, as well). The button work on Windows system, though, where all the other visual bugs are present? so this problem might be unrelated.

@enumag
Copy link
Member

enumag commented Aug 22, 2018

@vstax Do the problems you describe happen in the vanilla version of the game as well? If so you should report them to MG.

@vstax
Copy link
Author

vstax commented Aug 22, 2018

@enumag Bug with resolution buttons not working is present in original... Wish I knew where to report bug to actually get a response (they don't even always reply comments in their blog..)!

However, it's really quite a minor one. Interface doesn't get cropped in original for sure.

@enumag
Copy link
Member

enumag commented Aug 22, 2018

The problem is that original game is 4:3 so even if the engine is bugged it might not show there. I'm honestly not sure if we can do something about this.

@vstax
Copy link
Author

vstax commented Aug 22, 2018

Well. On Windows resolution buttons work in original and patched version, but the interface still gets cropped. Plus, look at the screenshot of problem 2 above: something seems to be wrong with how coordinates are calculated?.. or something.

@vstax
Copy link
Author

vstax commented Aug 22, 2018

I've checked how it works on Windows and noticed some minor details which might or might not be useful. First, while problem 1 (all backgrounds cropped) always happens on Linux in fullscreen, on Windows it only happens after the game is launched in fullscreen. If it's launched in window, or switched from fullscreen to window and back - it's gone. Backgrounds won't be cropped anymore (UI buttons are still cropped, of course, but that's another matter).

Second, problem 2 always happens in fullscreen on Windows/Linux. Switching to window and back fixes background crop on Windows, but doesn't fix this problem. This problem doesn't exist in window mode.

@vstax
Copy link
Author

vstax commented Sep 12, 2018

I understand a bit more about this bug now. First of all, it's not Onikakushi-specific, just that I was unlucky to get game into this state. Second, problem 1 is mostly fixed by the latest version of fixes in 07th-mod/watanagashi#87, except for the case when starting the game while in fullscreen (present both on Windows and Linux). However, the workaround of switching to the window and back fullscreen gets rid of this problem on both platforms now (till the next launch, that is).

Third, problem 2 seems to be quite different from all other problems listed in this issue and on 07th-mod/watanagashi#87 and probably needs to be fixed separately. The real reason for it is that when non-16:9 background is scrolling vertically in non-16:9 window, it's not cropped at 16:9 by black bars at top and bottom during scrolling, but rather always fills the whole window. Which causes an issue when it's cropped after that in an animated way.

@vstax
Copy link
Author

vstax commented Sep 15, 2018

All bugs except for the problem 2 (vertical scroll of hinamizawa, explained in details in previous comment) are fixed now in the latest version of 07th-mod/watanagashi#87 fix.

@enumag Could it be something something wrong with the script itself? That is,

        DrawBustshot(4, "overview/hina1_1", 0, -230, -480, FALSE, 0, 0, 0, 0, 0, 0, 0, 1, 200, FALSE );
        DrawBustshot(3, "overview/hina1_2", 0, -230, -480, FALSE, 0, 0, 0, 0, 0, 0, 0, 2, 200, FALSE );
        DrawBustshot(2, "overview/hina1_3", 0, -230, -480, FALSE, 0, 0, 0, 0, 0, 0, 0, 3, 200, FALSE );
        DrawBustshot(1, "overview/hina1_4", 0, -230, -480, FALSE, 0, 0, 0, 0, 0, 0, 0, 4, 200, TRUE );

maybe different parameters should be used, or alternatively a mask consisting of black bars on top and bottom and allowing only 16:9 viewport can be used as a top layer during this?

@enumag
Copy link
Member

enumag commented Sep 17, 2018

I don't think this can be fixed just by tweaking the parameters. We have spent hours tweaking them to make the animation even work. Any change would most likely break it.

A mask is an interesting idea and might work but it would have to be implenented by someone who actually has a 16:10 monitor. There is no way I can do it blindly.

@vstax
Copy link
Author

vstax commented Sep 17, 2018

@enumag
Why monitor?! You can easily see this problem in window by setting resolution manually. E.g.

<unity_prefs version_major="1" version_minor="1">
    <pref name="Screenmanager Is Fullscreen mode" type="int">0</pref>
    <pref name="Screenmanager Resolution Height" type="int">1000</pref>
    <pref name="Screenmanager Resolution Width" type="int">1600</pref>
    <pref name="UnitySelectMonitor" type="int">-1</pref>
    <pref name="fullscreen_height" type="int">1600</pref>
    <pref name="fullscreen_width" type="int">2560</pref>
    <pref name="height" type="int">1000</pref>
    <pref name="is_fullscreen" type="int">0</pref>
    <pref name="width" type="int">1600</pref>
</unity_prefs>

Will give you 1600x1000 window which will behave exactly like 16:10 monitor does.
I checked this on Linux with the latest dll from 07th-mod/watanagashi#87 (comment) and it works this way.

@enumag
Copy link
Member

enumag commented Nov 17, 2018

@vstax Can you try our latest patch if it has the same issues? There were some resolution related bugfixes.

@vstax
Copy link
Author

vstax commented Nov 18, 2018

@enumag It's still the same, background drawn outside 16:9 area during scrolling.

@vstax
Copy link
Author

vstax commented Nov 29, 2018

@enumag I just realized that other places where background image isn't 16:9 exhibit the same problem. Simple example from Onikakushi would be https://github.com/07th-mod/onikakushi/blob/v5.9.0/Update/onik_015.txt#L2566 - here scene/004 fills the screen regardless of its aspect ratio (so on 3:2 screen you can see more of that image on top and bottom. Funny enough, if switching to 16:9 window after that, a bar on top of the image will be cropped and can never be seen; bottom will be cropped as well, but it's not a problem because it will be scrolling after).

Few lines later the image will start to scroll, then it's supposed to disappear into black screen, but because it was drawn incorrectly in the first place this happens: rena-wrong-aspect

@orian34
Copy link

orian34 commented Nov 29, 2018

Because "out of bounds" effects break in 16:9, it's not a surprise that that last picture happens.
I'm a bit bound in my answer, because it is indeed working as intended while taking the ratio error into consideration, but also I'm not really happy with the way the effect was handled. Looking at the script, it shouldn't be a bustshot but a black scene instead.

@vstax
Copy link
Author

vstax commented Nov 30, 2018

Because "out of bounds" effects break in 16:9, it's not a surprise that that last picture happens.

It's more to that; I think 16:9 has problem as well, but of different type - image is cut.
Consider how it looks on 3:2 screen, top of the picture from start of the scene hatchet-3-2 and bottom part from end of that scene hatchet-bottom-3-2

It's drawn in the borders that are supposed to be black, but we see the real top and bottom of the image like that. Compare that to how it looks in 16:9, top hatchet-16-9 and bottom hatchet-bottom-16-9
The image is cut, you can't see the real top of the picture at the start of the scene and can't see the real bottom at the end of it. The image is just cut; isn't that kind of wrong?

Also, this happens not only with fullscreen backgrounds. At the very start of chapter 15-2 there is this: https://github.com/07th-mod/onikakushi/blob/v5.9.0/Update/onik_015_02.txt#L52

In 3:2 screen it looks like this (ugh): rena-fullscreen
In 16:9 it looks much better, but if you think about it, the bottom of picture is cut again. Is it supposed to be cut?? I really have no idea.. rena-window

For the record, a bit later in this scene we get this on 3:2:
wrong-cut

@cam1170
Copy link

cam1170 commented Jan 31, 2022

In that scene where Rena is at an angle, the sprite is cut off, no matter the sprite option, no matter the text appearance option, if the 4:3/Original BG is used.
image
image

@drojf
Copy link
Contributor

drojf commented Feb 1, 2022

@cam1170 hi, I moved your comment over here: #72 as it affects all chapters, and is mainly related to 4:3/Original BGs rather than your screen being 16:9.

@drojf drojf transferred this issue from 07th-mod/onikakushi Sep 14, 2024
@drojf
Copy link
Contributor

drojf commented Sep 14, 2024

Just an update on this issue.

I've moved this to the higurashi-assembly repo as it affects multiple games (although not all games in the same way).

  • While in aspect ratios wider than 16:9 (ultrawide), everything seems to work correctly on all the games.

  • While in aspect ratios slightly narrower than 16:9 for chapters 9 and below (?) it seems to work correctly

  • While in aspect ratios significantly narrower than 16:9 for chapters 9 and below, the text and UI shrink much faster than they should. But normally you would not have a monitor of that aspect, unless you've rotated your monitor

  • Hou+ specifically is more broken than previous chapters at narrow aspect ratios (while in 'normal' mode), as it causes the text to be cut-off

    • In 4:3 mode the UI scales 100% correctly, even better than previous chapters. Presumably our mod to make the aspect ratio 16:9 is missing some logic.)

Probably only the Hou+ issue will be fixed, since it affects 16:10 monitors which are relatively common these days. The other issues mainly affect very tall aspect ratio monitors which you probably wouldn't want to play the game on, since they would have extreme letterboxing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants