nipkownix / re4_tweaks

Fixes and tweaks for the "UHD" port of Resident Evil 4
zlib License
341 stars 33 forks source link

[Feature request] Is it possible to port the PS2-specific fixes into RE4 UHD via re4_tweaks? #498

Open ViperAcidZX opened 1 year ago

ViperAcidZX commented 1 year ago

Describe the feature you'd like to see added

There are a couple of minor bugfixes that were introduced in PlayStation 2 port of the game and some of them remained exclusive in that port. A particularly noticeable bug that appeared since the GameCube billboarding effect that happens when looking up at trees in outdoor areas and move the camera around as shown in this YouTube video below and it has carried over in every port after the PlayStation 2 version and I was able to recreate this bug in Ultimate HD Edition with and without HD Project installed.

https://youtu.be/Fq1CdGAf2w4?t=711

Mister-Curious commented 1 year ago

I can explain this phenomenon in detail, as I was taught by the master Albert about this. These trees are actually effects, not 3d models like the rest of the models we see in the rooms. These effects are on a 2d plane, but have a rotation that moves with the player so we don't lose sight of them:

About the rotation. If you don't want a texture to rotate, simply change Offset[8..9] = 0x8000 --> Offset[8..9] = 0x8001 or Offset[8..9] = 0x0 --> Offset[8..9] = 0x1

In other words, change the 9th byte of the effect to "01"

This will force the game to use the HorizontalAxis = and VerticalAxis = values instead of making it to rotate while Leon is moving The RotationRadius = value is the distance from the position coordinates the effect will rotate.

Example: RotationRadius = 0 vs RotationRadius = 1000 image

So I am not sure how the PS2 port did this for some effects and not all, I imagine they simply edited the tree effects in some rooms. This can be done with Son Of Persia tools (editing the game files), but it would be a lot of work and you would need to know which effects you are editing.

To do this with the DLL might be possible, but again, you would need to know the effect IDs. I'm sure its possible, but would take some work. I would be willing to provide the technical information of each of the effects if others were able to provide a list of rooms which had these effects present.