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

[Silent Hill 2] Checklist of Remaining/Wishlist Fixes #13

Closed
19 of 22 tasks
elishacloud opened this issue Jul 8, 2018 · 119 comments
Closed
19 of 22 tasks

[Silent Hill 2] Checklist of Remaining/Wishlist Fixes #13

elishacloud opened this issue Jul 8, 2018 · 119 comments

Comments

@elishacloud
Copy link
Owner

elishacloud commented Jul 8, 2018

From @Polymega on October 17, 2017 23:59

(Note: This thread was made a few days before the creation of the SH2 Enhancements Repository)

I'm doing a play through of Silent Hill 2 again for the Enhanced Audio project and I was making mental notes of the remaining "wishlist" fixes and wanted to post them for posterity purposes.

Noted areas for improvement:

Discussion thread

  • Fix "Eddie/Laura bowling scene" black fade out regardless if Fix2D or similar is on/off
    GIF example
  • Have the game cursor (used for interacting with full screen images) default to center of the screen each time like the console versions. This is due to the cursor being off-screen whenever Fix2D and FullScreenImages are enabled in the Widescreen Fix. FIX IN PROGRESS
    Solution
  • Fix luminescence of James, dress, and Mannequin in Room 205. A FIX HAS BEEN FOUND
    Discussion Post | Solution

Fixed!:

  • Integration of soft shadows
  • Shadows do not cast on dynamic (movable) objects (they do on the console versions)
    Discussion thread
  • Integration of PS2 quality sound files ("Enhanced Audio" project)
  • Game map & save screen fix: Currently, if you're on the streets of Silent Hill during the day time the pillar boxes are grey, not black. This is true for any area where the game has set the time of day to "day" (and not "night").
    Image example | Discussion post
    There has been breakthrough discoveries in implementing high res, widescreen images for the game so this fix will be redundant if a HD image mod comes to fruition.
  • Game map & save screen fix: Currently, the markings on the maps and save file's floating, enlarged text are always visible and stay above the pillar boxes. They should be behind the pillar boxes.
    Video example
    There has been breakthrough discoveries in implementing high res, widescreen images for the game so this fix will be redundant if a HD image mod comes to fruition.
  • Game map fix: There are no pillar boxes at all whenever James transcribes notes onto his own map. (James transcribes notes onto his own map several times throughout the game.) You can see the game environment instead where the pillar boxes should be.
    Video example
    There has been breakthrough discoveries in implementing high res, widescreen images for the game so this fix will be redundant if a HD image mod comes to fruition.
  • Fix Lying Figure cutscene camera "pop" and looped animation
    Video example | Discussion thread
  • Integration of anti-aliasing (possibly done through SMAA?)
    Alternate solutions have been found for anti-aliasing which have been reflected in the Installation Guide.
  • Integration of WineD3D's fixes without having to use WineD3D (wise to do so?)
    It is no longer necessary to do this.
  • Adjust WSF to accommodate new 16:9 FMVs (currently there are still small pillar boxes when FMVWidescreenEnhancementPackCompatibility is turned on).
    Discussion thread
  • Fix bugged lighting sources for a few areas in the game
    Video Example 1 | 2 | Discussion thread
  • Increase draw distance for either just Woodside Apt 2F Hallway or whole game
    Video example | Solution
  • Adjust fixed camera angles in several spots to hide camera clipping through wall
    Discussion thread
  • Fix camera stutter in Hospital, 3F, Rm S3
    Video example | Discussion thread
  • Remove one-frame flicker when an in-game cutscene changes to motion blur. (If not possible then have the option to disable the game's motion blur altogether then in the ini file?)
  • Keep hanging meat always "loaded in" during final Eddie confrontation cutscene.
    Video example | Discussion posts
  • Fix the very silly animation bug for when James gets on the rowboat.
    Video example | Solution
  • Implement language subtitle "packs" for the game?
    Discussion post
  • Fix loading zone color values for cemetery area to fix environment Quick Save load bug.
    Video example | Solution

Copied from original issue: elishacloud/dxwrapper#9

@elishacloud
Copy link
Owner Author

From @AeroWidescreen on October 19, 2017 19:9

Adjust WSF to accommodate new 16:9 FMVs (currently there are still small pillar boxes when FMVWidescreenEnhancementPackCompatibility is turned on).

ThirteenAG says he's going to take a look at it, so I'm guessing this should be fixed in the upcoming stable build. I'll let you know otherwise.

16x10FMVWidescreenEnhancementPackCompatibility and 16x9FMVWidescreenEnhancementPackCompatibility in case some people prefer to use the originals still?

The issue with that idea is there are some videos you didn't change at all, so if we were to reduce the width to pillarbox them again (16:10) then those videos would get squished in the process.

Alternatively, we could simply offer different downloads. One for angular_graphics' videos, and another for your edited videos. Then nothing with our scaling would have to be changed.

Black backdrop for pillar boxes when James is transcribing notes on his map

Make map markings and save screen wording hide behind pillar boxes (possible?)

I feel like we shouldn't spend time on this kind of stuff when we could be working towards a proper solution instead. In this case, replacing the save screen background with an extended version, and fixing the pillarboxing of the maps. Both easier said than done of course.

Fix "Eddie/Laura bowling scene" black fade out regardless if Fix2D or similar is on/off

I think I understand why the developers did what they did here. I believe the black overlay is used to emphasize Eddie's last bit of dialogue "Nobody will ever forgive me." while the cutscene appears to end. My solution skips the overlay entirely and goes straight into the transition, but that means the subtitles for that last bit are not visible and some of the emphasis is lost. I'll have to find another way.

Fix camera "pop" during "blood on the road" cutscene when ReduceCutsceneFOV is on

You already know what idea I have to fix this, so I'll let you know how it turns out as soon as I have a chance to test it.

@elishacloud
Copy link
Owner Author

From @Polymega on October 19, 2017 19:23

The issue with that idea is there are some videos you didn't change at all, so if we were to reduce the width to pillarbox them again (16:10) then those videos would get squished in the process.

True. But the only ones I didn't change were the bonus trailers for SH2 & 3 not pertaining to the game themselves. However I do see your point. But...

Alternatively, we could simply offer different downloads. One for angular_graphics' videos, and another for your edited videos. Then nothing with our scaling would have to be changed.

Good point. So long as the user's resolution is set for 16:9 then our newly edited videos should play with no black bars anywhere (after ThirteenAG adjusts things) so long as they disable FMVWidescreenEnhancementPackCompatibility. Once we get a little further along I'll update the Installation Guide to offer both video formats and the installation instructions.

I feel like we shouldn't spend time on this kind of stuff when we could be working towards a proper solution instead. In this case, replacing the save screen background with an extended version, and fixing the pillarboxing of the maps. Both easier said than done of course.

I know that it may be nearly impossible to allow for different size/resolution full screen images due to complications you mentioned. That got me wondering about an alternative solution:

Could you combine several of your full screen fixes into one? Basically doing what I did for the 16:9 FMVs? So you'd zoom in on the full screen images as you've done to remove the letter boxing and then stretch the images horizontally ever-so-slightly to remove the pillar boxes. While there would be some image stretching you wouldn't crop off any of the images as what's currently being done to remove the pillar boxes, if that makes sense.

This may also fix the Hotel elevator button dilemma. But on that same note, there's no saying how the interactive full screen images would behave stretching them like that.

I think I understand why the developers did what they did here. I believe the black overlay is used to emphasize Eddie's last bit of dialogue "Nobody will ever forgive me."

You're probably right. Team Silent were masters at this. Notice how, when you first meet Eddie in the apartment bathroom, when he says, "Honest," it's extra loud compared to his other dialog? I always loved that little detail...

@elishacloud
Copy link
Owner Author

From @Bigmanjapan on March 19, 2018 18:27

Game map & save screen fix: Currently, if you're on the streets of Silent Hill during the day time the pillar boxes are grey, not black. This is true for any area where the game has set the time of day to "day" (and not "night"). Image Example.

Since the grey pillar boxes' color is actually a loading zone color, it is possible to change the color manually.

In my sh2pc.exe these three addresses hold RGB values for loading zone color:

sh2pc.exe+542C50 (00942C50) byte = red channel
sh2pc.exe+542C51 (00942C51) byte = green channel
sh2pc.exe+542C52 (00942C52) byte = blue channel

Setting them to 0 would output pure black loading zone color and therefore black pillars on map and save screen. You could make a function that would store loading zone color values upon opening map / save screen and swap them with zeros to make it black. Then load the stored loading zone color values back upon closing map / save screen. It's not an elegant solution but it could work.

@elishacloud
Copy link
Owner Author

From @Bigmanjapan on March 19, 2018 18:45

I also managed to investigate an issue with James' split animation during boat cutscene.

In my sh2pc.exe file this 4 byte address sh2pc.exe+4BB78C (008BB78C) holds a value of FFFFFFFF (4294967295) before the boat cutscene is triggered for the first time and it gets nullified (value is changed to 00000000) upon triggering the cutscene. It stays nulled afterwards. If you reload and manually change the value back to FFFFFFFF and then trigger the cutscene again — James animation won't be split.

I guess a solution here could be making a function that would do a conditional check of sh2pc.exe+4BB78C being 00000000 and changing it to FFFFFFFF in such case. Since I don't know if that address has any impact on the gameplay somewhere else apart from that boat scene, I would make such function based on current room index or something that could make the check work only in location after Eddie's boss arena and before the actual boat sequence (pier location).

Edit: or you could simply NOP the function during initial game launch but again, I don't know if that function is responsible for anything else in the game.

@elishacloud
Copy link
Owner Author

From @Polymega on March 19, 2018 18:52

Mentioning @AeroWidescreen in this discussion.

@Bigmanjapan would you be able to find a way to keep the hanging meat loaded the entire time during this cutscene?

https://www.youtube.com/watch?v=XY5kRFLcYO8

Also, I didn't catch it at the time, but at the 0:35 mark in the video the meat directly behind Eddie also disappears.

@elishacloud
Copy link
Owner Author

From @mirh on March 19, 2018 19:14

Random stupid showerthought (aside of still thinking maybe this kind of stuff should go in the SH enhancement repo): there's a point where rewriting the engine starts to feel easier

@elishacloud
Copy link
Owner Author

From @Bigmanjapan on March 19, 2018 21:18

@jdkubiak what was the internal resolution in the game when you made that video? If I watch the cutscene in 1920x1080p internal resolution, then I won't observe the glitches you had.

https://youtu.be/Vt6zMl8aMJM (I have one glitch on 00:09 but I don't have ones you had)

Also your video is more "zoomed-in" than mine, which, I believe, is directly tied to the "meat" glitches. In SH speedrunning Discord server it was recently discovered that some camera aspects change depending on the resolution (making camera more tilted down if resolution is progressively lowered). I know how to control camera boundary boxes, trigger (switch) areas, projection, various rotations etc but I have no idea what is that dynamic parameter that is changed in accordance to resolution. Will search more.

@elishacloud
Copy link
Owner Author

From @Polymega on March 19, 2018 21:33

The internal resolution is set to 320 x 240 on mine. I believe this is the reason why. This is in reference to how the camera wasn't positioned correctly in certain areas of the game when a higher resolution was used injunction with the Widescreen Fix. Here is one video example:
https://www.youtube.com/watch?v=Eiq3XdYot14

Edit: Yeah, I see what you mean about my cutscene being more zoomed in now. Must be directly tied to the much smaller resolution.

@elishacloud
Copy link
Owner Author

From @AeroWidescreen on March 19, 2018 21:41

@Bigmanjapan

it was recently discovered that some camera aspects change depending on the resolution (making camera more tilted down if resolution is progressively lowered).

This was changed in the widescreen fix to have the camera always behave the way it does in 640x480. I don't know if that's the cause of this issue though.

@jdkubiak

Edit: Yeah, I see what you mean about my cutscene being more zoomed in now. Must be directly tied to the much smaller resolution.

Are you sure it's not because you have ReduceCutsceneFOV enabled?

@elishacloud
Copy link
Owner Author

From @Polymega on March 19, 2018 21:53

Are you sure it's not because you have ReduceCutsceneFOV enabled?

Ah! So many variables! Yes, that was the issue. When I disabled ReduceCutsceneFOV my camera was zoomed the same as @Bigmanjapan .

More importantly, when ReduceCutsceneFOV was disabled the "meat glitch" didn't happen except for one quick instance that is seen in Bigmanjapan's video at the 0:09 mark:
https://youtu.be/Vt6zMl8aMJM

@AeroWidescreen is there a way to disable ReduceCutsceneFOV just for this particular cutscene whether it's enabled or not by the user?

@elishacloud
Copy link
Owner Author

From @Polymega on March 19, 2018 21:55

*I personally think that quick glitch at the 0:09 mark is acceptable to not worry about if ReduceCutsceneFOV can be disabled for the entirety of the cutscene. That particular glitch at 0:09 is so fast, and at the edge of the screen, I wouldn't consider it to have a major impact on the tone/mood of the cutscene. And if advanced fog is enabled it would be even harder to notice.

@elishacloud
Copy link
Owner Author

From @Bigmanjapan on March 19, 2018 22:10

@AeroWidescreen I see, that's interesting. Seems that 640x480 camera fix solves more issues than it creates, so no point in fixing meat glitches by reverting it back to default. I will just in case try to adjust camera angles' values via game files to fix that one gitch at 0:09.

@elishacloud
Copy link
Owner Author

From @Bigmanjapan on March 19, 2018 22:37

Have the cursor (used for interacting with full screen images) default to center of the user's screen/resolution each time

Do you want to mimic a consoles' pointer which is always initially centered?

As far as I can tell on PC version mouse pointer's travel area is limited by 640x480 (512x480 visible area) size regardless of set resolution (pointer area gets "stretched" on screen area created by resolution). I guess it wouldn't be much of a problem to find a check that game engine has on entering 2D events (inventory, map, puzzles etc). Set mouse pointer coordinates to 256x240 each time the check is performed.

sh2pc.exe+541358 (00941358) = pointer horizontal position
sh2pc.exe+54135C (0094135C) = pointer vertical position

@elishacloud
Copy link
Owner Author

From @Polymega on March 19, 2018 22:55

Do you want to mimic a consoles' pointer which is always initially centered?

That may be preferable. This fix was suggested because when both Fix2D and FullscreenImages are enabled the cursor is initially completely off screen (this is because the fullscreen images are scaled to crop the letter boxing) during the first interactible fullscreen image.

You have to start moving the cursor around randomly until it comes back into view. But if the cursor was always centered by default you wouldn't have to wonder which direction the cursor is hiding off screen.

Here was the original thread on scaling the fullscreen images:
ThirteenAG/WidescreenFixesPack#337

@elishacloud
Copy link
Owner Author

From @AeroWidescreen on March 19, 2018 23:1

@Bigmanjapan
By the way, I think the solution you're proposing for the boat animation is great. I gave it a look a few weeks ago, but I had no luck finding anything. If I remember correctly, each cutscene has its own number assigned to it: 00, 01, 02, 03, etc. so changing the value back for that one cutscene should be trivial.

@elishacloud
Copy link
Owner Author

From @Polymega on March 23, 2018 15:53

@AeroWidescreen I may be completely off with my understanding of this but if you'd humor a non-programmer/-modder's thoughts:

So the internal resolution of the game's camera determines how severe the meat glitch is, yes? Meaning, if I were NOT using the WSF, and had the game's resolution set to something very small like 320 x 240, a lot of the hanging meat would disappear because it would be actually be off-camera in that tiny resolution? And so the larger the resolution the more meat will show due to the increase in camera size?

And the way the WSF works is that while the projection I'm seeing is 1920 x 1080 the game is "rendering" the environment under the pretense of 640 x 480? (Apologies for probably grossly minimizing this concept.)

You mentioned how you adjusted this to fix prevalent camera bugs while in-game here.

That fix was to alleviate "live" camera angles; ones that change on-the-fly depending on how you move James. Because the Eddie cutscene uses "pre-made" camera angles (the player can't adjust these) can you tell the WSF to temporarily change the internal resolution from 640 x 480 to something larger while this cutscene plays (by using the cutscene's unique identifier)? Then, when the cutscene ends, the WSF goes back to using 640 x 480 like before?

Again, I may be totally off mark here with all of this but if any of this is remotely how the WSF works/fixes things could that be a possibility to fix the meat glitch?

EDIT: This is all under the notion of a player having ReduceCutsceneFOV activated.

@elishacloud
Copy link
Owner Author

From @Bigmanjapan on April 5, 2018 15:58

By the way it is possible to make SH2 PC builds display Japanese language if you replace .mes files with those from an Xbox original build. Could make it a part of the project.

unknown

@elishacloud
Copy link
Owner Author

From @mirh on April 5, 2018 16:17

I don't know a thing about how this game works, but if any the target should just be have independent interface/subtitles/dubbing language.

@elishacloud
Copy link
Owner Author

From @Polymega on April 5, 2018 16:29

By the way it is possible to make SH2 PC display japanese language if you replaced .mes files with those from Xbox ISOs. Could make it a part of the project.

Nice! If you wouldn't mind sharing the .mes file I can add this as an option to the Installation Guide at a later date.

Are there additional language options for the subtitles as well in the Xbox version? (I no longer own an original Xbox to test...) Would the European Xbox releases have more language options than the North American versions?

@elishacloud
Copy link
Owner Author

From @Bigmanjapan on April 5, 2018 19:42

Are there additional language options for the subtitles as well in the Xbox version? (I no longer own an original Xbox to test...) Would the European Xbox releases have more language options than the North American versions?

As far as I remember Xbox versions work just like PS2 versions when it comes to language selection. NTSC-U and NTSC-J versions of both platforms have Japanese and English language available to select in Options menu. PAL versions of both patfroms have English, French, German, Italian, Spanish.

NTSC-U PC version have Japanese language "cut" and only have English available and PC PAL version have English, French, German, Italian, Spanish.

The thing is, these language selection restrictions are artificial. Every region version of every platfrom has all message files in their file structure and it is possible to select any language including Japanese by bypassing language selector restriction via memory editor.

There is an issue with PC build tho. Japanse message files in PC builds are "empty" and render Japanese text to "??? ??? ?????" signs. Transfering Japanese message files from an Xbox build solves this issue.

One additional issue with PC build is that there is no japanese text for PC menu (which appears when you press Esc button during gameplay), since there is no such menu on console versions and PC build was never released in Japan. Someone would have to make translations for menus and find a way to inject them into game's message file structure.

This video shows how easy it is to hack language selector and issues with original Japanese message files (this is done on NTSC-U version which only have English available by default): https://youtu.be/n3W73pCOZIc

Nice! If you wouldn't mind sharing the .mes file I can add this as an option to the Installation Guide at a later date.

Xbox_japanese_mes_files.zip

In conclusion, first step would be unlocking language selector by modyfing sh2pc.exe to provide access to all languages, second step would be adding lacking Japanese texts in the game's message structure.

Language selector address: sh2pc.exe+19BC006 (01DBC006) byte
Values are: 0=Japanese, 1=English, 2=French, 3=German, 4=Italian, 5=Spanish

@elishacloud
Copy link
Owner Author

From @Polymega on April 5, 2018 20:4

Thanks for this info! Accessibility to non-English speakers (Japanese in this case) would be very beneficial. With fans all around the world, inclusiveness would be great.

In conclusion, first step would be unlocking language selector by modyfing sh2pc.exe to provide access to all languages

So if this can be unlocked could users simply click the < and > arrows beside the language choice to switch? (The same as adjusting other options.) Theoretically it wouldn't crash the game or anything?

second step would be adding lacking Japanese texts in the game's message structure.

Would that be as simple as dropping the Japanese message files back into the PC game's directory? Or would there be more steps involved?

I understand now. I just saw all the different language .mes files under /data/etc/message/ . Each file ends in e (English), f (French), g (German), i (Italian), and j (Japanese).

@elishacloud
Copy link
Owner Author

From @Bigmanjapan on April 5, 2018 20:32

So if this can be unlocked could users simply click the < and > arrows beside the language choice to switch? (The same as adjusting other options.) Theoretically it wouldn't crash the game or anything?

In theory, yes. Languages should be switchable via game's own "<" and ">" buttons without any crashes. I do that in the video via memory scanner and game doesn't crash, no reason why it would crash once language selector is "unbound".

Would that be as simple as dropping the Japanese message files back into the PC game's directory? Or would there be more steps involved?

I don't know yet. I (or someone else) would have to see from what files menu polls it's text data and try to change it as an experiment.

To confirm: Your title screen shows "Director's Cut" on the logo. Do you mean that you are using NTSC .exe with a PAL install of the game?

I always thought that if there is an aura around texts in main menu, then it is an NTSC build, if there is a plain text, then it's a PAL build.

Either way, my build have only English available by default, so it should be NTSC one regardless of logo in the main menu.

@elishacloud
Copy link
Owner Author

From @Polymega on April 5, 2018 20:50

I always thought that if there is an aura around texts in main menu, then it is an NTSC build, if there is a plain text, then it's a PAL build.

I believe you are correct. But if you install the PAL version then swap out the .exe with the NTSC version you will keep the PAL menu background image but have the NTSC "fat" menu font. But the "fat" menu font is the only true menu font for this game. :)

@AeroWidescreen if this can be looked in to and patched in the WSF (or patching the actual .exe? But that would require people using only the .exe provided) I can include the corrected Japanese message files (after they've been tested) as a packaged download with the .exe on the Installation Guide no-CD step.

@elishacloud
Copy link
Owner Author

From @Bigmanjapan on April 7, 2018 9:58

More importantly, when ReduceCutsceneFOV was disabled the "meat glitch" didn't happen except for one quick instance that is seen in Bigmanjapan's video at the 0:09 mark:

What about increasing FOV slightly for that cutscene? Seems to solve the issue entirely: https://youtu.be/3z_9o7atcFc

It is probably possible to increase FOV even less (to stay closer to the original) than I did to solve the issue.

@jdkubiak @AeroWidescreen

@elishacloud
Copy link
Owner Author

From @Polymega on April 7, 2018 15:28

Nice! How much could the FOV be decreased (to stay closer to the original) while preserving all the hanging meat? Is there a set threshold/limit?

@elishacloud
Copy link
Owner Author

From @Bigmanjapan on April 11, 2018 16:33

In my tests the minimum amount of change needed for the meat to be loaded in fast enough is 12%.

Original FOV is 1.147019982.
New FOV is 1.147019982 * 0.88 =1,00937758416

@elishacloud
Copy link
Owner Author

From @AeroWidescreen on April 14, 2018 0:29

So for the cursor starting position, how about we modify the vertical boundaries so that it can't go off-screen to begin with? I was hesitant to do it before because I wasn't able to fix the other mouse problems until now.

Original value = 240
New value = 190

Vert Mouse Boundary (fullscreen images)
006B2210 43340000 // 190.0f
004A2D6C 000000B4 // 190 integer

Vert Gamepad Boundary (fullscreen images)
006B001C C3340000 // -190.0f
004A314F C3340000 // -190.0f
004A2DD2 C3340000 // -190.0f

Boundaries

@Bigmanjapan

In my tests the minimum amount of change needed for the meat to be loaded in fast enough is 12%.

Original FOV is 1.147019982.
New FOV is 1.147019982 * 0.88 =1,00937758416

Sorry, I forgot all about this. Too many topics right now. I'll see about this soon.

@elishacloud
Copy link
Owner Author

From @Polymega on April 14, 2018 19:0

how about we modify the vertical boundaries so that it can't go off-screen to begin with?

The primary purpose of centering the cursor was to help players if their cursor stayed off-screen from a previous puzzle, so if you can prevent it from going off screen to begin with then that would be an even better solution to the issue!

Never realized that could've been a solution; nice one, Aero.

@Polymega
Copy link
Collaborator

Thank you, sir.

Oh, and @AeroWidescreen I learned that the Advanced Filters option in the game is what toggles things like DoF, motion blur, and pseudo lighting bloom on/off. Just an FYI and for your records.

@Bullsquiddy
Copy link

Should this list be updated? A lot of these have been outright fixed.

@Polymega
Copy link
Collaborator

@angularGraphics are you still around these parts?

@angularGraphics
Copy link

You summoned me :)

@Polymega
Copy link
Collaborator

Polymega commented Dec 15, 2019

Hey!

So I believe I owe you an apology over my ditziness with the FMVs and their framerate. Allow me to explain:

For nearly two decades I believed the PS2's FMVs were 60 fps and that's... not technically true. The other month, when I opened a PSS (PS2 video) file on my computer and looked at its codec, it said it was actually 29.97 fps.

Then it dawned on me: The PS2 videos are at ~30p fps, and the PS2 plays them back at ~60i fps. Of course, and as you know, if you deinterlace 60i it turns into 30p.

My apology to you is that you've known this for years. As, in your ReadMe file for your FMV pack, you clearly wrote that the PS2 PSS videos are at 29.9X fps. For whatever silly reason, I never put two-and-two together that the PS2 console would play them back at 60i, which was never truly 60 full frames of video per second.

What does all that mean? Well, there isn't a true 60 (progressive) fps version of the FMVs out there, so making a true 60 fps enhanced FMV pack isn't technically possible.

Now, is there any truth/merit to all the gibberish I just wrote?

@angularGraphics
Copy link

angularGraphics commented Dec 15, 2019

I believe you got that wrong.

https://en.wikipedia.org/wiki/NTSC#Lines_and_refresh_rate
https://en.wikipedia.org/wiki/DVD-Video#Video_data

NTSC TV and DVD formats are 29.97i, that's how all common interlaced video is recorded, and that's how SH2 should be as well (which it is). As https://en.wikipedia.org/wiki/480i shows, 480i60 and 480i30 are different names for the same thing, so perhaps that's part of the confusion.

My understanding of it is that the interlacing part can be observed by seeing the "jaggies" or "mice teeth" in a frame which carries objects during motion. Which proves that a single frame of 29.97i actually consists of two "subframes", put together. Therefore a ~30i video actually carries information of 60 unique frames per second... interlaced together.

Therefore, there's nothing wrong with or missing from the 29.97i PS2 videos, they are exactly as they should have been.

What is missing, is another 30p from the original PC release, the Xbox release, the PS360 releases, and even my pack. Smoothly deinterlacing 30i produces a reconstruction of sorts of the original two "subframes" buried within, i.e. 60p output. This is how I did it, but then I proceeded to discard every other frame to halve the output to 30p for compatibility -if no other- reasons, as you know.

@Polymega
Copy link
Collaborator

I love being wrong and learning new things. I'm very amateur when it comes to videography and video editing, so I'd like to ask about interlacing in a little more detail, if you don't mind:

Therefore a ~30i video actually carries information of 60 unique frames per second... interlaced together.

The way I've always understood it, and from what I've read elsewhere, is that an interlaced frame has half the data of two different frames that makes up a single frame. Because there's only half data for two different frames on a full frame at any given frame, I thought it can't be possible to turn something like 30i into 60p?

