gonetz / GLideN64

A new generation, open-source graphics plugin for N64 emulators.
Other
755 stars 175 forks source link

RE2 graphical issues #2152

Open ShadowOne333 opened 4 years ago

ShadowOne333 commented 4 years ago

I've been playing a lot of RE2 on Mupen64 Plus Next on my Switch lately with the 1.8.1 release, and I have stumbled upon quite a few discrepancies and graphical oddities when playing it, which I will go into detail in the following points.

First off, I want to address that these graphical bugs and issues can be replicated even on PJ64 by using the GlideN64 plugin (and even played around with the graphics settings to no change in these issues).

Here's a playlist of videos for some of the problems described here: https://www.youtube.com/playlist?list=PLYFiur9ptPT8t-wNYvHj-19QVRnmTG9rq I will still paste the corresponding video for each issue individually.

Also, I have taken some save states throughout the game where some of this issues can be found. I made sure to save the state right before the effect is played, for easy debugging and testing. The ROM used for this was RE2 Rev A, or v1.1. Here are the save states: https://www.dropbox.com/sh/lqboo16sxk3mpz3/AADO3d5y3X8TaNLYZKv6VnJea?dl=0

ROM Info: Name: Resident Evil 2 (USA) (Rev A) MD5: 2C1C2949B4A5F16AE7C6D9B5DB4C034A SHA256: 34347CC53968095F920080891C7291D46EDA5D8647C2527FFE48AB74C0B4B344

Now to address the problems:

1. Graphical noise when changing camera perspective:

This is an already known problem I believe. When changing camera perspectives, sometimes you can catch a glimpse of what seems to be white noise in between background changes, it can be seen for a couple of frames and happens at random, but quite often. Depending on the settings, the glitch can be either white noise or some sort of red/green flash.

2. Black screen after extended periods of playtime:

Note: This specific issue was the only one that could not be reproduced on PC.

This problem occurs after an extended session of playtime (usually around the 1 hour mark). This one can start with some video glitches, like the image starting to flicker in between camera transitions, or flashing green (a couple of examples can be seen in the two videos listed below). Sometimes you can go into the menu or another camera change and it looks fine, but after a few seconds, the whole screen goes black entirely regardless of any subsequent action. While the screen does go full black, you can still hear the game in the background, you can still move and hear the game playing, just with no image output. According to some tests and other people reporting it, the texture cache size set to 4k seems to give the best results to mitigate the issue, but it only slows it down, as it still ends up happening after some time. Also, I heard some people mentioning that this seems to happen on devices with some low RAM, around 4GB or so (like the RPi). I can confirm it happens on Switch around 1 hour of continuous playtime.

Videos: https://youtu.be/npO9BXuFNH4 https://youtu.be/_RYeKW7ptSA

3. Disappearing door at the Sewers

This one is pretty self explanatory. As soon as you open this specific door at the entrance of the Sewers with Claire, the door seems to disappear after the animation finishes.

Video: https://youtu.be/TFPH3qliiOA

4. Blinking/Flashing lights FX at several parts of the game missing

This one is one of the most frequent bugs currently, and it happens all throughout the game at several sections. In short words, there are certain parts in the game where you are required to interact with certain machines or objects that have a flashing or blinking light as a cue to tell the player to interact with them. However, due to the current bug, these objects or devices have no light coming off from them, just showing the bare background image without any light effect applied to them. It's worth noting that some of these flashing objects do show the light from a different camera perspective (like some doors in the laboratory showing the flash on a specific camera perspective, but disappears on every other). These are just a handful though, almost all objects that tend to have the light effect on them tend to not show up at all.

Video: https://youtu.be/06bsWFbyg-w

Related images of other places where this bug occurs:

Library on 2F, from this camera angle, you can see the light coming from the switch on the wall (bottom left): GLideN64_Resident_Evil_II_002

When changing to another perspective, the red flashing light is no longer there: GLideN64_Resident_Evil_II_004

