Fixing Lighting Issues, Crushed Whites, and Environmental Pop-In (Technical Improvements – part I)

Hi everyone!

Today’s post is somewhat special. While testing some non-texture-related files of the game, I was able to edit a few things I never thought were possible to change…

I’d like to be clear that I have no coding knowledge or anything like that. I’m just terribly obstinate! What you’ll see here is the result of hours of “what if I change this <random number> with another <random number>” trial-and-error hex-edits. In the end, I learned the function of certain bytes of data.

So if someone asks: “Could you fix <some other issue> as well?” The answer will be: “I have no idea if that’s possible right now.” haha ;-P

I fixed the following issues (you’ll find a comparison video at the end of the post):

  • Lighting Pop-In

318Z

This is by far the most annoying graphical glitch to my eyes… This problem happens in rooms where the player has the flashlight on.

This issue depends entirely on Leon’s closeness to the 3D model… The problem is that some 3D models don’t react to the light until Leon is too close to them.
The solution I found is really cheap, but 100% effective: I just placed extra polygons (not visible in-game) all around the model at a certain distance. The game engine will “notice” the model is closer to Leon than before and it will start reacting to flashlight light at longer distance than before. The result is a nice and soft gradient from dark to light.

  • Crushed Whites

318Z
Something that always bothers me when I play this game is when I see lights that literally make the surroundings look completely white. All detail is lost!
It seems this is a general problem throughout the game and no edited gradient file or Sweet FX configuration can fix that. You can make the white darker using those options, but you’ll never get back the lost image detail from a crushed white area.

The solution: I found the bytes inside the LIT file for each room that controls the intensity, contrast, and brightness of the overall light in the room. The problem is resolved by reducing the contrast!

  • Cold and Warm Ambient Colour

318Z
Another issue I noticed while playing this port is a specific point where the color of the ambient light changes from warm to cold (this occurs in the castle, specifically in the puzzle room with the paintings).

The solution: This was a glitched effect (not sure which one). I edited the EFF file of that room and deactivate that broken effect. The right color-temperature for that room is the cold one. 🙂

  • Pop-Up Trees

318Z
Did you notice the trees popping in the distance all of a sudden when you approach them in the first area?

This was likely an optimization method Capcom implemented because the number of polygons in that area is huge. This is now unnecessary given that we are no longer bound by the Gamecube’s hardware limitations.

The solution: Fortunately, I found the bytes inside a LIT file (every room has its own LIT file) that control the distance to the player before certain models are rendered on screen. But those numbers doesn’t control all models… So, after some additional research I also found the bytes that control the density of the fog at that distance as well!

And here’s a comparison video for all 4 corrected issues!:

I hope you like these edits… And as always, feel free to comment about them!

This entry was posted in Progress Updates and tagged , , , , . Bookmark the permalink.

103 responses to “Fixing Lighting Issues, Crushed Whites, and Environmental Pop-In (Technical Improvements – part I)”

  1. Majora says:

    Great work as usual, Albert. This definitely seems like a massive fucking pain.

  2. Diego says:

    The rendering distance is by far the best fix i seen on the game. It really annoyed me, like… a lot .-.

    Thanks a lot for the fix!! 😀

  3. Boris says:

    Some of these problems always stood out to me, especially the pop-in and the over-exposed whites. Your perseverance trying to fix these issues is much appreciated. I have a question though. Were these issues always present even in the original Gamecube version, or were they accidentally introduced in the PS2/GC mashup the UE version came from?

    • albert says:

      Don’t mention it!
      The overexposed whites is an issues that appeared with the HD versions (PS3/X360/PC)
      But these ports come from the Wii version. The only that remains from the PS2 are the Separate Ways cutscenes

  4. stevens says:

    >Old textures look bad
    >>I found this random wall IRL that was used for the game.
    >There are some bugs
    >>I found random byte in game fales that controls broken effects.

    W.T.F. Are you from CSI? FBI? CIA? KGB?

  5. paul says:

    your obstinance is inspiring! very awesome. after you’re done with this you should consider a job in the dev world if you aren’t already doing something you love. this will be stellar on a CV/resume. “experience? oh yeah, i just frikkin’ re-made resident evil 4 by hand, with capcom approval.”

  6. Alex says:

    Wow! phenomenal work! I truly can’t believe that it takes a couple of fans to fix and improve what Capcom has been repackaging on every system for over a decade. The game as you update it is already looking better than I remember the original game being! RE4 is worth having on any system, but once this project is complete, all other versions will become redundant. Capcom really ought to consider compensating you guys for all your work, and then get these improvements in the console releases. Hell, this mod is one main reasons why I decided to build a PC rather than get another consoles, so my part manufacturers owe you too!

    Keep up the great work, and thanks for all the updates!

  7. X6205 says:

    That is not possible! How dare you be soo good! Itʼs CGI fake… lol 🙂
    Fantastic work !!!
    PS: I really pity those poor console owners, getting that sh*t instead of this…

  8. JoJo says:

    Hey Cris/Albert, first time commenting. I LOVE LOVE LOVE the work you’re doing with textures and enhancing the game. I feel like I should have commented earlier and left a message of encouragement, because you guys are doing an incredible job. (And I really need to get around to making a donation!)

    That said, his is the first time I’ve seen fixes that feel a bit ‘wrong’ – in your comparison video, the gradient lighting fix and the crushed white fix both feel a bit ‘flat’ – this is the first instance where I feel you might be going overboard and fixing some things that aren’t necessarily broken.

    Here are some examples taken from your video:

    https://s21.postimg.org/fk3vq9687/Example5.png
    https://s21.postimg.org/is8d3ashz/RE4_Example1.png
    https://s21.postimg.org/xoby80a87/RE4_Example2.png
    https://s21.postimg.org/86tjoeshz/RE4_Example3.png
    https://s21.postimg.org/5qrqakafb/RE4_Example4.png
    https://s21.postimg.org/w0cstcwcn/RE4_Example5.png

    I do feel that the lighting has become much less dramatic in all of these examples, and I’d also personally hate to see the overexposed/crushed whites go. RE4’s visuals emulate film techniques, not reality, and the dev’s lighting choices are a big part of that.

    If an object or wall was super dim from 10 meters away in the original game, I strongly feel the HD Remake should follow suit. Right now, in the comparison shots above, the previously dim visuals have been lit up like a Christmas tree. Likewise, the bright lights of a room can serve to provide a contrast from a previously dingy room, and if you go around ‘fixing’ those lights to make them more ‘realistic,’ you’re gonna be losing a small part of what makes RE4 so special.

    Just my two cents… sorry if that sounded harsh. Been drinking a bit tonight with my mates and this stood out to me and felt the need to post. I really do love the work you’re doing!!

    • albert says:

      Heheh don’t worry!
      Thank you for your words and comments! They are always welcomed

      In this picture:
      https://s21.postimg.io/86tjoeshz/RE4_Example3.png
      the red light was simply captured at different moments since it’s a rotating red light 😉

      About the castle pictures: The left side is the “original”. When you say “Christmas tree” are you refering to the “original” side of the comparison?

      • Boris says:

        I feel obliged to add my two cents here as well. I personally prefer the crushed whites gone, but I can see how some people might be skeptical of the new slightly de-saturated look present in the post-fix pictures. Would it be possible to players to edit this effect themselves in the game files, or toggle it off or on? You could keep everybody happy if so.

        I like the effect though. The castle is meant to be dim and creepy. Those rooms were way too bright for my liking.

        • albert says:

          That’s exactly what I thought! The original is clearly more appealing in darker areas. I still want to do some research and I’ll ty to get better results in both dark and light areas.
          I need to take proper screenshots of the original CG/Wii of that area, too and then I’ll try to get the closer as possible bright/contrast values. This crushed whites issue wasn’t in the original GC/Wii versions…
          Thank you for your comment!

          • Boris says:

            You’re welcome. Trying to match the values in the GC version is perfect. Speaking of the original, there were countless little things present that got lost in the proceeding ports, superior weapons sound effects, smaller aiming reticle, inventory weapon appearance etc…

            That’s what would have ideally. Just the GC version of the game with hi-res textures.

          • albert says:

            And the reverb effect in some rooms… I miss that sound effect so much!

          • Vick S. Bateman says:

            Albert, this is just crazy
            I am more than sure that with some practice you will be able to recreate the most accurate look (with GC/Wii versions as religious reference) for the game by the end of this incredible project. It’s really something BIG for me as i have always preferred and by a mile the original presentation on GC and Wii in terms of lighting, colors, tone, effects and mostly gamma.. kudos

  9. JoJo says:

    Oh! A small correction:

    While I take issue with the fixes, example 3 up above (take from 1:30 – 1:32) seems to be a gradient ‘fix’ that is done just right. 🙂 The cage/platform is properly lit up when close, and gets appropriately dark as it falls.

  10. Sergey Tokarev says:

    You even fixed pop-up issue. That’s amazing!

    If think the only major issues left to fix are shadow intensity and broken water ripple effect. I don’t know if you’ve noticed, but this effect is working in the cutscene when you kill Del Lago with 30 fps mode (not working with 60 fps).

    Anyway, keep it up 😉

  11. Kingseeker Camargo says:

    Reading about your adventures in pimping RE4 -and especially posts like this one- is almost getting more fun than playing the actual game 😀

  12. Austin Powers says:

    Pop-up distance is something i wished that could be fixed, thank you so much, those trees and the the swamp are the worst even if some other places like the village have that problem too.

  13. JoJo says:

    Hey albert. Regarding the screenshots, I was just saying that objects far from Leon should be dark from far away (as seen in the original on the left), and then lighter when up close. Smoothly transitioning between that, with no lighting ‘pop up’ would be ideal.

    I agree that using the GC/Wii versions would be best in terms of reference. Cheers!

    • albert says:

      Thanks for the clarification!
      I didn’t edit any light values for that room. I just made 3D edits to the models in order to force them to react to Leon’s flashlight sooner. So, the light is untouched.

      I know what you mean… But the models that doesn’t suffer of that pop-in light issue are not that dark from the distance. And the models actually get darker when you move away of them, but it’s more soft and gradual (1:15-1:16 in the video. The difference is not that big at that distance for example). In other words: they get dark like the original but you need longer distances to obtain the same level of dark.

      Besides, when you enter that cave and you see the entire structure from outside everything is well illuminated. This is something I never understood: Why does Leon need the flashlight in that area? Did Someone turn off the lights when he entered the structure?

      GC/Wii sufferend of that issue aswell (If I recall correctly). So, “Original” is not always synonymous of “better”.
      The more I go deeper into the project the more I realize the original game is full of inaccuracies and rushed and almost unfinished details. So, I can’t trust blindly “the original was like this” argument…

      But I’ll keep in mind this because I need to do some extra work on these edits. Let’s see if I can get better results! 🙂
      Thank you again!

  14. Brad Vickers says:

    Great work Albert W. Is it possible to extract the new facial enemy details that Capcom implemented in the PS4/Xbone release of RE4 and apply them on the PC enemies?

    I think that was the only improvements Capcom added the the lastest port of this game.

  15. Laurence says:

    Hi guys! Firstly I’d like to commend you on the fantastic work you’ve been doing, I’ve been following now for a while. 🙂

    Secondly, (and I’m not sure if this is the right place to comment to ask, so my apologies if it isn’t) will this whole modification only work on the Ultimate HD Edition or the original PC version as well (I’m guessing the Ultimate HD Edition only)? I don’t own the Ultimate HD Edition, only the original. That’s why I’m asking. 🙂

    Many thanks and keep up the good work! 😀

    • albert says:

      Thank you Laurence!
      And yes, this will be only for the newer PC port (UHD 2014). The file structure of both PC versions is completelly different…

      • Laurence says:

        Ah alright, thanks for clearing things up for me! Will have to get my hands on the UHD edition sometime to give this a go. Thank you very much and keep up the good work, it’s absolutely incredible and admirable. I’ll have to get round to donating at some point as well! 😀

        I feel like saying it once again, fantastic work! 🙂

  16. Vlad says:

    Hello guys! Do you know anything about mercenaries glitch stuff (no grenades from regular enemies on PC steam version) https://www.youtube.com/watch?v=NAi0qAzjV8I

  17. Vlad says:

    can it be fixed? maybe some files from GC or PS2 or PS3 i don’t know

  18. Vlad says:

    its from bella mate

  19. Vlad says:

    no grenades from normal enemies

  20. urbanman2004 says:

    Good attn to detail

  21. amir says:

    Great progress bro,

    I think more lighting will make game cooler specially i like to see lighting effect on leon character,his arms,his hair and from distance,this can show game better.
    Unfortunately,Res4 no has any special effect exapct lighting and making this less can reduce graphic
    This is why i like graphic on indoor places more than places like the first stage..

    But in another view you can see more lighting and high contrast can kill details from near and not showing well sometimes,
    So i think you guys should act with more caution,Do more test about lighting on different Places,do not use same intensity valve for all places,Sometimes we should sacrifice details instead of changing intensity on some places and…I think you guys know better than me

    My only request is that I personality like to use ENB and Sweetfx mods on this game,We can change intensity, contrast, and brightness so hope you guys consider it in your work progress …

    Thank you for your amazing job

    • albert says:

      Hello and thanks for your thoughts!
      I agree with you. For now I’m trying to remove the “crushed whites” issue. This can’t be reversed with ENB nor SweetFX. I’ll try to keep a well contrasted image and as true to the original as possible!
      Greetings!

  22. Frannz says:

    Great work as always.
    I am a little in doubt about the reduction of contrast to prevent the overexposed lighting.
    The game looks very flat with the change, so I’m kind of half-pleased with the end result… the original looks bad but has more contrast, while the modified one looks flat though with no over-exposition.

    By what you have written, don’t you think you can increase the contrast a little, while keeping the overexposure to a minimum?

    • Kaludio says:

      the lighting looks very different because that room has 2 fixes. the first one is the warm-cold lighting fix, and the other is the overexposure.

      • albert says:

        That’s right! It’s not mentioned in the video but the overexposed whites comparison images have the cold/warm fix applied too 😉

    • albert says:

      Thanks!
      Yes, that’s what I try to do now 🙂 I’m working to obtain a mid-term result.
      Anyway, there’s only a very few rooms with serious crushed whites issues. I’ll fix only those. The rest of the game will remain untouched 😉

  23. amir says:

    @Alvare,
    I don’t think these people are saying stop the reduction progress,That’s well,
    albert should keep doing this job but with more cautious to don’t make game flat.

    @albert,If you reducing the contrast and other things,Do you think we can increase it with enb/sweetfx mods with less losing details?
    I’m always increasing contrast and light intensity in other games,Sometimes details is lost but I’ve never seen such large amounts of details like Res4 on your pictures.

  24. Guitar player says:

    People.
    As i said in a earlier post, use your brain and not only your eyes.
    It doesn’t look flat, it’s just that the fake lightning is gone.

    Good luck guys !

  25. mofailed says:

    http://mrwgifs.com/wp-content/uploads/2013/03/Billy-D-Claps-While-Smoking-A-Cigar.gif

    Its like Christmas every time there is an update here. So I’m glad to see a majority approval of this latest update. Cris & Albert well done ! I’m also dumbfounded that I never really noticed these bugs o.O to begin with but then again I never play the steam version anymore. Bought it & felt ripped off so it will collect dust until this work is completed. (:

  26. LV-426 says:

    Forgive my ignorance, but from these comments it sounds like there were certain audio/visual features in the original GC release that didn’t make it to the PS4 / Xbox version. If so, what were they and is their absence really noticeable in the newer versions?

    By the way, this is the most exciting fan project that I have ever seen!

    • albert says:

      Thanks!
      I don’t have the complete list. but DoF effect, reverb eco sound in certain areas are some of those missing effects since PS3/X360 ports
      Only noticeable if you are really used to GC/Wii versions of the game

    • Boris says:

      – Crisper sound effects, positional audio, reverb and DoF (as Albert mentioned)
      – Inventory weapons and items look better
      – Jewels and certain treasures have a shinier appearance
      -Weapon balance is different (Several guns are significantly weaker)

      The differences listed are the ones that stand out the most. There are definitely more subtle ones I’m missing. Another thing I’m going to put up for for dispute is that many of these things are exclusive to the GC version and not included in the Wii version. I could be wrong, but for this reason the GC copy of RE4 remains the definitive version in my eyes.

  27. therealest says:

    Hey Albert and Cris. You guys already know I love your work.

    One small critique, regarding something you should consider changing:

    At 2:30 in the video, that room looks too green, dull, dark, and washed out with grey. The room just looks off, and is missing a lot of needed color. Compare the red of the rug in the original vs the remake to see the stark contrast I’m referring to. I personally think you guys should maybe make it look a bit (just a bit, not a lot) warmer and brighter, so it looks like a “beautiful mansion’s room,” which is how the original made it look. Also, some of the other rooms and corridors of the mansion look like they need a bit of rejuvenation, too. I understand some were intended to look spooky, like that room with the deer head trophy and the painting puzzle, but most just look off. The dark greenish tint is really removing the saturation of everything in a bad way.

    Again, I’m usually the one defending your work, lol, but I also know you guys like constructive criticism to consider.

    Thanks again for your amazing work.

    • albert says:

      Hi!
      Yes, all feedback is welcomed 🙂

      The problem in this room is… the reddish colour was wrong! The right colour is the greyish/cooler tone the original game has in the second part of that room.

      About that room being darker now, you are right. I’m working on obtaining mid-term result. But I don’t think the darker result looks bad. It’s just we are used to the more vibrant colours of the original. But then when you reach a well-illuminated area… crushed whites come to the scene!

  28. Guitar player says:

    Just keep it natural guys

  29. Kaludio says:

    Unrelated thought: quite a few rooms on the first half of the game use the brown/orange leaf texture for the out of bounds background flor textures, however they use very few tiles to cover the surface resulting in what looks to be minivan sized brow leafs. It would be awesome if you guys could fix it, however it is a very small problem only noticible to those who are nosy like me xD.

  30. terminento says:

    Oh my god! You magnificent bastard! You have achieved GENIUS status!

  31. terminento says:

    Mi reacción exacta al leer este post:
    https://www.youtube.com/watch?v=5-4qFzb5kvU

  32. Bonk says:

    Amazing that a fan with random trial and error can fix the horrible white level clipping (And subsequent washing out of detail and contrast because the clipped levels aren’t even properly displayed at 0-255)introduced with RE4 PC easily. And Capcom can’t even be bothered to fix it for the PS4/XBO version to bring it back to the level where it should be, matching the PS2/Wii/GCN versions.

    • Bonk says:

      These issues didn’t exist in the original GCN/Wii game. So they should not here. The clipped detail has driven me crazy from day 1 of this port.

      It’s too bad Capcom has really just not given this game the love it really deserves.
      Now if only there was a way we could fix the messed up audio. Replace low sample rate sound effects with well upsampled ones that try to match the output of the GCN version. (Which did 32khz internally anyway but upsampled to 48khz in hardware at output. Which sounded pretty good most of the time)

  33. william says:

    i am glad someone care that, not just RE4, in Resident Evil revelations 2 lot of trees and objects popping in the distance all of a sudden also…

  34. BG says:

    Oh man, y’all are doin’ the lords work for real. That screenshot with the lantern looks great. The video makes the area look like it came straight out of REmake lol.

    I’m curious if the light intensity setting also covers fire/torches/flame pots? The light emitted from those always seemed kinda dim to me. Maybe not so much the areas being illuminated but the fire itself. Like this random example:

    https://www.re4hd.com/wp-content/gallery/0107-krauser-ancient-ruins/31cT.jpg

  35. aGfH says:

    Hello,

    Are all these change already included in the village download?

  36. Dante says:

    I’ve been following your work for a super long time! (Back when there was only 2 or 3 “Completed” notes in the Castle area) and I gotta say, your determination for fixing the game is insane!

    I got RE4 but I’m not playing it until this mod’s completed. 😛

    Keep up the amazing work, man!

  37. Luis says:

    Resident evil 4 in ps4 seems to have fix the warm/cold issue. In the village. Can it be fixed for pc?

    https://youtu.be/RACqYkDrWY8

  38. Luis says:

    Did u fix the warm just in that room or the whole village?

    • albert says:

      I just need to change 2 bytes in one file in every room with warm colour and that’s it. I did it in 5 rooms already. It’s quite simple! 😀

  39. Luis says:

    Talking about the village, why the gamecube version has red leaves in the ground, and the pc version has brown leaves? Note in the main village the leaves are red, just like in the gamecube. What happened there?

  40. Luis says:

    In pc the start of the village leaves a brown, than they get back to red, when you get to the main Part of the village.

    https://youtu.be/HFvlvq3TIBo

    • Kaludio says:

      Um…. pretty sure that tone shift happens in the original gcn release

    • albert says:

      Thank you for the link!
      Ok I’ve checked our HD textures and you are right, Our HD texture for second room is slightly more reddish and close to the original than the same texture for the first area. You’ve got good eyes!
      I already had this in my “pending” list but I completely forgot about that. So, no worries, the leaves will be more red in the final release if Cris agrees with that. 😉

      • Luis says:

        Also if you look at the end of the comparison video, when leon is on top of the tower aiming down to the fire, you will notice the pc version is missing the blurr effects around fire. How come the ps4 version has that effect intact? Isnt the ps4 the same port as the pc.?

  41. Luis says:

    Dont look at the fire alone. in the gamecube version, look at the enviropment, look at the top of the roof of the houses at the left . Dont you see that boiling water effect on the roof? And arround the fire?

    • albert says:

      Sorry… I don’t see anything 🙁 Does anybody else see that effect?

    • Sergey Tokarev says:

      GCN RE4 runs on much lower resolution, something like 480p if I remember correctly, so it looks kinda blurish, and I think fog is much more noticeable in this version (5:28 for comparison).

      • Luis says:

        Yes i agree its just the lack of anti aliasing of older consoles, that makes it look blurry around fire, but the gc version looks quiet darker and creeper, all other versions look washout. Imo. ?

  42. leon says:

    Thanks for Fixing Issues.

  43. C. says:

    This insures I will donate again.

  44. Leon says:

    Hello.
    Thanks for Fixing Issues,
    It’s wonderful !

    Please fix all lightbubles & Crushed white area.