From what I've read:

60i on the other hand, can’t just be dropped into a 24p timeline and slowed down because it takes two fields to create one frame, meaning you really only have 30 frames to start with, not 60.

A 60i video camera recording leads to effective 30 frames per second because 2 fields are required for one full image frame.

What makes this more confusing for me then is that you said the videos are actually ~30i. So, from my understanding, to turn interlaced into progressive you'd need to halve the previous frame rate. (So something like 60i = 30p, 30i = ... 15p?)

... but then you said 480i60 and 480i30 are different names for the same thing! What a mind twist!

Smoothly deinterlacing 30i produces a reconstruction of sorts of the original two "subframes" buried within, i.e. 60p output.

I think my confusion lies in here, with how it's possible to turn 30i into 60p with having each frame's data fully restored, and not using half the data from a previous frame to make up/carry over to the next frame? Seriously... what a mind-bender!

@angularGraphics
Copy link

angularGraphics commented Dec 15, 2019

If for each interlaced frame, you take its odd fields to form subframe1 (line 1, 3, 5, ...) and its even fields (line 2, 4, 6, ...) to form subframe2, you now have twice as many frames as what you started with. And then you let your PC or device do (hopefully) smart things to them. :)

@Polymega
Copy link
Collaborator

Asking for clarification; not to be argumentative or anything:

So for subframe1 that uses odd lines (1, 3, 5), where do you obtain the even lines to complete the frame? Because the even lines on that particular frame make up subframe2 now?

If you grab the even lines from the previous (or) next frame to complete the full frame image of subframe1, and grab the odd lines from the previous (or) next frame to complete the full frame image of subframe 2, you've duplicated a frame's worth of data because you had to use that data from a previous (or) next frame to complete the full, deinterlaced frame image, correct? And because you've duplicated that data, you'd drop that previous/next frame from the deinterlacing process, which ought to halve the framerate when deinterlacing?

Unless...

And then you let your PC or device do smart things to them. :)

Do you mean let software "fill in the blanks," so to speak, through something like interpolation?

If so, instead of cutting the frame rate in half to create true, full frames from the data, you preserve the frame rate and use half-frames with interpolation to fill in the blanks? And at that point the question would become which of those two scenarios is the better outcome?

Sorry for the dumb questions here. I'll probably admit defeat after this one if I'm still scratching my head over the whole process. :-p

@Polymega
Copy link
Collaborator

Most deinterlacing techniques fall under three broad groups:

  1. Field combination deinterlacing
  2. Field extension deinterlacing
  3. Motion compensation deinterlacing

I think I understand my own confusion now, if someone can confirm this for me:

I was always under the impression that interlaced footage actually contained a full frame, but was split in half over two frames. For example: Frame 3's odd lines and frame 4's even lines could restore a full, true, complete frame.

But that's not the case? A single interlaced frame contains half of two different frames, but the previous or proceeding frame is not the other (alternating lines) half of that frame, but instead an entirely new/different frame? Meaning, there are only half frames of all given frames, and combining the previous/next frame's alternating lines wouldn't create the true other half of that frame?

I hope that made sense. If that's the case, then that's where my confusion has always lied.

@Polymega
Copy link
Collaborator

Yes, I think that was my confusion the whole time. As an example, for 30i, it'd be something like:

1.  First field (1/60s) + second field (2/60s) = 1st interlaced frame
2.  First field (3/60s) + second field (4/60s) = 2nd interlaced frame
...
30. First field (59/60s) + second field (60/60s) = 30th interlaced frame

From the above, no two fields share the same time (X/60s), so you cannot take fields from one frame and alternating fields from another frame to create a "true," full frame as the times aren't the same.

So angularGraphics you would instead strip the alternating fields, make them their own frames (doubling the count), and fill in the blanks using a method like interpolation. I think I got it now.

My incorrect, preconceived notions that the next frame's alternating fields held the same time stamp as the previous frame's fields for interlaced footage is what was throwing me off.

@elishacloud
Copy link
Owner Author

Should this list be updated? A lot of these have been outright fixed.

@Polymega, let me know which ones are fixed and I can mark them as fixed. I believe the Room 205 items have been fixed?

Also, I can close this one out if we are tracking these somewhere else.

@Polymega
Copy link
Collaborator

Also, I can close this one out if we are tracking these somewhere else.

We can close this one if need be. I've mitigated the list to an Excel sheet to make things easier, but honestly, I haven't been keeping that Excel sheet as up-to-date as needed, either. (Although I have been updating a personal text document tracking all the new features that are finished, which will be arriving in the next update.)

@angularGraphics
If/when you'd like to discuss more about a "version 2.0" of your wonderful FMV pack, please feel free to open a dedicated ticket/post on the subject. I know we all have been waiting to try and make the game switch from 30 FPS (in-game) to 60 FPS (FMVs) correctly. We haven't made any strides on that yet, but it's still on the back-burner.

An ETA for it is undetermined at this time, but if you've been wanting to look back into this, perhaps the WIP files can be created for 60 FPS, but saved out as 30 FPS again in the meantime. Then, once we can get the game to switch to 60 for FMVs without issue, the 60 FPS versions can be readily swapped out? Only suggested if you've been itching to look back into it.

@elishacloud
Copy link
Owner Author

Thanks @Polymega. Closing this one. We can track the remaining issues separately.

For the 60 fps videos, we can open a new issue to track those. It would be great to support 60 fps for this game!

@mirh
Copy link

mirh commented Jan 3, 2020

Putting aside I don't personally mind framerate..
I'd just like to share with you the state of art as of "FMV revamp"
https://www.nexusmods.com/masseffect/mods/144?tab=description

@Polymega
Copy link
Collaborator

Polymega commented Jan 3, 2020

Putting aside I don't personally mind framerate..
I'd just like to share with you the state of art as of "FMV revamp"
https://www.nexusmods.com/masseffect/mods/144?tab=description

That does remind me @angularGraphics: I have a copy of GigaPixel AI. So if you'd ever want to pass the video images through this at any point of an upscale process, I can do that and send them back to you.

@Polymega
Copy link
Collaborator

Polymega commented Jan 3, 2020

I'm playing around with this a little and I think the default 640 x 384 playback that's used on all versions is actually... stretched? Check these out when I change them to 600 x 384; it looks more correct (I'm using the demuxed PS2 PSS videos as a base here):

image
image

^ Look at Maria's necklace pendant. It's more circular on 600 x 384.

image
image

^ James' face is more long than wide at 600 x 384, which looks more natural/accurate.

EDIT: It should be AssumeTFF() (top field first), not BFF.

EDIT 2: Here's the final script I used:

    SetFilterMTMode ("QTGMC", 2)
    FFMPEGSource2("movie.m2v", atrack=-2)
    /*Levels(16, 1, 235, 0, 255, coring=false)*/
    AssumeTFF()
    QTGMC(preset="Slower", EdiThreads=1)
    Spline64Resize(600,384)
    Prefetch(2)

The line that's commented out would change the levels to 0-255.

Change EdiThreads and Prefetch based on your PC specs, going off this person's suggestions. For me, I did this conversion on my weak laptop, so I used low values.

@Polymega
Copy link
Collaborator

Polymega commented Jan 4, 2020

Posting these things for shits n' giggles. After using avisynth to extract a deinterlaced, lossless image sequence (folks are saying QTGMC is one of the best deinterlacers), I ran some of the frames from the intro cutscene through ESRGAN and Gigapixel, and Gigapixel produced much more desirable results:

toilet0152

It was upscaled to 1280 x 819 (from 600 x 384, which was originally 512 x 384) and then vertically cropped down to 720. This also hides the weird upscale line you see at the bottom right (at the sink tile).

image
(Posting for posterity)

There may be even better adjustment settings within Gigapixel; right now I'm just fooling around with it. I've ran all the frames for the intro cutscene through this just to see what the full, end result would look like.

Cropped the image sequence in After Effects, re-saved out sequence, then used Bink's recommended settings for PS3 720 HD videos for the conversion/encoding.

image
(Posting for posterity)

Those settings could also be changed to be better, of course.

Anyway, here's that movie at 59.94 FPS upscaled (didn't both with inserting the audio):
https://drive.google.com/file/d/1kMEaXhIaCz7P5BSWeouJsCESJ96e2fIt/view?usp=sharing
(You can play it with VLC Player)

Again: I need to stress I'm just playing around with this (mostly because I just built a new, faster PC and want to run it through its paces). Not trying to step on any toes or anything.

@Polymega
Copy link
Collaborator

Polymega commented Jan 19, 2020

After AI upscaling various FMVs I don't think it's ideal to use this approach/method for Silent Hill 2's videos. I think a big part of the problem is that the videos are natively a little too small (512x384) and the style of the FMVs doesn't lend well to AI upscaling.

What I mean by that is the FMVs are naturally soft-looking by artistic design, so the AI upscaler struggles on certain FMVs/scenes to make the images sharper. Whenever the AI upscaler does make a scene look sharper, things like a character's eye lid or mouth will become "shifty" as it plays out in motion... it's a rather unsettling effect, but not in a good way.

Here's some test files I did using Gigapixel AI:
http://www.igotaletter.com/temp/sh2pc/FMV_AI_Upscale_Test.zip


Here are my notes on the test videos.
I recommend viewing the test videos on an LCD monitor to see all the details I'm about to mention:

deai

Doesn't even look like it went through an AI upscaler at all. The video is still surprisingly soft-looking, considering it came from AI upscaling. Visually it doesn't look any different than what's currently provided in the FMV Enhancement Pack.

hei & hakaba

Just like deai, there are certain camera cuts where it doesn't even look like it was AI upscaled. But other camera cuts it looks decent. I think FMVs that take place outside during the day don't bode well to AI upscaling. Again: I think this is because all of the FMVs are naturally soft-looking by default/by design.

knife

Looks pretty good.

toilet

Looks good, but this is where the AI upscaler really starts to fall short. The AI upscaler cannot consistently produce uniform levels for dark backgrounds. Once James starts to bend over to look at himself in the mirror, look at the wall to the right of James. The black levels start to go crazy. This is because Gigapixel works on a per-image basis; it doesn't understand that all of these upscaled images are meant to be uniformally played out in video form.

gero & korosu_a