Once the switch has been activated, the bookshelves can be interacted with to being a puzzle for a key item, shown with a blinking red light on 3 of the 4 bookshelves, but no red light can be seen, neither on the bookshelves, nor the switch: GLideN64_Resident_Evil_II_003

The panel that takes the characters to the laboratory changes lights to depict whether or not the panel is activated or not. In this image, the lights should be red and on the right side of the panel: GLideN64_Resident_Evil_II_007

When using the correct key on the panel, red lights appear on the right, and after pressing the burron, the red lights turn off, and green lights appear to the left side of the panel: GLideN64_Resident_Evil_II_008

Couple of instances where the same thing happens in the laboratory with door switches: GLideN64_Resident_Evil_II_009 GLideN64_Resident_Evil_II_012

Another instance of a missing light effect, which tells the player where to interact to get the map of the Laboratory: GLideN64_Resident_Evil_II_010

5. Missing burning effect on 1F Fireplace

This is a graphical bug that occurs when getting the first red jewel on the 1st floor. When you use the lighter on the fireplace, the painting on the wall is supposed to start burning up on the center to reveal the jewel itself, but currently it simply makes the jewel model appear, with no effect of the burning on the painting showing up at all.

Videos: https://youtu.be/bd7CrH-HERQ https://youtu.be/m3-KHtJstqA

GLideN64_Resident_Evil_II_000

6. Dynamic background assets that change upon specific events do not change, have their second image showing before the event or remain static at all times.

This is also a prominent issue all throughout the game, as it happens on several sections of the game with different assets. Resident Evil 2 has certain parts in which a certain background asset changes depeding on specific in-game events.

In this cutscene, Birkin attacks both Leon and Ada on the train to the Laboratory, and when he gets his claw through the train, the background image changes to depict the opening on the train's wall. However, it doesn't change at all here, remaining static all the way through: GLideN64_Resident_Evil_II_011

The hole in the wall in this image should appear only when the Tyrant in the Scenario B breaks through it. However, this image was taken on Scenario A, where the Tyrant doesn't appear at all, so the image there should be of the full wall, with no hole present. This is another instance of the game using the wrong image for a scene, remaining static no matter what event or cutscene plays: GLideN64_Resident_Evil_II_005

Another example of the game using the wrong image. In this case, Birkin starts attacking from the train's roof, and each of the holes seen in this image are supposed to appear depending on where Birkin attacks. This image was taken even before Birkin started attacking, so the train's roof should have no holes here, and each hole should appear progressively as Birkin attacks (and depending on where he attacks): GLideN64_Resident_Evil_II_006

7. Ending credits do not appear, showing a black screen instead but with the audio playing.

Self explanatory. The ending credits show a black screen instead of the actual credits roll. The audio keeps playing normally, and after some minutes the credits end to show the Ranking screen afterwards.

ShadowOne333 commented 4 years ago

Added configuration file for PJ64. Note that the configuration used is the one that gave me good results in-game, but several other configurations were also tested. GLideN64.custom.zip

gonetz commented 4 years ago

@ShadowOne333 very good explanations of the problems. Thanks for this work! I'll check these issues, but I can't promise quick results.

ShadowOne333 commented 4 years ago

Thanks! I tried to go as in much detail as I could to expose the problem to the best of my abilities. And don't worry about quick results, I know these kind of things are not done in the flash of an eye, so I'll patiently wait for when you have the time to address them. :)

If there is anything else needed from my part, do let me know, and I'll gladly do my best to debug or provide further documentation, reports or images if needed.

RianCaio commented 4 years ago

One more at Ada section on Leon-B(Leon 2nd Scenario) Every time this happens Re2 n64 bug

ShadowOne333 commented 4 years ago

^Can confirm that one as well. There's also the scene where you first meet Ada at the basement with Leon, it gets an absurd amount of framedrops and some flickering.

RianCaio commented 4 years ago

^Confirm the flickering and framedrops at the cutscene at meting ada the leon and ada became almost invisible and the truck became invisible

PS:Using the lastest WIP 4 Builds

ShadowOne333 commented 4 years ago

Here's a video I took of the hand glitch mentioned above, you can see it clearly: https://youtu.be/2t7J5MjWewo

gonetz commented 4 years ago

I've fixed most of the issues. The first two issues I can't fix atm. The third one I can't check because savestate for it is not provided. I also need savestate for the hand glitch.

ShadowOne333 commented 4 years ago

I'll work on making save states for Issue No. 3, which is the Disappearing door in the sewers, and will also provide another two, one for the hand glitch with Ada, and another for the odd flickering/slowdown when you first encounter Ada.

@gonetz if you need more, please let me know and I'll gladly provide any required save state.

ShadowOne333 commented 4 years ago

Okay I did all the required save states, they're in the same link, but here it is again: https://www.dropbox.com/sh/lqboo16sxk3mpz3/AADO3d5y3X8TaNLYZKv6VnJea?dl=0

Let me know if you need anything else! And thanks for all the hard work with this :)

gonetz commented 4 years ago

Thanks! I'll check the issues with the new saves. Please test, which issues are already fixed with my current fix: https://ci.appveyor.com/project/gonetz/gliden64/branch/master/artifacts

RianCaio commented 4 years ago

Later I Will Try playing leons scenario just to see the fixed issues,Thank you

RianCaio commented 4 years ago

The 4 and 5 Are Fixed The Ada Basement Cutscene is Also Fixed The 6 Is Fixed

gonetz commented 4 years ago

(there's a part of the cutscene which makes a close-up of Ada's chest to emphasize the locket).

The locket is invisible with AL RDP too.

Could you make a savestate from this point for mupen64plus? It can be a core issue. At least the hand glitch is very suspicious. Polygons are missing because they have negative depth and thus rejected by depth compare. May be it is a bug in HLE display list. I tried to load your PJ64 save with mupen64plus, but emulation hangs.

ShadowOne333 commented 4 years ago

@gonetz save states for Mupen64Plus have been uploaded to the same folder as the PJ64 save states. They're named .state and .state1. https://www.dropbox.com/sh/lqboo16sxk3mpz3/AADO3d5y3X8TaNLYZKv6VnJea?dl=0

I made them with RetroArch through the Mupen64Plus Next core, since it's the one I had at hand at the moment. As always, let me know if anything else is required!

Edit: Just checked with the updated plugin you sent, and indeed most of the previous issues are now fixed (excluding the first two of course). The only other one that still seems to be present is the missing Credits roll (Issue No. 7, save state 5), but the rest seem fine so far. The Ada cutscene at the basement (save state 7) still lags a bit, but not as bad as before.

gonetz commented 4 years ago

I made them with RetroArch through the Mupen64Plus Next core, since it's the one I had at hand at the moment.

It seems that the saves are incompatible with my Mupen64Plus. I tried to load them but nothing happens. I use mupen64plus-gui build from Jun 2019. Newer builds do not work for me.

Credits roll is fixed too, but you either need to use updated custom ini (should be included into the WIP build from AppVeyor) or manually enable "Render N64 buffer to output" option. Credits implemented as direct CPU writing to the frame buffer.

ShadowOne333 commented 4 years ago

Oh I see. I downloaded the latest Mupen64Plus-gui and ported over the saves I had to make the proper save states, here they are: https://www.dropbox.com/sh/lqboo16sxk3mpz3/AADO3d5y3X8TaNLYZKv6VnJea?dl=0

Inside you'll find the following new files:

Let me know if those worked!

gonetz commented 4 years ago

It works, thanks! mupen64plus has the same issues with the locket. It's another HLE issue to resolve.

ShadowOne333 commented 4 years ago

Awesome! Good to know they worked :) I'll keep an eye in case there's anything else needed. Thanks again for all the hard work!

gonetz commented 4 years ago

I've fixed the problem with Ada's locket cutscene. You may check it with latest build: https://ci.appveyor.com/project/gonetz/gliden64/branch/master

So, what is still not fixed:

I'll try to fix the graphical noise issue, which is really annoying.

RianCaio commented 4 years ago

Nice the Ada's locket cutscene is fixed but the first ada bassement not showing ada leon and the truck is back

gonetz commented 4 years ago

Nice the Ada's locket cutscene is fixed but the first ada bassement not showing ada leon and the truck is back

Do you mean Ada meets Leon cutscene from Save State 7? I see no problems here. Please give me a screen shot with the problem.

ShadowOne333 commented 4 years ago

@gonetz can confirm the locket scene is fixed. However, I am also experiencing the same issue as Rian with the event where Leon meets Ada at the basement parking lot.

Here you have images of it (it's simply the BGs that show up, no 3D models): https://imgur.com/a/f4ZT23W

The first 4 images are for Mupen64Plus in the Leon & Ada scene.

The closeup of Ada shows up fine. But after her closeup is finished, the 3D models for Leon, Ada and the truck in the back do not show up at all until after the cutscene is over. Although, it seems that such issue happens only with Mupen64Plus, but not with Project64. In P64, the locket scene still has some weird artifacts, but it shows up more of the hand, and the Ada+Leon scene works normally in it.

The last 4 images show the hand as it is currently appearing in Project64.

gonetz commented 4 years ago

It looks as a problem with compiler optimization. The locket scene looks correct with debug build. You may try it: https://drive.google.com/file/d/1Rr7aSvDdvdnEQvbAnaycWYcocqsVuPoX/view?usp=sharing

ShadowOne333 commented 4 years ago

I downloaded that one, but PJ64 refuses to load it or recognize it at all, is there something I'm missing to make PJ64 recognize the plugin? I'm using the latest dev build (2.4.0-1128-gfdc1a51) As for M64+ ,it behaves the same as the previous GlideN64 build.

gonetz commented 4 years ago

I tried build 2.4.0-1128-gfdc1a51. I put GLideN64.dll and GLideN64.custom.ini from the GLideN64_debug.7z archive to Project64\Plugin\GFX\ folder and selected in with Options/Settings. No problems on my side and the locket scene works correct. As for mupen64plus, your saves are for newer version, which I can't run on this PC (it just crashes) so I can't say are the problems fixed with debug version of GLideN64.

ShadowOne333 commented 4 years ago

Huh weird. PJ64 2.4 just refuses to open up GLideN64 for me.

Would you please share both your Mupen64Plus and PJ64 setups in a zip? (Without the ROM of course)

That way I know for sure I'm working with the same setup as you, so I can provide fully compatible and working saves and savestates for both emulators.

gonetz commented 4 years ago

Latest Project64 with debug build of GLideN64: https://drive.google.com/open?id=1U0eNCWwEnQoz2V2RTZ8YloRTyPI9vIYD

your saves work fine with it.

mupen64plus with debug GLideN64: https://drive.google.com/open?id=1piRRpxCAFCn6Nios616dGWrZymu5kkkv

I use this version, but your saves are incompatible with it.

ShadowOne333 commented 4 years ago

I have updated the save states in the same DropBox folder, @gonetz , updated with the version of Mupen64Plus that you use. Downloaded it and redid the save states in your M64P setup you shared.

Sorry if it took a bit, all work ceased since yesterday here and I used to do my testing in a PC at work some mins before check-in, and in the laptop I have available at home, I had to run RE2 at like 1fps (no kidding), so it took me like one hour per save state lol

Anyway, hope those states help!

gonetz commented 4 years ago

I successfully loaded your new mupen64plus saves, thanks!

It seems that we have a heisenbug here. On my AMD PC everything works fine, no errors as on your screens from here https://github.com/gonetz/GLideN64/issues/2152#issuecomment-602653624 My Intel+nVidia laptop has issues with the locket scene when I use release build of GLideN64, debug is ok. I'll try to find when it started.

gonetz commented 4 years ago

@ShadowOne333 I think I found what causes the problem. It is "threaded video" option. My version of mupen64plus just crashes when this option is enabled. Project64 has random glitches in the locket cut-scene. With threaded video disabled everything works fine for me with both mupen64plus and Project64. Please disable that option and try again. I did not notice that before because I usually work with debug builds. Threaded video is disabled in debug mode.

@fzurita could you check this problem with threaded video? Here the archive with mupen64plus-gui and recent release build of GLideN64: https://drive.google.com/file/d/1EmPIrOzGhIRWamtH16CVKdRzToKoyPFA/view?usp=sharing Enable threaded video in graphics plugin options, run any game - crash. Disable threaded video - no crash. Tested on AMD and Intel CPUs.

fzurita commented 4 years ago

Ok, I will check.

fzurita commented 4 years ago

The problem with the crashing in mupen64plus-gui is most likely a front end problem. I think @loganmc10 should look at that.

I'll look at the locket scene with threaded video enabled though.

loganmc10 commented 4 years ago

Threaded video works for me, can you try the latest version of the GUI @gonetz ? You can download it here: https://github.com/loganmc10/m64p/releases

gonetz commented 4 years ago

@loganmc10 m64p is a thing in itself now. Yes, this build runs with threaded video enabled in GUI. However, when I replace mupen64plus-video-GLideN64.dll with my build, the emulator says 'No video plugin attached. Please go to "Setting - plugin selection" and choose one'. I can't do it with settings dialog, it has no video plugin selection control: Settings So, I can't use it for development. I use older version, which unfortunately crashes with threaded video enabled.

loganmc10 commented 4 years ago

Is your build 64-bit? 32 bit builds won't work, but I would think you could drop in a replacement 64bit build of GLideN64.

The only thing that won't work with a drop in replacement is the GUI. The GUI works because of the modifications I made here: https://github.com/loganmc10/GLideN64/tree/NUI

gonetz commented 4 years ago

Is your build 64-bit? 32 bit builds won't work,

Ah, sorry! I used to work with 32 bit builds and forgot that your release is 64 bit. Yes, threaded video works with the new version of m64p. Old version crashes with it, 32 and 64 bit.

fzurita commented 4 years ago

In Android the locket looks wrong in threaded and non-threaded mode even after all the fixes.

Also, every transition has a red tint to it instead of black.

Looks like I'll have to debug this in PC.

gonetz commented 4 years ago

RE2 ucode has near plane clipping disabled. It is not emulated well with GLES. So, either Android with full GL, or PC. I guess, "no near plane clipping" can be the reason, why it works wrong with threaded. Tee issue with locket looks as depth compare problem. If threaded video can somehow change the order in which polygons are rendered or gfxContext.setClampMode executed in a wrong time, it can cause the problem.

schubertguilherme commented 4 years ago
  1. Graphical noise when changing camera perspective:

This problem, not happening in release "4.0 Version Public" in version (Europe) the game, @gonetz. The new masters happen.

ShadowOne333 commented 4 years ago

Oh damn this extended way more than I thought haha. Hope that threaded issue and the noise on camera change are not too annoying to fix. Still, if there's anything more I can do to help with the debugging process, please be sure to let me know.

ariahiro64 commented 4 years ago

image

this isnt a new lle specific issue but a lle in general seems to be the framebuffer is clamped to 1 pixel of the frame buffer

ShadowOne333 commented 4 years ago

Dropping by to mention that I've been testing a beta build by m4xw with all the newest commits implemented, and RE2 has most of the issues listed here fixed!

The only two which still remain are the ones mentioned here: https://github.com/gonetz/GLideN64/issues/2152#issuecomment-601722949 Those being the locket scene, and the cutscene where Leon meets Ada, which are still on-going.

This isn't to push or hurry or anything, just thought about sharing that the fixes made so far work great on Mupen64Plus Next through Switch :)

gonetz commented 4 years ago

The locket scene will not be fixed with GLES devices, including Switch. GLES has not the necessary functionality.

threenator commented 1 year ago

I'm still having the graphical noise issue.