elishacloud / Silent-Hill-2-Enhancements

A project designed to enhance Silent Hill 2 (SH2) graphics and audio for the PC. It also includes scripts to build or modify SH2 audio files (SFX, BGM and Dialog).
http://www.enhanced.townofsilenthill.com/SH2/
zlib License
587 stars 41 forks source link

Pixellated tree leaves, "Now loading..." message and some more... #346

Closed Psycho-A closed 1 week ago

Psycho-A commented 3 years ago

Hello everyone!

  1. A lot of work has been done to make the game look great - but there is still one detail that is catchy from the old times and can ruin the impression. Tree crowns and some grass (for example, at the beginning of the game on the way to the town, and ground on the cemetery) look very pixeled at the edges. Maybe it's possible to write some kind of shader that would smooth out the transparent contours? Or just scale the problematic textures to make them smoother?

  2. I don't know if this was the idea, but the "Now loading..." message every time the Main menu is shown slightly breaks the impression of of the game integrity, as such messages are not found anywhere else. Maybe it is better to remove it?

  3. Issues with image and FMV scaling on more square screens than 16:9 (16:10/4:3/5:4) are still relevant, especially with introducing upscaled images. Right and left cropping for such screens is not a good tone and letterboxes look much better and keep the full image. Therefore, the best option would be to completely prohibit the horizontal sides going off the screen for both "FMVWidescreenEnhancementPackCompatibility" and "FullscreenImages" params. Thus, we would get rid of modes "3" for 4:3 and have only two options: 1) Fit image/video vertically or horizontally keeping the letterboxes or pillarboxes (depending on the proportions of the screen), like it does all video or image players, and 2) Fit picture by horizontal sides with cropping the image from the top and bottom (for 16:9 and wider screens). So, both modes will give good results for both 4:3 and 16:9 screens. Maybe it's even better to make just one param and value to enable or disable vertical cropping (maybe even merge image- and FMV-related stuff into one option), while mode I mentioned as "1)" would be default behavior as the most content-keeping friendly. Below is the concept of how I imagine this.

  4. The music after we first talk with Angela plays too quiet compared to the other ones, and overlapping with the steps of James. On original PC or PS2 it was louder and clear.

  5. Could we append the enhanced game icon into the enhanced US sh2pc.exe file? I tried this, and it looked good without any bugs in game work. There are resource editors like ResHacker or Restorator that can do that.

Screenshot_2020-11-05_221315

FullScreenImages

Polymega commented 3 years ago

Hi Pyscho-A,

1: I'll be honest and say I don't know if that's something we'll look into, at least not any time in the foreseeable future, mostly because of how many trees/plants are found throughout the game. Previously, we tried using different anisotropic filtering methods to help with the pixelation on the greenery, but it generally had a negative effect on plants/trees.

However, we would like to at least replace the 2D trees at the beginning with 3D ones (using the same 3D trees seen elsewhere within the Observation Deck).

2: Yeah, the "Now loading..." text is pretty irrelevant for any computer built in the last decade playing this game. (Plus, the game still uses the "foot steps" loading screen when it needs to.) Maybe we can look into disabling this, at least for the main menu screen, at some point. It might be as easy as nop'ing one instruction.

Here's the code Aero_ found to restore the "Now loading..." text position a long time ago. It could maybe be used as a reference point for where to look.

3: The new FullscreenImages should generally do what you're saying, albeit with some slight differences. Check out information for it here. FullscreenImages = 1 guarantees the entirety of the memo/riddle image will always be shown, no matter the aspect ratio used. Depending on the aspect ratio, you will either see letterboxing or pillarboxing.

FullscreenImages = 2 scales the memo/riddle images to remove any pillarboxing or letterboxing up to a 16:9 aspect ratio. If you use an aspect ratio other than 16:9, this may severely crop the image. We stop the scaling at 16:9 because, if the images were cropped any further for ultrawide displays, it would slice too much off vertically (such as slicing off the elevator buttons that you need to interact with).

These visual features for the project are aimed to have it display nicely in 16:9, while also having legacy support for 4:3. Other aspect ratios aren't really a main focus for us.

4: That may relate to DSOAL. I'm not sure.

5: We recently added an icon to the executable, but the game wouldn't launch for a user with this change. We've reverted the change to play things safe. It's better to have no icon and ensure the game launches without issue, than adding an icon and have the chance of it not launching for someone.

AeroWidescreen commented 3 years ago
  1. Could we append the enhanced game icon into the enhanced US sh2pc.exe file? I tried this, and it looked good without any bugs in game work. There are resource editors like ResHacker or Restorator that can do that.

Adding to Polymega's response: there's also been a new problem with the game running in 640x480 compatibility mode, which may or may not be related to the icon we added. The only solution is to change the name of the executable. It's probably better to leave things as they are until we figure out what the deal is.

Psycho-A commented 3 years ago

I'll be honest and say I don't know if that's something we'll look into, at least not any time in the foreseeable future, mostly because of how many trees/plants are found throughout the game

Well, I think if pixellated rendering is some generic behavior, then just changing that behavior would fix all of that cases we meet without needing to change content manually. Also, as I remember, such kind aliasing had hardware smoothing on some older graphic cards (like Radeon 9600 from year 2004). At least I remember smooth threes in SH4 but it was gone with newer graphic cards and started look the same as now in SH2. Maybe here we have the same issue.

Yeah, the "Now loading..." text is pretty irrelevant for any computer built in the last decade playing this game. (Plus, the game still uses the "foot steps" loading screen when it needs to.)

The footsteps would be much more preferred here, I guess. Or just making this message null wherever it was, as it was not in the vanilla PC or PS2 builds...

The new FullscreenImages should generally do what you're saying, albeit with some slight differences. Check out information for it here. FullscreenImages = 1 guarantees the entirety of the memo/riddle image will always be shown, no matter the aspect ratio used.

That's good then, but I just suggest to extend this behavior to FMV's too (or maybe merge into the single parameter), because now FMV options have some weird magic that just unnecessary if we will use the method we scaling riddle images there. The "FullscreenImages = 1" is well compatible with all types of monitors, while there's no one well-compatible option for FMVs. FMVWidescreenEnhancementPackCompatibility = "1" does pillarboxes on 16:9 but for some reason crops FMVs horizontally in 4:3; the option of "2" removes pillarboxes in 16:9 and scaling FMVs vertically a bit, but in 4:3 it crops even more (H and V)! On "3" we have normal image in 4:3, but in 16:9 videos are getting small and have black boxes everywhere.

As for 16:9 vertical scaling you suggest to remove in case of ultra-wide monitors - well, we could allow some percent of vertical cropping which is now used for 16:9 FMVs, and if screen is wider, just draw the pillarboxes when this percent is reached. This would be good for images and videos too, in "FullscreenImages = 2". And it still would be compatible with 4:3/16:10 or other screens, if we'd completely remove horizontal cropping.

That may relate to DSOAL. I'm not sure.

I'm not using DSOAL/IndirectSound. This was come a long ago when the first Audio Enhancement pack was released. In fact, many ambient music plays quieter, especially comparing to cutscenes or some certain sounds loudness (like closing chailnlink gate). I even reduced SFX volume twice, but the cutscenes not controlled with SFX, they controlled with BGM slider that makes music even more quieter too. I don't know about headphones, I'm using big speakers, and this loudness misbalance between various game elements is well audible...

We recently added an icon to the executable, but the game wouldn't launch for a user with this change. We've reverted the change to play things safe.

That's strange, because everything is fine for me. I even added the version info there, and no any affecting. Maybe depends on software you're using? You just may check my exe version and if that'll be good, just use it. (In ZIP are both 256x256 icon and EXE).

NewExe+Icon.zip

AeroWidescreen commented 3 years ago

as it was no in the vanilla PC

But it was, it just wasn't visible at higher resolutions because of a programming error. Regardless, I'm fine with its removal. The intention was to have everything look the same as the vanilla game when using the widescreen fix. But with the Enhanced Edition we're not bound by any of that.

Polymega commented 3 years ago

Yeah, the "Now loading..." message was added by Team Silent when they released it on Xbox. And the PC port is based on the Xbox build, so it carried over. If it's fairly easy to disable, we can definitely look into it later on.