Looks... okay. But pay attention to black levels around things like the toilet bowl or the overall background. The levels of these areas just go crazy as the video plays out. Again: This is because the AI upscaler doesn't know to keep these levels consistent for video usage, as it only knows to upscale on a per-image basis.

korosu_b & saikai

These two are the worst. In korosu_b, whenever the camera is on James, there's a "halo" of faint light going all around James' body. This again is a result of the AI upscaler's process. It's very bad looking (and very noticeably on LCD displays). The same goes for saikai: The background behind James is all over the place with constantly shifting levels.


After doing these tests I don't think using an AI upscaler is the way to go for SH2's FMVs. I think the nature of how these FMVs were made and presented doesn't lend them well to an AI approach.

While AI upscaling can make some FMVs (or portions within FMVs) look really good, it does not make all of the FMVs look good. And, to keep the visual presentation consistent across the board, I think we shouldn't do the AI upscaler. I think the more simple resize method with some conservative filters applied to them is the lesser of two evils.


Topaz Labs has released a beta version of Gigapixel meant for videos:
https://videoai.topazlabs.com/

There isn't a lot of reviews out for it yet but, from the ones I've read:

  • It does horribly on interlaced footage (which could be deinterlaced prior without problem).
  • It does bad on natively small videos (under 480 is no good, from what I've read, and the PS2 videos are 512x384 natively).
  • It does poorly on inherently noisy/lowish bitrate videos, which the SH2 FMVs are.

In the meantime, I took a deep dive into avisynth and made a version of the FMVs where they're scaled to horizontally fit a 16:9 aspect ratio, and vertically cropped. This removes the pillarboxing and doesn't stretch the FMVs. This method of scaling/cropping the FMVs is also used in the latest development builds of PCSX2, when playing the game using its Widescreen Patch feature, by the way.

I also partially remade the ending credits to make the text within them much more legible at higher resolutions.

The approach/methodology angularGraphic's used is what I took as well, with this revisit to the FMVs.

http://www.enhanced.townofsilenthill.com/SH2/files/SH2PC_Enhanced_FMV_Pack_1.5.0.zip

I made this version 1.5 so, if in the future whenever angularGraphics is ready, the 2.0 version number for the FMVs will be reserved for his work. I'll include this updated version of the FMVs with the next update release, but if you want, you can go ahead and download it now from the link right above.

@angularGraphics
Copy link

I haven't seen how they look yet, but very nice that you experimented!

I imagine the archive has Bink encoded files, right?

Unlike your above screenshot, I hope you used 64 allocated frames and 0 for audio compress level (max possible values).

If not, if you still have the source files, I would highly recommend re-encoding them with these settings. Bink is an old codec, and every bit helps.

@Polymega
Copy link
Collaborator

Polymega commented Jan 19, 2020

I did 0 for the audio compression, but I did not do 64 for the allocated frames (I used 12 based on Bink's recommendation for CGI videos). I have all the working files saved so I can redo them at 64 allocated frames. Give me a day or two and I'll update/replace the current download for it with the bumped allocated frames. 👍

Edit:

I imagine the archive has Bink encoded files, right?

Yes sir. The working files on my PC amount to many, many gigs worth of data, so only the download has the final Bink files. :)

Data rate: 2200000 (credits, end/ending, end_dog, end_wish, and water use 1200000 to keep their file sizes down)
Keep peak data rate: Under a multiple of 3.0
Allocated frames: 12 64
Frame rate: 29.97
Audio compression: 0

@Polymega
Copy link
Collaborator

I updated the videos to have 64 allocated frames. Same link as before:
http://www.enhanced.townofsilenthill.com/SH2/files/SH2PC_Enhanced_FMV_Pack_1.5.0.zip

@angstsmurf
Copy link

I wouldn't dismiss AI upscaling the videos just yet. The strength of ESRGAN and similar open source technology is that anyone (at least anyone with a very powerful GPU and lots and lots of free time) can train it to create custom models for exactly the kind of image they want to upscale.

In this case, the basic process would be something like a) find some HD video of very high quality in the same style as the Silent Hill 2 videos, b) take screenshots of this, shrink and compress them to give them the same size and kind of artefacts as the original SH2 videos, and c) let ESRGAN train on them (by comparing the compressed low-quality images to their high-quality counterparts) for a couple of days or more. Of course, each step has many pitfalls.

If anyone is interested, here is a good place to start: https://upscale.wiki

The field of image upscaling is obviously in heavy development, so the technology will likely be vastly more powerful and easy to use in a couple of years. Things like this look very promising.

@Polymega
Copy link
Collaborator

Polymega commented Jan 20, 2020

I should've worded my previous post better on the matter of AI upscaling. I personally haven't dismissed the method/process as a whole, but I did dismiss it through the use of Gigapixel (the AI upscaler tool I have at my disposal).

Aero_ and I tried ESRGAN as well, but, as you've mentioned, without properly training it to make a model to suit your specific needs, you won't get results you're happy with. I'd love to try and attempt to train such an algorithm, but I personally don't have the knowledge, nor can I currently devote any amount of serious time to learn more about it at this point, to do anything beneficial and worthwhile on this front.

The field of image upscaling is obviously in heavy development, so the technology will likely be vastly more powerful and easy to use in a couple of years. Things like this look very promising.

I think you said it best here. :) I'm excited to see how far the entire field of neural networking progresses as time goes on. It can only get better, easier, and faster to use for the common user which is nothing but a win, win, win.

elishacloud pushed a commit that referenced this issue Jan 9, 2023
bgm and pause menu on fade fixes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants