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

Help Needed: Specialized Room Adjustments #63

Closed
Polymega opened this issue Nov 7, 2018 · 137 comments
Closed

Help Needed: Specialized Room Adjustments #63

Polymega opened this issue Nov 7, 2018 · 137 comments

Comments

@Polymega
Copy link
Collaborator

Polymega commented Nov 7, 2018

@Bigmanjapan

Continuing from email conversation here are details about other rooms/areas that could use some love. Some of these have been discussed in the past but will be posted here just to make them easier to find/discuss, if needed:

Hotel Room 312 Chair Shadow (rr91.map)

The chair James sits on while watching the VHS tape doesn't cast a shadow while the cutscene plays. However, both before and after the cutscene the chair has a shadow once more:

image

Here you can also see a video of the chair regaining its shadow once the cutscene ends:
https://youtu.be/JH109aNOpCA

This is a problem because, without the chair's shadow during the cutscene, we see only James' shadow and during certain parts of the cutscene chunks of his shadow are masked out:

image

image

I studied the parts of James' shadow that are bugged/masked out and it seems to actually make an abstract outline of where the chair's shadow should actually be.

And here is a PCSX2 (PS2) screenshot showing that the chair should have its shadow during this part:

image

If you watch the video link from above, we can see that James' can cast his shadow on the chair while the chair itself casts its own shadow (after the cutscene ends).

Since we know it's possible for the chair to cast its own shadow and the chair can also receive James' shadow, is there then anyway to restore the shadow to this chair during the cutscene?

@Polymega
Copy link
Collaborator Author

Polymega commented Nov 7, 2018

FIXED! Prison hallway hole lights (ps53.map)

This one was mentioned before but adding here for posterity: The tube lights in this prison hallway hole room aren't "lit" and instead affected by James' flashlight. When his light is off they're pitch black and when his light is on they're dulled:

image

Whereas they should always be lit (with no other lighting influencing them) as seen here on the PCSX2 (PS2) version:

image

Is there a way to restore these lights so that they're always lit?

@Polymega
Copy link
Collaborator Author

Polymega commented Nov 7, 2018

The Dormant Mannequin (Woodside Rm 205)

Main thread here

This room is a complete mess and the PC version of this game is trying to do everything it can to ruin the surprise.

However, thanks to you Bigmanjapan, we now know how to darken the dynamic objects in this room before acquiring the light and we can now also fix the pool of blood when both a) quick loading into the room before getting the flashlight and b) if the Mannequin dies on the carpet afterwards.

The last two things to fix? 1) Removing the shine from the mannequin before getting the light (to make the surprise more... surprising) and 2) preventing the mannequin from "flipping" when coming to life if the player quick loads into the room before getting the light.

Now, both of these things aren't necessary to have fixed (the most important bug to fix was darkening the dynamic objects) but, between the two remaining fixes, I'd say removing the shine on the mannequin before acquiring the flashlight is more important between the two.

Why? Because the chances of someone quick saving then quick loading in this particular room before acquiring the light are probably slim. If someone were to enter this room and see a beacon of light off to the side they're very likely to acquire that before doing anything else in this room ("Ooooh! Shiny!")

Because of that, I'd wager many people won't ever experience the mannequin incorrectly flipping from quick loading back into this room. However, removing the shine on the mannequin would be much more beneficial to hide the surprise that awaits them...

If I may ask: Between the two remaining fixes for this room, can removing the shine be the priority and its fixed shared even if the other issue can't/hasn't been found yet?

@Bullsquiddy
Copy link

Probably unhelpful to point out, but the shadows during that cutscene in the PC version also appear to be darker. Is that an extension of it lacking soft shadows?

@Polymega
Copy link
Collaborator Author

Polymega commented Nov 15, 2018

Is that an extension of it lacking soft shadows?

I'd say that's correct. If/when we find the right person(s) to implement soft shadows I was planning on asking about if the values of the shadows could also be brightened some; as adjusting that would be the time to do so (with someone editing the shadows).

@Polymega
Copy link
Collaborator Author

Polymega commented Nov 27, 2018

FIXED! ap18.cam

Bigmanjapan, while in the closet, can the camera be moved to the right to hide the void? With Cheat Engine, changing sh2pc.exe+1B810F8 (float) [Camera Z] to -101390 fixes it.

Ignore; this was an issue with Nvidia cards hiding chunks of the wall when the camera is too close.

004

@Bigmanjapan
Copy link

Bigmanjapan commented Nov 27, 2018

@Polymega

This is how that camera angle looks in my build:

default

Are you sure it's not something you've done or some other code of Ehanced Edition interfering?
I don't update the build I use for research that often, so my build could lack the code the accidentaly breaks this camera angle. Try using a default build with 16:9 AR hack only to see how the camera angle behaves.

