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
598 stars 42 forks source link

Camera clipping and problem on the menu #135

Closed renan-de-souza closed 3 years ago

renan-de-souza commented 5 years ago

I've noticed a missing camera fix in apartment 210: https://youtu.be/TraBaCoqEn4

Speaking of camera fixes, has anyone had this problem? https://youtu.be/BaE7RAGcFsQ - I loaded my save file, and that happened. https://youtu.be/uDbZJgGYSbY - Once again, when I was about to save. https://youtu.be/UNqEc_zfRmw - This happened to me almost everytime I was near the stairs.

~~And I also noticed a weird problem on the menu: https://youtu.be/VNdJleKwIrY - This happens in every language other than English. It also happens on my Portuguese translation.~~

Polymega commented 5 years ago

Great catches!!

I've noticed a missing camera fix in apartment 210: https://youtu.be/TraBaCoqEn4

I'll tag @Bigmanjapan, as he fixes these particular problems. Bigmanjapan: This is ap01.cam. The clip is more prominent if you walk into the bathroom backwards like renan-de-souza did.

Speaking of camera fixes, has anyone had this problem?

Yes, this is a "quirk" in the PC version. It may also happen in the console versions but I can't recall if I've experienced this on the console builds or not. This is a vanilla PC quirk, and I'm unsure if anything can be done to address it. It doesn't happen very often so I'm also not sure if it's worth looking in to extensively at this time.

And I also noticed a weird problem on the menu: https://youtu.be/VNdJleKwIrY

@Belek666 there is a misalignment in text for the Options > Game Options > Blood Color selection for all languages besides English. This seems to be the only option line that experiences the misalignment. This happens in the 1.0 executable but not the 1.1 or DC exe (it looks correct in 1.1 & DC).

Thank you for finding these issues, renan-de-souza!

renan-de-souza commented 5 years ago

Thank YOU guys for fixing all of these problems! It was my first time playing the PC version (I've always avoided it, but thanks to SH2:EE I finally gave it a chance), so I'm not familiar with the problems inherent to the PC port.

Anyway, there were a few more things I've noticed while playing, actually. I didn't wanna post them all at once 'cause I figured it'll be too much to look into, but... here it is:

1) Since I was checking to see if my translation had any typos, I always read the memos in-game and then read them again on the Item Screen. However, when I went to check the Carbon Paper Imprint memo on the Item Screen, I got no background image.

That only happened when I played on Hard (Riddle Difficulty). When I played the game again, on Normal (Riddle Difficulty), the background showed like it's supposed to:

2) Speaking of these background images, when I was playing BFAW, I got Amy's birthday card, and had no problem with it. But when I entered the Item Screen and clicked on "Examine".

3) Okay, I'm probably the only one bothered by this, but the patient's diary (found on the roof of Brookhaven Hospital) doesn't display the final line properly.

4) The lighting has been greatly improved, but there's this part in BFAW that could see some improvements:

https://youtu.be/Pvd2VxdsUGE

5) Also on BFAW, if you stand at this particular point and try to move a bit to the left, you'll see some of the texture missing (on the car):

https://youtu.be/ADHdMDsV-Io

6) You guys fixed the flicker in room 312, but there's also this flicker in a single jail bar in this scene:

https://youtu.be/7dWp3JIpkRs - noticeable at 0:10-0:13 and 0:17-0:20. Definitely noticeable at "1:58-2:17" (if you can't see it thanks to YouTube's video compression, you'll notice it while playing)

this bar Pay attention to this bar.

7) For some reason, all of the subtitles in room 312 have a weird "glow". This affect all texts (like checking the door, the VCR, the TV, the notepad) and dialogues (the following cutscene with Laura), but it doesn't affect the text in the videotape. Compare it to the subtitles everywhere else and you'll see that they look like "bold" letters.

https://youtu.be/YW6q0N4AlHE

I know all of this sounded like nitpick (and it probably is), but I just love this game just as much as you do, so... sorry if that was too much.

Polymega commented 5 years ago

My goodness, you and I are cut from the same cloth. :) Many of these issues are things I (and probably others) have been aware. Some of them are currently being looked into as well!

However, when I went to check the Carbon Paper Imprint memo on the Item Screen, I got no background image. That only happened when I played on Hard (Riddle Difficulty).

Thank you, we'll take a look into this soon.