As for the audio: We're probably not going to do many more edits on them, unless it's something critical (like a SFX/BGM track not looping). For the audio, we've gotten it to a point where we're all satisfied with it, and our attention is focusing elsewhere for the game at this time (such as restoring specularity or making the game run stable on multiple cores).

With your suggestion of FMVWidescreenEnhancementPackCompatibility behaving more like FullscreenImages in terms of scaling: I'll leave Aero_ to comment on that, if he wants to, as he's the creator of both of these features. But I think it's fine as it currently is. With our intent being 16:9 or 4:3 usage, the settings for these as they currently are meet our goals, even if the FMV feature isn't as automated as the Full Screen Image feature.

And thanks! We'll keep testing out the executable with a built-in icon and hopefully determine what's going on with it. The biggest concern is that, for most people, the integrated icon was having no side effects (such as myself, Aero_, Elisha, and others). So it's tricky for us to test this particular thing out.

AeroWidescreen commented 3 years ago

With your suggestion of FMVWidescreenEnhancementPackCompatibility behaving more like FullscreenImages in terms of scaling: I'll leave Aero_ to comment on that, if he wants to, as he's the creator of both of these features. But I think it's fine as it currently is. With our intent being 16:9 or 4:3 usage, the settings for these as they currently are meet our goals, even if the FMV feature isn't as automated as the Full Screen Image feature.

I would if I could. I tried doing this the last time I updated it, but developing a formula was impossible since the height scales in a very unusual way that I can't make any sense of. The values I'm using right now are hardcoded and were done entirely by "eye" rather than by math.

Not something I'm happy with, but what else can I do when 2 + 2 = 9 and 5 + 5 = 24?

DonelBueno commented 3 years ago

As for the first "issue", SSAA may help a lot. Do you happen to own an Nvidia GPU? If so, use Nvidia Inspector with a "C1" AA Flag and "4x4 [4x4 Supersampling (D3D only)]" for "Antialiasing - Setting".

Psycho-A commented 3 years ago

As for the audio: We're probably not going to do many more edits on them, unless it's something critical (like a SFX/BGM track not looping). For the audio, we've gotten it to a point where we're all satisfied with it, and our attention is focusing elsewhere for the game at this time (such as restoring specularity or making the game run stable on multiple cores).

Maybe I could help with it, if I'll get the valid correction levels comparing PS2 game. As I know, music files are stored as WAVs, so that souldn't be too hard... Just need to find some time on it...

Not something I'm happy with, but what else can I do when 2 + 2 = 9 and 5 + 5 = 24?

Well, I could suggest to work in two stages.

First is unify displaying FMVs to some generic, screen type-independet behavior (f.e. fit the screen by one of side without stretching or cropping video frame), maybe even using that manual magic you already did. You may also check different video resolutions to ensure that all of them displaying the same way, because as I remember, the videos with height of 384 px (original PC binks) displayed with no aspect stretching, while all that greater 384 px was auto-stretched to fill the screen. So, need to unify behaviors and avoid stretching. This is will kind of base for all further works.

And second, make all video settings to be already relative to all that done with I mentioned as "first" (f.e., adding cropping to remove pillarboxes in 16:9). In fact, this would help to completely get rid of "FMVWidescreenEnhancementPackCompatibility" param and just made three options of "FMVWidescreenMode" (or even bind these patches to common param with 2D images), where "0" will disable all patches and return original game's FMV behavior; "1" will fit the screen by closest side (keeping black boxes horizontally or vertically depending on monitor); and "2" will remove pillarboxes and slightly crop vertically for 16:9 displays.

I don't know, is all of that possible for now - but perhaps one day the right idea will come, to you or someone else...

As for the first "issue", SSAA may help a lot. Do you happen to own an Nvidia GPU? If so, use Nvidia Inspector with a "C1" AA Flag and "4x4 [4x4 Supersampling (D3D only)]" for "Antialiasing - Setting".

No, this doesn't help to me at all. SSAA or SMAA is for overall picture, not for filtering internal rendering elements. They needs some kind of bilinear/bicubic filtering individually, so that large pixels will look smoother.