This camera angle is not actually stored in ap18.cam file, it's stored directly in sh2pc.exe.

Some addresses that control this camera angle:

sh2pc.exe+4E0FA8 (008E0FA8) float — tilt with elliptical trajectory
sh2pc.exe+4E0FAC (008E0FAC) float — panning with elliptical trajectory
sh2pc.exe+4E0FB8 (008E0FB8) float — tilt
sh2pc.exe+4E0FAC (008E0FBC) float — panning
sh2pc.exe+4E0FD4 (008E0FD4) float — roll

It seems that there is no X / Y / Z coodrinates for this camera angle, it's anchor point is calculated via several addresses that have elliptical trajectories instead of straight X / Y / Z lines. I've seen such design in Fatal Frame games long time ago. The whole store in the sh2pc.exe thing is probably due to the fact that this camera angle needs to be disabled after the key is picked up and once James steps out of the closet after picking up the key.

Changes to this camera angle could be made via hex injection directly to sh2pc.exe. The addresses offsets are the same minus 00400000 module: 0x4E0FA8, 0x4E0FAC etc There is always a possibility that some other camera angle polls values from these addresses but I highly doubt that.

Interesting that if I save while standing in the closet, then reload, the game will output black screen. One needs to step out of the closet and walk back in to initiate the angle. This suspiciously reminds me of the camera transfer glitch I was getting while running Maria's scenario: https://youtu.be/oZYm5bDslto

Doesn't happen on PCSX2 if I try to use debug save function in the closet and then reload it. Once Cxbx-Reloaded is developed more it will be interesting to see if the bug is present in Xbox builds.

@Polymega
Copy link
Collaborator Author

Polymega commented Nov 27, 2018

Are you sure it's not something you've done or some other code of Ehanced Edition interfering?

This is interesting. On my laptop my camera angle in here looks like yours. Let me go home tonight and re-test this area on my main computer again. Maybe I had remnants of a custom camera adjustment here or something...

Ignore; this was an issue with Nvidia cards hiding chunks of the wall when the camera is too close.

Interesting that if I save while standing in the closet, then reload, the game will output black screen.

Oh wow. From 15 years of playing the PC game I've never quick saved in there to have this happen.

A possible fix would be IF in room ID AND a certain camera angle is active THEN disable quick save feature. But this is under the presumption that we know how to easily disable quick save for a certain area.

However...... I personally think this bug is so circumstantial it wouldn't be worth worrying much about. It could be placed lower on the wishlist of things to fix.

@Bigmanjapan
Copy link

Better solution would be to figure out why this camera angle only initializes when James steps into the trigger area and not when James is spawned directly on it.

At first I thought that on PC version trigger for that angle is made via a line while on PS2 it's an actual rectangular area. Not the case. PC version's trigger area is also a rectangular one but actually needs stepping into to get activated for some reason.

@Polymega
Copy link
Collaborator Author

Polymega commented Nov 29, 2018

lol! @Bigmanjapan it's another damn Nvidia bug. When I used my Nvidia PC with WineD3D the closet camera looks like yours. When I used my Nvidia PC without WineD3D it shows the void. My laptop (using Intel graphics) also looks fine.

Since there's no easy way to fix this camera let's just ignore this one. It's not that big of a deal when there are other things more important to fix. lol this game hates Nvidia cards...

Ooooh! Actually I bet this is chunks of the wall disappearing due to the already-known Nvidia bug. Okay, yeah, this will eventually be fixed then and the camera angle has been correct the whole time there.

@Polymega
Copy link
Collaborator Author

Polymega commented Dec 1, 2018

FIXED! ap88.map

@Bigmanjapan there's a few flat poly planes/textures that should be brightened in this room. It looks either the address that controls its brightness isn't set right or the address to adjust the brightness isn't there to begin with for the PC version:

PC:

image

PCSX2:

image

Here's what it looks like from the other side:
image

@Bigmanjapan
Copy link

Bigmanjapan commented Dec 3, 2018

ap88.map
there's a few flat poly planes/textures that should be brightened in this room.

For some reason surface color of that element is controlled via cover-up fog addresses (which is used to create corners shadows indoors):

sh2pc.exe+542C20 (00942C20) byte — Cover-up fog R
sh2pc.exe+542C21 (00942C21) byte — Cover-up fog G
sh2pc.exe+542C22 (00942C22) byte — Cover-up fog B
sh2pc.exe+542C30 (00942C30) float — Cover-up fog front line
sh2pc.exe+542C34 (00942C34) float — Cover-up fog back line
sh2pc.exe+542C3C (00942C3C) float — Cover-up fog intensity

The issue here is that when you bright it up, shadows in the corners becomes brighter too. You can crank shadows down via intensity address but that would mess with the original room design.

Also similar thing happens with prison hallway hole lights (ps53.map). When James flashlight is off, black colour on the lights is also rendered by fog addresses for some reason. It only renders proper texture on the lights when James flashlight is on. I think the prison lights and Blue Creek windows issues might have the same root.

default

default

Xbox builds have these issues too.

@Polymega
Copy link
Collaborator Author

Polymega commented Dec 4, 2018

Thanks for looking into this, Bigmanjapan.

If the addresses/functions are missing to make these particular materials/shaders fully illuminated perhaps we may ask @FrozenFish24 to see if he could perform magic on the vertex/pixel shader calls for these particular pieces of geometry? Similar to how the WineD3D wall issues became fixed?

I have no earthly clue if such a thing is even possible or wise to do so... but:

Here's a link to Intel Frame Analyzer screen grabs for both ap88.map and ps53.map:
http://www.igotaletter.com/temp/sh2pc/sh2pc_intel_frame_grabs.zip

There are two versions of each screen grab: One with the flashlight on, and the other with the flashlight off.

For ap88.map here is the geometry in question:

image

For ps53.map here is the geometry in question:

image

As you all know by now, I am no programmer. But I was able to incorrectly brighten these geometry pieces by altering the pixel shader code. For the halogen lights in ps53.map:

image

I changed def c3, 0, 0, 0, 0 to def c3, 1, 1, 1, 1

I know that doesn't help any but it shows that maybe there's something there that can be done?

@Polymega
Copy link
Collaborator Author

Polymega commented Dec 5, 2018

Got it working in the Frame Analyzer! Okay, here's what I did:

I captured another scene where the halogen lights worked. In this case, the butterfly room in Woodside Apartments:

image

I then copied the vertex shader code from this geometry and pasted it directly as-is to the halogen light geometry in the prison:

image

and the windows for the apartment staircase:

image

This worked--at least through the Intel Graphics Frame Analyzer--for both versions of each scene: When James flashlight was both on and off.

Here is the code:

    vs_1_1
    dcl_position v0
    dcl_texcoord v7
    mov r11, c0
    mov r1, c0
    mov oD1, c0
    mov oD0, c0
    mov oT2, c0
    mov oT1, c0
    mov oT0, c0
    dp4 r1.x, v0, c0
    dp4 r1.y, v0, c1
    dp4 r1.z, v0, c2
    dp4 r1.w, v0, c3
    max r11.w, r1.w, c14.w
    rcp r11, r11.w
    mad oFog, c23.y, r11.x, c23.x
    mov oPos, r1
    mov oT0.xy, v7
    mov oD0, c14.w
    mov oD1.xyz, c14.x
    mov oT1, c14.x
    mov oT2, c14.x

So the final question would be to @FrozenFish24 and @elishacloud : Could anything be done with this information to fix these two spots?

@elishacloud
Copy link
Owner

@Polymega, It is relatively easy to replace one shader with another one. Can you show me what the shader looked like before and after you updated it?

@Polymega
Copy link
Collaborator Author

Polymega commented Dec 5, 2018

Yes sir:


Quick Save save file for Prison hallway: sh2pcsave1c.zip

Halogen lights before (they're pitch black like this when you turn off his light and lambert shaded when his light is on):
https://user-images.githubusercontent.com/27395260/48106024-bc80b480-e207-11e8-8532-20540aea4093.png

Halogen lights how they should be after fix:
https://user-images.githubusercontent.com/27395260/48106056-dae6b000-e207-11e8-805f-a12447809ea5.png

Halogen lights original vertex shader code:

    vs_1_1
    dcl_position v0
    dcl_color v5
    dcl_texcoord v7
    mov r11, c0
    mov r1, c0
    mov oD1, c0
    mov oD0, c0
    mov oT2, c0
    mov oT1, c0
    mov oT0, c0
    dp4 r1.x, v0, c0
    dp4 r1.y, v0, c1
    dp4 r1.z, v0, c2
    dp4 r1.w, v0, c3
    max r11.w, r1.w, c14.w
    rcp r11, r11.w
    mad oFog, c23.y, r11.x, c23.x
    mov oT0.xy, v7
    mov oD0, v5
    mov oD1, c14.x
    mov oT1, c14.x
    mov oT2, c14.x
    mov oPos, r1

Quick Save save file for Apartment Staircase:
sh2pcsave1c.zip

Windows before:
https://user-images.githubusercontent.com/27395260/49322822-114edc80-f4e1-11e8-8c47-2201441b7645.png

Windows how they should be after fix:
https://user-images.githubusercontent.com/27395260/49322825-1dd33500-f4e1-11e8-8ca4-30c81426b9cd.png

Windows original vertex shader code:

    vs_1_1
    dcl_position v0
    dcl_color v5
    dcl_texcoord v7
    mov r11, c0
    mov r1, c0
    mov oD1, c0
    mov oD0, c0
    mov oT2, c0
    mov oT1, c0
    mov oT0, c0
    dp4 r1.x, v0, c0
    dp4 r1.y, v0, c1
    dp4 r1.z, v0, c2
    dp4 r1.w, v0, c3
    max r11.w, r1.w, c14.w
    rcp r11, r11.w
    mad oFog, c23.y, r11.x, c23.x
    mov oT0.xy, v7
    mov oD0, v5
    mov oD1, c14.x
    mov oT1, c14.x
    mov oT2, c14.x
    mov oPos, r1

I'm pretty much clueless with Direct3D, shaders, etc. but it's worth noting that we only want to update the shaders for these specific pieces of geometry for these particular rooms only.

@Polymega
Copy link
Collaborator Author

Polymega commented Dec 5, 2018

For both of these particular rooms, these geometry pieces seem to be the only ones that use their vertex shader codes within the whole room. So if they're overwritten just for when you're in these rooms, it shouldn't negatively affect anything else within the area.

sh2pc.exe+1BB7DAC (01FB7DAC) byte — room index ID
Prison hallway ID: 00000064 (hex)
Apartment staircase ID: 00000021 (hex)

Perhaps the shader can be updated for the overall game but I wouldn't know what else that would affect without play testing the whole game.

The updated shader code can be found at the bottom of this post: #63 (comment)

@Bigmanjapan
Copy link

Bigmanjapan commented Dec 5, 2018

@Polymega

Nice.

Also what's up with the dead Lying Figure being rotated 90 degrees after the Blue Creek bossfight? I've seen it being positioned both parallel and perpendicular to the stairs on PC version.

@Polymega
Copy link
Collaborator Author

Polymega commented Dec 5, 2018

That's a result of quick loading back into the room, similar to the apartment flashlight room. Although this creature never comes back to life so nothing to really worry over.

@elishacloud
Copy link
Owner

I believe the problem is only with one line in the vertex shader:

    vs_1_1
    dcl_position v0
    dcl_color v5
    dcl_texcoord v7
    mov r11, c0
    mov r1, c0
    mov oD1, c0
    mov oD0, c0
    mov oT2, c0
    mov oT1, c0
    mov oT0, c0
    dp4 r1.x, v0, c0
    dp4 r1.y, v0, c1
    dp4 r1.z, v0, c2
    dp4 r1.w, v0, c3
    max r11.w, r1.w, c14.w
    rcp r11, r11.w
    mad oFog, c23.y, r11.x, c23.x
    mov oT0.xy, v7
    mov oD0, v5        ;<--- This line is bad
    mov oD1, c14.x
    mov oT1, c14.x
    mov oT2, c14.x
    mov oPos, r1

Instead of mov oD0, v5 it should be mov oD0, c14.w.

Try with this patch: d3d8.zip

@Polymega
Copy link
Collaborator Author

Polymega commented Dec 6, 2018

I'm envious of your know-how. This works great whenever James' flashlight is on. However, it goes back to "blacking" out the geometry whenever you turn off his flashlight (L key to toggle, by default).

Any chance to make this override any and all functions/calls to this vertex shader so that the geometry is always fully illuminated, regardless of whether or not James' flashlight is on/off?

@elishacloud
Copy link
Owner

Apparently there is a different vertex shader used when the flashlight is off. I had to make some additional changes to that shader also.

Here is the vertex shader used when the flashlight is off:

    vs_1_1
    dcl_position v0
    dcl_color v5
    dcl_texcoord v7
    mov r11, c0
    mov r1, c0
    mov oD1, c0
    mov oD0, c0
    mov oT2, c0
    mov oT1, c0
    mov oT0, c0
    dp4 r1.x, v0, c0
    dp4 r1.y, v0, c1
    dp4 r1.z, v0, c2
    dp4 r1.w, v0, c3
    max r11.w, r1.w, c14.w
    rcp r11, r11.w
    mad oFog, c23.y, r11.x, c23.x
    mov oFog, c14.x        ;<--- This line needs to be removed
    mov oPos, r1
    mov oT0.xy, v7
    mov oD0, v5            ;<--- This line is bad (see above)
    mov oD1.xyz, c14.x
    mov oT1, c14.x
    mov oT2, c14.x

Try this one: d3d8.zip

Note: I updated the actual vertex shader. This could affect other rooms since I don't know what other rooms use this shader.

@Polymega
Copy link
Collaborator Author

Polymega commented Dec 6, 2018

Beautifully done! Just testing the areas in question everything is working and looking great. Thank you very much for looking into this, Elisha!

Note: I updated the actual vertex shader. This could affect other rooms since I don't know what other rooms use this shader.

Okay, let me play test the game soon, playing through both campaigns to completion once with the flashlight always on and another where it's always off. I'll report back with my findings then.

@Polymega
Copy link
Collaborator Author

Polymega commented Dec 7, 2018

FIXED! ap64.cam Adjustment

Hi @Bigmanjapan ,

Can the camera be adjusted to hide this while in the wallet toilet bathroom?

image

@Polymega
Copy link
Collaborator Author

Polymega commented Dec 7, 2018

@Bigmanjapan @FrozenFish24

I may have found something about the Hotel chair shadow glitch while I was researching another shadow area.

But first: Let's talk about the shadow for the grandfather clock in Woodside Apartment:

When your flashlight casts a shadow on the clock it leaves a glitched "outline" of the clock's shadow around it, just like what the Hotel chair seems to be doing:

image

So I took an Intel Frame capture of this room and saw something peculiar:

image

The Frame Capture software unfortunately does not capture real-time shadows. So this shadow isn't a dynamic shadow...

But wait! I've seen this before: It's a fake shadow used throughout the game for various assets. It's typically a flat poly plane with a semi-transparent PNG texture that simulates a shadow:

image
image

So what does this mean? That fake poly shadow plane is a dynamic object. Because when you move the clock, that shadow (that poly plane) moves with it. And what do we know about SH2 PC? Currently, dynamic objects can't have shadows cast upon them.

So if/when we can figure out how to have dynamic objects receive shadows cast upon them, the grandfather clock's shadow should at least be fixed.


However... I'm not so sure that's the issue with the Hotel chair:

I'm not sure how many areas are like this, but for this room it looks like simple geometry is casted out and that is what determines where/how the shadows will be drawn:

https://youtu.be/OptmHNdQBFs

image

Be sure to watch the YouTube video above. I'm not sure what this is? There's no shader calls to them? But whatever this is it seems to be what's both casting the current shadow we see and probably also bugging out the chair shadow in the process?

But both before and after the cutscene the chair (which has a correct shadow during these points) has a more "clean" piece of geometry to tell it how to cast its shadow: https://youtu.be/xzWlali5qGk

image

You can even see part of these poly planes if you angle James the right way:

image

But during the cutscene I found no instance of such a "clean" piece of geometry to tell the game where/how to cast its shadow.

I could just be speaking nonsense right now but I wonder if the disappearance of that one group of "clean" geometry that defines the chair's shadow being missing during the cutscene is what's causing the issue of its shadow not appearing at all?

@Keith94
Copy link

Keith94 commented Dec 7, 2018

I was curious, since the camera adjustment fixes are intended for 16:9 resolutions, I assume they won't be effective for even wider aspect ratios, i.e. 21:9, 32:9, 48:9 etc.? Is there a way to toggle the camera fixes off in those cases?

@Polymega
Copy link
Collaborator Author

Polymega commented Dec 7, 2018

That's correct; if you go ultra wide you're still probably going to see clipping through walls even with the 16:9 .cam fixes. To disable them you can remove any/all .cam files from the \sh2e\bg\ folders.

@Keith94
Copy link

Keith94 commented Dec 7, 2018

Thanks!

@Polymega
Copy link
Collaborator Author

@Bigmanjapan
Can the boundary for this camera angle be adjusted to prevent the fog from disappearing when oriented in a particular way? This is right upon exiting the apartments:
https://youtu.be/LeHhhIoKzrU

If I were to guess, I'd say this would be cc11.cam

@Bigmanjapan
Copy link

@Polymega
The issue doesn't stem from the particular angle's camera being too far from the fence. It seems to be the same issue that happens with the disappearing chainsaw wooden log upon James going too far.

A semi solution could be changing that camera angle preset which fixes the fog issue.
This archive contains preset 1 and preset 4 (the default is 3).
Try them, maybe they will do. The most notacible difference is that transition from this camera angle to the next one is more rough.

cc11_presets.zip

@Polymega
Copy link
Collaborator Author

Polymega commented Feb 15, 2019

The most notacible difference is that transition from this camera angle to the next one is more rough.

Yeah, I see what you're saying. That rough camera shift is probably more of a concern than the fog disappearing. It may be best to not change the preset here then.

One thing I did notice is that preset 3 (default) sits the highest above is rotated the most parallel to James (which makes the fence look the lowest on the screen):

untitled-1

Perhaps there's a certain vertical threshold from James that triggers near-fog in front of the camera to not render.

@Polymega
Copy link
Collaborator Author

@FrozenFish24
May I ask for your help with another geometry adjustment? This would be for er01.map (the beginning bathroom).

When playing in widescreen we now see a much closer look at the bottom of the toilets when the beginning cutscene plays out... and it doesn't look quite right:

image

My suspicions were confirmed the other week when I watched a video (maybe a streamer? I can't remember) play the game in widescreen and commented how there was still camera clipping issues when they noticed that part of the toilet; they mistakenly thought that bad geometry was a camera clip issue.

However, that can be addressed!

image
image

The UV placements remain untouched.
The amount of vertices/polygons remain untouched.
The only things that have changed are vertex placements for the geometry.

There are two separate, adjusted geometry groups for this file:

image

The main group is the toilets, and the other group are plumbing rings that are not grouped with the rest for some odd reason. (When adjusting the toilets I had to make the plumbing pipes taller to compensate the change, hence their adjustments as well.)

May I ask you to replace the toilets and their plumbing?

Here are the OBJs:
toilets+REFERENCEWALL.zip
plumbingRings+REFERENCEWALL.zip

The reference wall is the wall that's behind the toilets/plumbing for sizing/placement reference.

Thank you very much for your consideration with this!

@FrozenFish24
Copy link
Contributor

Here you go @Polymega 🚽

er01.zip
er01

@Polymega
Copy link
Collaborator Author

What a beautiful, clean job you did swapping out... dirty, nasty toilets. Thank you, FrozenFish24!

@Polymega
Copy link
Collaborator Author

Polymega commented Feb 22, 2019

@FrozenFish24
Can we get a little creative with optical illusions? In ps37.map (Strange Area 2/Prison water hallway) the level abruptly ends right past the jail bars on both ends of the map, something that's easily noticeable:

sh2pc 2019-02-21 20-15-50

We can't change the fog parameters to fade this out as there are no fixed cameras in this area to only apply adjusted fog values when looking through the jail bars.

We also can't duplicate the geometry to extend out the hallway because this area uses dynamic water. (As we don't know how to readily extend out water effects.)

But we can create the illusion of the hallway continuing onward by placing some geometry inside this area--slightly smaller than the hallway itself--and adding a black fade alpha to a texture file and apply it on the new geometry:

image
untitled-3

Which gives us this result:

untitled-4

Files

Here is an OBJ of the new 'black fade' geometry (green group) and the ceiling (white group) for size/placement reference:

OBJ: prisonRoomBlackFade+CEILINGREFERENCE.zip
Edited texture file: ps37.map_tex_002.zip

image

Thank you!

@Polymega
Copy link
Collaborator Author

Polymega commented Feb 26, 2019

Phew... this one was an ass-kicker but I love trying to make the most out of UV real estate. Another geometry adjustment if you'd be up for the task, @FrozenFish24 . When playing in widescreen, and without an adjusted .cam file to hide this window, you see a solid white piece of geometry covering the hole of the window you just climbed through:

sh2pc 2019-02-25 23-36-37

Oringally, we moved the camera to hide this. But what if we revert this camera change, remove that white piece of geometry, and add part of Woodside back?

sh2pc 2019-02-25 20-32-24
capture01
sh2pc 2019-02-25 20-29-38
capture002

(Yes! I even matched the camera angle/focal lengths and lighting to ensure this would work/look good!)

Not only would this look nicer, but it's also user/player friendly: If they can see the window with outside geometry in it, they'll know/remember this is the window they climbed through (if they ever have to go back in case they forgot something).

If this is something I could ask your help with, @FrozenFish24 , here is what's changed:

  1. The geometry covering the window must be removed/moved out of the way:

image

  1. Here is the new OBJ geometry along with the bed for size/placement reference:
    ap64_NewWall_WithBedReference.zip

image

  1. Here is the modified texture file. The UVs for the new geometry are already placed where they need to go; the geometry just needs to be linked to this texture file:
    ap64.map_tex_012.zip

001

Thank you always for your consideration on this and the prison post above. I'd love to also know your thoughts if "opening up" the window here would help with user experience for first-timers.

A heads-up: Currently the lighting transition in this area was previously bugged. If you download the latest version of the SH2 Enhancements module this room/area will have proper, restored lighting transition values.

@FrozenFish24
Copy link
Contributor

@Polymega These two edits may take a little while as geometry using transparent textures is stored differently in the map files and my tools do not currently handle this, so will require additional reversing. I'll be busy for the near future but I'll try and get these done for you as soon as I can.

Really nice work on these edits by the way 👍

@Polymega
Copy link
Collaborator Author

Hi @FrozenFish24 ,
If I may make another request for the list: This is would be for ma85.map.

Using a widescreen camera we can see an empty void on the other side of the wall in the bottom left corner:

sh2pc 2019-03-10 20-38-24

This would add sidewalk and street geometry for the area:

image

The attached OBJ has the sidewalk + street geometry along with a grass plane for size/placement reference:
ma85_streetAndSidewalk.zip

image

And this following texture image has been updated to support the new UVs/textures. This texture file and the new geometry do not use any alphas:
ma85.map_tex_010.zip

ma85 map_tex_010a

Thanks for your consideration with this!

@FrozenFish24
Copy link
Contributor

@Polymega Annoyingly, the geometry that uses this texture is also stored in the transparent section for whatever reason. I've still not had a chance to look into further reversing yet, but I should be able to find some time soon.

@Polymega
Copy link
Collaborator Author

No worries, friend. I just happened to discover another void there and thought it good to exercise the 3D muscles once more. Really appreciate your work and contributions with everything.

@Polymega
Copy link
Collaborator Author

Hi @FrozenFish24 ,

If I may ask, have you had an opportunity to dig into the .map files more?

@FrozenFish24
Copy link
Contributor

FrozenFish24 commented Apr 14, 2019

Hey @Polymega
I've not had a whole lot of free time lately so I haven't made much direct progress on this front. But I have been incrementally documenting the format when I can. Most recently I found the bounding boxes used for frustum culling parts of the map, which may be useful at some point.

I'll hopefully be able to get something useful going for you soon. Thanks for your patience 👍

@Polymega
Copy link
Collaborator Author

No worries FrozenFish24! Take the time you need and, really, this is worth saying again: Thanks for everything you're doing here. You've helped fixed bugs we were completely stumped on which then allowed us to improve many other environments, along with your Direct3D research to fix other avenues. You rock!

@Polymega
Copy link
Collaborator Author

Polymega commented May 16, 2019

Hi @FrozenFish24,

May I ask of you to swap out some UV placements for the Dog Ending room? Nothing has changed geometry-wise, just the UV positions for the computer wall with the four monitors has been adjusted:
dog_ending_four_monitors_UVs_adjusted.zip

Edit: Sorry, forgot to mention the map name is qp05.map

Thank you for your consideration

image

UVs

@Polymega
Copy link
Collaborator Author

Polymega commented Nov 5, 2019

@FrozenFish24

Thank you so much for everything. We have a few more fixes/adjustments we plan to do before this next release. May I also ask for geometry adjustments to some .map files? I know geometry/textures that are linked to transparent images isn't cracked yet, but I believe the following below aren't tied to any transparent textures (I might be wrong):


🔲 Remove duplicate prison bars for ps85.map

In regards to this post.

A fan of our project noticed the prison bars have a glitchy effect as the cutscene plays of you finding Maria in the prison cell. I looked into it and it turns out Team Silent accidentally duplicated the vertical prison bars, so there's two instances of the geometry which causes the odd rendering effect (this affects all versions of the game): https://www.youtube.com/watch?v=BRL90l2_uiQ

Can the duplicate geometry of the vertical prison bars be removed for ps85.map?


🔲 Fix bad edge looping for piece of geometry in forest trail

This is one that's only an issue when played in widescreen. The edge loop/edge flow for a piece of the forest trail hill is broken for ca09.map, which results in a stray vertex that isn't connected to any other vertices:

sh2pc 2019-03-23 01-43-45
sh2pc 2019-03-23 01-37-46

Deleting edges below the offending poly and then connecting that stray vertex to its corresponding neighbor vertex should fix this rendering issue:

Untitled-1


☑️ Adjust UVs for DOG ending monitors

See the post directly above this one for new UV placements. I have a fun idea/plan for this adjustment that will involve the Silent Hill community as a whole. :)


Thank you always ❤️

@FrozenFish24
Copy link
Contributor

FrozenFish24 commented Nov 8, 2019

Just letting you know I am working on this. Been hitting some road blocks with my scripts though so it might be a little while.

I've finally put them up on GitHub by the way, though they're very rough and not much use to anyone but me at the moment:
https://github.com/FrozenFish24/SH2MapTools

Edit:
Here's one of the problems I've run into in case you're interested. Certain maps use vertex colors for static lighting so I'm currently having to switch my scripts from generating Wavefront OBJ to COLLADA because the former doesn't support vertex colors.

This also means to modify maps like ps85 seamlessly we need to work out roughly where Team Silent placed their light sources, their intensity and somehow bake off that information to each vertex's color in addition to any edits.

vertex-colors

@Polymega
Copy link
Collaborator Author

Polymega commented Nov 8, 2019

Certain maps use vertex colors for static lighting

I'm sorry. I wasn't aware this was something Team Silent done and how this would add an extra wrinkle/headache to the mix.

Knowing this now, I would assume then, that, indoor areas with no specialized lighting don't have special vertex coloring. That's why adding geometry for places like the indoor Hospital and Apartment rooms was more straightforward.

Whereas the Maria prison cell is "naturally" lit (so vertex colors are used). The same would probably be true for Hotel Room 312, then (using vertex coloring).

@Polymega
Copy link
Collaborator Author

Polymega commented Dec 3, 2019

Hi FrozenFish,
Have you had any leeway with the script and the vertex coloring? Is there anything I can do to help? I'm happy and willing to do whatever I can, so long as you can excuse my programming-impaired brain.

@FrozenFish24
Copy link
Contributor

Sorry this is taking a while @Polymega, been a bit busy these last few weeks. Here's the Dog Ending room with the UVs adjusted to tide you over:
qp05.zip

I've implemented most of the changes I need to support vertex colors and I've got the edited geometry ready to export so I should have the others done for you in the next few days.

@Polymega
Copy link
Collaborator Author

Polymega commented Dec 4, 2019

No worries, friend. We're hoping to include up-scaled, properly-fitted main menu, save screens, and maps for this next update as well, so there's no imminent deadline for anything at the moment.

Thanks for the adjusted UVs for qp05. With that adjusted, would you mind casting your vote? :)
https://twitter.com/WhereAllBegins/status/1202322711676116993

If I may recap the additional earlier requests, plus one for Hotel Room 312, to have everything recollected:


🔲 Add "fade out" geometry to prison sewer room

In regards to this post.


🔲 Add street geometry for outside Baldwin Mansion

In regards to this post.


🔲 Add apartment geometry outside of Blue Creek window

In regards to this post.

We can then revert the camera position to default for this area to re-show the window. This'll also help visually guide new players for the game, to let them easily see that's the window they came from and that they can go back through it, if they need to.

Also, with the advent of vertex coloring, can all geometry outside the window/window sill have a vertex color of 255 (full brightness)? The idea would be to hopefully prevent James' flashlight from having any influence on this new wall (because his light will shine through the current room's wall due to the general limitation of the game engine).


🔲 Replace low res 2D fence with 3D model

For Hotel Room 312 (rr91.map), can the flat geometry that makes up the low res 2D fence texture be removed and replaced with a 3D fence model instead?

Video example

Given the importance of the cutscene that plays out here--and how prominent this fence can be during the cutscene--it'd be ideal to have it look nicer. The heavy pixelation from the flat texture makes it a bit distracting, otherwise.

Attached is an OBJ of the 3D fence. I didn't include a "reference" piece for size/scaling as it's probably pretty intuitive how it should fit. The new 3D fence shares/uses the same texture file as the original 2D fence:

rr91_NEW_3D_FENCE.zip


🔲 Final request

It's easier to verbally explain this one so I made a video for you and sent the link to your email. Thank you <3

@FrozenFish24
Copy link
Contributor

Cast my vote and checked out your email. Nice edits as usual, you're very talented!

I've still not RE'd the whole "geometry with transparent textures" thing sufficiently so several of these might take some time. Otherwise I'm on it!

In regards to the Blue Creek Window, I don't believe any areas where you can use your flashlight have vertex color-based static lighting. I imagine we could just exclude your wall like we do the TV Static/Heaven's Night Windows (though this may also exclude the window frame and shutters).

@Polymega
Copy link
Collaborator Author

Polymega commented Dec 5, 2019

I don't believe any areas where you can use your flashlight have vertex color-based static lighting

Ah, that makes perfect sense. I think I even hypothesized that previously but forgot (which is why it was possible to edit previous areas as you've already done).

I imagine we could just exclude your wall like we do the TV Static/Heaven's Night Windows (though this may also exclude the window frame and shutters).

True! Also, another hail Mary idea I had was to set the normal angle for the outside wall to an extreme angle to help make the wall bright.

But before worrying about any of that, I'm hoping the light source that's already plugged into this room by the game will brighten that outside wall for us automatically, so we don't even need to worry about it.

My only potential fear is, due to game engine limitations, James' light will shine through the wall onto the outside wall, making it look a little odd:

image

My hope is if the outside wall is full brightness, the flashlight's light can't influence that wall's brightness any further.

@FrozenFish24
Copy link
Contributor

Making progress on the transparent geometry front:

ps85

@Polymega
Copy link
Collaborator Author

That blood pool is the prettiest blood pool I've ever seen because it inspires progress and hope! 😍😍

@Polymega
Copy link
Collaborator Author

Hi @FrozenFish24 ,

Exciting times are ahead as we hope to release the next update sometime next month! (Hopefully no later than mid-to-late February.) Have you had any opportunities to experiment more with the .map files?

@FrozenFish24
Copy link
Contributor

@Polymega I'll admit I've been burnt out since my last post from staring at hex dumps and the obtuse layout these files have. But my enthusiasm has recently returned and I was planning to do some more work on it this week.

If I'm unable to get my tools working universally, as I'd like, I should at least be able to have your map files done by Feb 👍

@Polymega
Copy link
Collaborator Author

I'm sorry about the burn out. And it's completely understandable. Virtually no detailed documentation on these formats just leaves you in the dark, and frustrated. And then you got folks like me being starry eyed, just to compound it.

Thank you for the update, and your patience with the whole situation. Seriously though, no worries about pushing the work off until an update after this one. I'm more concerned about you and your long term enjoyment working with the project.

But hey, I don't know how often you check your email, but I sent you something cool to start off your week. :)

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

8 participants