Speaking of these background images, when I was playing BFAW, I got Amy's birthday card, and had no problem with it. But when I entered the Item Screen and clicked on "Examine", I got this: As you can see, the image wasn't fullscreen anymore.

I'm willing to bet this image was accidentally left out of the d3d8.dat file list. If that's the case, it's a very simple fix. I'll check on this soon.

Okay, I'm probably the only one bothered by this, but the patient's diary (found on the roof of Brookhaven Hospital) doesn't display the final line properly:

Yeah... I believe @AeroWidescreen fixed that some time ago over at the WSF project? He's tagged so we can see what he says about that and why that's returned.

The lighting has been greatly improved, but there's this part in BFAW that could see some improvements:

We really are the same... this is crazy. :) I'll try and explain why this is: When you go up the stairs the point in which the camera changes is at a different point/elevation compared to when you go back down the stairs and the camera changes back. Team Silent scripted that shadow change to happen when the camera changes while going up. But because the camera changes at a different point on the stairs when going back down, the shadow change is still triggered by the point in which the camera would change when going up. I hope that made sense.

I played around with this some months back and was able to keep the shadows on permanently. Unfortunately, when I did this, it created bad-looking shadow casting shapes along the bottom of the staircase. This is surely why Team Silent scripted the shadows to turn off once you're at the bottom of the stairs. Unfortunately, I don't think anything can be done about that.

Also on BFAW, if you stand at this particular point and try to move a bit to the left, you'll see some of the texture missing (on the car):

Seriously... I think you and I are the same. :) I tried playing with some addresses a few months back for this as well. I haven't found anything to fix this problem yet. I didn't bring this up to anyone else on the team as I didn't feel it's that big of a deal for them to look into, as I doubt most people would notice.

This also happens on James' campaign, too. But it's harder to notice when playing as him. I'll keep looking into this periodically, so the other (more competent) team members can work on enhancing and fixing the bigger issues.

You guys fixed the flicker in room 312, but there's also this flicker in a single jail bar in this scene:

I can't see it well on the YouTube video, but I'll take a peak in-game at a later time. To be honest, for this one, we probably won't do anything about it due to how insignificant/unnoticeable it surely is to most players. Shadow behavior wasn't perfect in this game to begin with, so we can allow some wiggle room with this type of behavior. The shadow flicker in Room 312 was very noticeable which is why it was addressed.

For some reason, all of the subtitles in room 312 have a weird "glow".

This is because there's a post-processing bloom effect on the patio windows and the subtitle layer is also being affected by the bloom. I've submitted a fix for this, but it will need to be vetted by some of our other team members: https://github.com/elishacloud/Silent-Hill-2-Enhancements/issues/66#issuecomment-498954718

Semi-related, but the closet bar blur in the apartment cutscene sits on top of the noise grain, whereas the noise grain should sit on top. I've asked Nekorun if he could help us with that. He's gonna try and help us with that and, depending on his outcome, we'll go from there.

Thanks again for your notes on all this! You have an eagle eye!

Polymega commented 5 years ago

Speaking of these background images, when I was playing BFAW, I got Amy's birthday card, and had no problem with it. But when I entered the Item Screen and clicked on "Examine", I got this: As you can see, the image wasn't fullscreen anymore.

Hmm... that texture is indeed included within the d3d8.dat file. It also behaves/shows correctly when Maria first picks up the present off the ground. So something else is affecting this particular image when examined from the inventory. @AeroWidescreen

However, when I went to check the Carbon Paper Imprint memo on the Item Screen, I got no background image. That only happened when I played on Hard (Riddle Difficulty).

No solution yet, but this happens on both Hard and Extra riddle difficulty. You can set Riddle Level (0-E, 1-N, 2-H, 3-X) - sh2pc.exe+19BBFF5 (01DBBFF5) byte before examining the typewriter for testing.

The hex for this fullscreen image that's being pulled up within the memos on hard/extra riddle difficulty for sh2pc.exe+19BC070 (01DBC070) 4 byte is 0000A344, whereas it should be 00000038.

Also on BFAW, if you stand at this particular point and try to move a bit to the left, you'll see some of the texture missing (on the car): https://youtu.be/ADHdMDsV-Io

You know, playing with this some more, it looks to be an issue with either occlusion or frustum culling? Some sort of volume or mesh data possibly wasn't set right for this truck so pieces get occluded before fully leaving the camera? @FrozenFish24 recently found bounding boxes for frustum culling, so it could be worth tinkering a bit just to see? The .map file is cc11.map.

Edit: This looks to be an intended behavior for the game engine, as other dynamically-loaded objects (such as other cars) illustrate the same behavior: https://youtu.be/MTHuKBJYJGc

What that tells me is the camera angle is in such a way that affects the truck when using wider aspect ratios. But maybe FrozenFish24 would want to see if changing the culling bounding box could fix it still?

AeroWidescreen commented 5 years ago

Yeah... I believe @AeroWidescreen fixed that some time ago over at the WSF project? He's tagged so we can see what he says about that and why that's returned.

Only the alignment was fixed because it wasn't being centered before. The lines are spaced like that in the vanilla game I believe. It looks better at lower resolutions.

Hmm... that texture is indeed included within the d3d8.dat file. It also behaves/shows correctly when Maria first picks up the present off the ground. So something else is affecting this particular image when examined from the inventory.

It's because FullscreenImages checks if the inventory menu is active and disables itself. This was done back when we hardcoded the image IDs in the widescreen fix and one of the IDs matched the inventory image of the Director's Cut (EU) version.

I should be able to remove it myself through a pull request, assuming I don't discover any issues with doing so.

Polymega commented 5 years ago

The hex for this fullscreen image that's being pulled up within the memos on hard/extra riddle difficulty for sh2pc.exe+19BC070 (01DBC070) 4 byte is 0000A344, whereas it should be 00000038.

Figured this one out.

The 0000A344 is correct. The games pulls hsp\p_carbon.tex for this image when James first reads it on the typewriter and in the memos for beginner/normal riddle difficulty. However, the game is pulling up hsp\carbon.tex for the memos on hard/extra riddle difficulty. This is confirmed by looking at the header in a hex program; carbon.tex contains 0000A344.

When pulled up in the SH Texture Viewer it looks like this, saying it's a "8bpp" texture file:

image

This is telling the game the texture is "8ppp":

image

Changing it to this makes it read as a DXT1 texture:

image

I then copied all the hex body data from p_carbon.tex and pasted it into carbon.tex's body.

This fix will be included in the next update for the project.

Polymega commented 5 years ago

PS @AeroWidescreen - It seems to be behaving fine but you may want to add data\pic\hsp\carbon.tex to the d3d8.dat list to play things safe?

Edit: I also added this to our Excel sheet.

Edit 2: That texture needs to be included in the .dat file. I thought I had removed it before testing and it seemed fine but maybe I forgot to save changes to the .dat file.

Bigmanjapan commented 5 years ago

I'll tag @Bigmanjapan, as he fixes these particular problems. Bigmanjapan: This is ap01.cam. The clip is more prominent if you walk into the bathroom backwards like renan-de-souza did.

ap01.zip

I then copied all the hex body data from p_carbon.tex and pasted it into carbon.tex's body.

Aren't the actual typewriter image and the memo entry image supposed to be visually different?

At least on PS2 memo entry image has additional red color on the typewriter's keys:

PSCX2_SLUS20228GH_carbon_reading

PSCX2_SLUS20228GH_carbon_memo_menu

Doesn't happen on Xbox original though:

VOD Screenshot 2019-06-16 15-12-38

VOD Screenshot 2019-06-16 15-12-52

Polymega commented 5 years ago

ap01.zip

Thank you, sir.

Aren't the actual typewriter image and the memo entry image supposed to be visually different? At least on PS2 memo entry image has additional red color on the typewriter's keys:

Good eye! I looked into this earlier and it is simply the way the PS2 (or maybe only PCSX2?) renders the black overlay on top of the image. I checked and the typewriter image is the same between carbon.tex and p_carbon.tex. However, when you re-read the note through your Memos, the game overlays a black image at X% opacity to slightly darken the typewrite image.

On PS2/PCSX2, this overlay makes yellow parts of the image appear more red. Not sure why it does that. The way it shows/renders on Xbox/PC is the correct way it should look (as it would look the same when done through something like Photoshop).

Here's another example from PCSX2. The first time you read this article:

image

When you read it again in your Memos:

image

Polymega commented 5 years ago

You guys fixed the flicker in room 312, but there's also this flicker in a single jail bar in this scene:

I looked into this for a moment. It's not a shadow flicker as I disabled shadows before initiating this cutscene and it still happens.

I also checked PS2/PCSX2 and it happens there, too. It honestly looks like it might be worse on the PS2 version as it seems to affect more bars. This could either be caused by lighting values in the room or maybe there's something going on with the geometry's normals for the bars. Hard to say.

Bigmanjapan commented 5 years ago

I looked into this for a moment. It's not a shadow flicker as I disabled shadows before initiating this cutscene and it still happens.

If something is present on screen (especially if it moves), then it could be corrupted. I can try doing the same routine I did for the chair shadow in room 312 to disable this flicker.

Bigmanjapan commented 5 years ago

lighting values in the room or maybe there's something going on with the geometry's normals for the bars

Seems about right. Definitely not an issue with noise effect, fog or shadows casted by characters. If you crank up the room's brightness values, then the flicker would go away with the rest of the room's shadows. It also stops if a cutscene camera is suspended and remains static (or if you observe the bars with a debug camera which is also static).

Maybe some property of the light source in the room could be changed to fix the flicker since the circular brightened up area on the front of the bars is not painted but generated by the game engine. Also there is a possibility that some part of flashlight code interfering despite it being visually disabled.

ps85.map

image

Polymega commented 5 years ago

It's the geometry. The prison bars are duplicated within each other. In the video below, you are going to see me delete faces off of the vertical prison bars, only to find another face literally directly underneath it, but at the same position as the previous face:

https://youtu.be/BRL90l2_uiQ

It looks like Team Silent accidentally duplicated the prison bars on top of each other which creates the weird-looking render effect in-game. If the duplicated geometry can be removed, it'll fix the render problem.

@FrozenFish24 if I may ping you on this one, too?

Polymega commented 5 years ago

By the way, here's what the bottom of the stairs looks like when you keep the shadows enabled:

sh2pc 2019-07-02 21-22-06

The shadow at the top right (obvious one) and some shadow lines around the light bulb.

If you'd want to keep the shadows always enabled (whenever the candle is lit) you could possibly change the .cam positioning at this angle to hide the shadow parts. I'm not sure if it can be done in such a way where the camera angle still looks good?

sh2pc.exe+19BBDA6 (01DBBDA6) byte Find what accesses this address while the candle is lit, trigger the shadows on/off, then nop the following instruction: 005A789A - 66 89 3D A6BDDB01 - mov [01DBBDA6],di

Polymega commented 5 years ago

@renan-de-souza Belek666 fixed the horizontal line in the Hospital diary, to make it easier to see. This will be released in a future update:

sh2pc 2019-07-18 12-51-29

renan-de-souza commented 5 years ago

My goodness, you and I are cut from the same cloth. :) We really are the same... this is crazy. :)

@Polymega "You and me are the same. We're not like other people. Don't you know that?!"

It's been so long since I last posted here. It always amazes me to see all the progress you've made. But I do have two more things to share here. One can be corrected very easily (I think) and the other is... just silly.

So I was playing SH2 the other day and I noticed something odd for the very first time. Since I always play with noise filter on, I had to take a screenshot from someone else's gameplay. Here, take a look:

SH2 1

In case you didn't notice what's wrong, let me make that clear:

SH2 2

"DEPT" is wrong. It doesn't follow the same orientation as the rest of the words. It's flipped. How it's supposed to be (in yellow):

SH2 3

It seems weird that Team Silent made that mistake, but again I think it can be corrected very easily.

And one more thing I'd like to share: https://www.youtube.com/watch?v=YZqWn5cLtVg

I know this also happens in the PS2 version, but... c'mon. That actually made me laugh. :D I don't think anything can be done about that but I think it's funny anyway.

I just noticed something: Abstract Daddy doesn't cast a shadow on the door.

Polymega commented 4 years ago

I just noticed something: Abstract Daddy doesn't cast a shadow on the door.

This will be fixed in the next update. Currently, the PC version doesn't allow dynamic objects (objects that move or can be interacted with, such as characters/enemies or that door as Angela opens it during the cutscene) to receive shadows cast upon them. We refer to this as "self shadows."

Both self and soft shadows will be restored in the next update: https://twitter.com/WhereAllBegins/status/1177743450915168256 https://www.youtube.com/watch?v=oAwdABR4sqs

Polymega commented 3 years ago

I'm going to close this ticket. Most of the issues have been looked into and/or resolved. The remaining things we're probably not going to address, such as fixing UV mapping for certain geometry, because it's not a top concern for us. Thanks for all your notes, renan-de-souza!