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

[ FF7 ] Field and World model textures appear half as bright #609

Open
HeyItsLollie opened this issue Sep 27, 2023 · 4 comments
Open

[ FF7 ] Field and World model textures appear half as bright #609

HeyItsLollie opened this issue Sep 27, 2023 · 4 comments
Labels
feedback Pending for feedback from the user help wanted Extra attention is needed

Comments

@HeyItsLollie
Copy link

HeyItsLollie commented Sep 27, 2023

First of all, I just want to say a huge thank you for the recent improvements to model lighting. I've hoped that someone would take on the task for a few years now, and CosmosXIII's new fix works wonders.

A smaller bug is still present: Textures on Field and World models appear half as bright as they should, compared to PS1.

Here's a Field model comparison between PS1 and Steam. Screenshots were taken at the very start of the game, simply walk Cloud towards the camera as soon as you gain control. I'm using FFNx in this comparison for its comparable shading.
FaceCompare1

And here's a comparison between PS1 and the original Steam release. Note that in this example, I've modified pixel.hlsl at Line 28 to multiply texture color brightness by 2, to demonstrate the potential fix. (this edit alone is not enough, as the edit affects all images)
FaceCompare2


Here's the World model textures, starting with PlayStation. These screenshots were taken at Kalm, immediately outside of Midgar.
Field_PS1

Steam, unmodified:
Field_Steam-Stock

And Steam again, with the previously-mentioned texture color brightness hack applied to demonstrate the potential fix.
Field_Steam-Hack
(This also exposes an additional issue regarding vertex colors, which I've posted separately: #610 )

@HeyItsLollie HeyItsLollie added the bug Something isn't working label Sep 27, 2023
@julianxhokaxhiu julianxhokaxhiu added feedback Pending for feedback from the user and removed bug Something isn't working labels Sep 27, 2023
@julianxhokaxhiu
Copy link
Owner

@CosmosXIII any help on this part is appreciated. Thanks a lot

@CosmosXIII
Copy link
Contributor

Thanks for the report. Not sure it is as simple as multiplying things by 2. Could it be that lighting was not applied to the textured parts in the PSX version and therefore making it brighter?

@julianxhokaxhiu
Copy link
Owner

I wonder if with DuckStation we could capture this detail, although it would be difficult to spot. Probably enabling Show VRAM and Show GPU State should be enough to detect if the emulator applies Shadows on the textures
image

If anyone wants to help troubleshooting is welcome.

@julianxhokaxhiu julianxhokaxhiu added the help wanted Extra attention is needed label Oct 1, 2023
@HeyItsLollie
Copy link
Author

I ended up taking a closer look. Unfortunately when it comes to DuckStation, I don't think these two settings can reveal anything that detailed about the interaction between specific polygons and textures.

duckstation-qt-x64-ReleaseLTCG - 2023-10-10 - 20-29-59

I tried chasing another idea: Hex-editing memory directly with Bizhawk to see how textures react to vertex colors. Bizhawk can only render at 1x resolution, making it harder to check the details. But from a glance, it seemed that maybe textures are unaffected by vertex colors.

BizhawkCompare
PS1-Shading

In the Steam release, pixel.hlsl multiplies vertex colors with textures. Line 28, color *= texture_color;
By altering this to color.rgb = texture_color.rgb; to force textures to render unlit, this should feasibly render a correct result. But a couple more problems arise.

  1. Even with unlit textures, PC's textures appear too dark.

PS1vPC-with-corrections

Seeing this, I finally dug into FF7's textures to check what the ground truth was, and wouldn't you know it, the texture is exactly as dark as it appears on PC.

PS1vPC-texture

  1. PS1's textures might actually be receiving shading after all.

The texture appears brighter on PS1, and it turns out there is actually a subtle gradient over the texture. I haven't dug into the model myself, so I don't know if the eye texture is directly on the vertex-colored polygon, or if it's floating above the vertex colors on a separate polygon. Either way, I'm guessing this gradient is a result of the game's lighting calculation.

CloudEye-TEXvPS1
PS1Shading

I'm reminded that there are PS1 games that have used vertex colors to produce overbrightness. Vagrant Story is one such game, another Square title. It's possible that this is what's happening here: Vertex colors are interacting with textures in such a way that they can become overbright, but this detail isn't being reflected in the PC version for some reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feedback Pending for feedback from the user help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants