stohrendorf / CroftEngine

An open-source Tomb Raider 1 engine remake
Other
281 stars 18 forks source link

glitches on the ground #300

Open legluondunet opened 1 year ago

legluondunet commented 1 year ago

Hello, I just compiled today's git croftengine on Linux. Three things:

I tried to report this issue on youtrack but it seems I haven't permission to do that. Thank you for your help.

stohrendorf commented 1 year ago
  1. What do you mean by "does not seem to be compatible"? Explain what you did, and what happenened.
  2. That is just an information that there are no translations available for your locale, it will automatically fall back to English. As of right now, there is no French translation of the engine.
  3. That's got nothing to do with the level data. What OS are you on, what graphics card do you use, what version of CE are you using?
legluondunet commented 1 year ago

"What OS are you on, what graphics card do you use, what version of CE are you using?"

I compiled CE from git yesterday.

My config: OS: Manjaro 22.0.2 Sikaris Kernel: x86_64 Linux 6.1.9-1-MANJARO CPU: AMD Ryzen 9 5900HX with Radeon Graphics @ 16x 3.3GHz GPU: AMD Radeon RX 6600M (navi23, LLVM 15.0.7, DRM 3.49, 6.1.9-1-MANJARO) Video drivers: Mesa 22.3.5

I own Steam (english) and GOG (english) and even CD (french) version of Tomb Raider 1.

legluondunet commented 1 year ago

"What do you mean by "does not seem to be compatible"? Explain what you did, and what happenened." If you agree, we will see later or in another report this point and I invite us to focus on the problem of glitches on the ground? The TR1 version I used come from steam. As the CE import feature did not work, I imported manually files, copied/paste folders fmv, data and music. I have attached the result of the tree view with details of the file sizes in bytes. ce_tr1_tree.txt

stohrendorf commented 1 year ago

Ah, you probably found a commit that broke the graphics, but it's fixed now, although it now has a performance regression. Additionally, 2.0 has a bug that prevents importing the CD images. For importing checkout tag 1.9, then checkout tag 2.0 to play, and everything should be fine.

stohrendorf commented 1 year ago

I'm sorry, I messed up with the versions. You may checkout the latest master, it contains the fixes, but support for non-releases is limited.

legluondunet commented 1 year ago

I will give it a try when I will return at home.

legluondunet commented 1 year ago

Just tried today's git code:

More than words, this is a video: https://youtu.be/nG7QYyb8IuE

stohrendorf commented 1 year ago

Oh, that's clearly broken shadow mapping, haven't seen that for quite a while, so I didn't recognize it immediately. As it's probably a race condition with texture access, I'm not sure I can reproduce it on my system.

stohrendorf commented 1 year ago

I finally got my system (partially) running again, and I can't reproduce it, neither in debug mode, nor in release mode. Please note that I was only able to test the amdgpu driver, so it might be because of different drivers. What are your drivers and versions? What is your Mesa version?

legluondunet commented 1 year ago

GPU: AMD Radeon RX 6600M (navi23, LLVM 15.0.7, DRM 3.49, 6.1.9-1-MANJARO) Video drivers: Mesa 22.3.5 Do you need others info?

I launch CroftEngine directly from compile folder. My compilation process:

git clone https://github.com/stohrendorf/CroftEngine.git cd CroftEngine git submodule update --init --recursive mkdir build cd build/ cmake -DCMAKE_BUILD_TYPE=Release .. make cd src ./croftengine

stohrendorf commented 1 year ago

Can you take a look at the log files and confirm that the "opengl ..." log lines report that it's actually using that graphics card? I have the suspicion that it's running on some integrated intel GPU, which would explain the problems.

legluondunet commented 1 year ago

I join you my latest log: croftengine.1.log Croftengine seems to use my main GPU card.

stohrendorf commented 1 year ago

From what I could find on the internet, the RX 6600 series seems to have a lot of issues and bugs. Many users complain their system won't even boot, others have the problem that the GPU isn't identified correctly, some have crashes, etc., although a few times it was mentioned that updating everything to the newest releases seems to have fixed stuff. I think you got bad luck with your GPU.

legluondunet commented 1 year ago

My GPU card is today well supported now on Linux, since 6.x kernel version. With kernel version < 6, that was not the case. I own more that 100 3D games on Steam and all work very well with my GPU, my computer is very stable. Latest games I played are "Assasin Creed Origins", "StarWars Fallen Order", two games that need strong GPU performance. The issue should not be there... Is it possible to activate a more debug mode for Croftengine?

stohrendorf commented 1 year ago

You can try to re-build using -DCMAKE_BUILD_TYPE=Debug, that enables a lot of thorough checks of the graphics calls, but performance may suffer a bit.

legluondunet commented 1 year ago

I just compiled a debug release with today's git. Issue is still present. I joined you log file. croftengine.0.log

stohrendorf commented 1 year ago

Unfortunately, that log file doesn't help. In debug mode, if there's any issue with the graphics pipeline, the engine just crashes, and this means that (in general) the pipeline is working fine for you. Additionally to that, you're the only one who reported this issue, and I'm unable to reproduce it. I looked into the code and couldn't see any issue (but that doesn't mean there is no error). As CE uses some advanced OpenGL features, it might be that it either has a rare bug (which I consider unlikely given on how many systems this runs fine on), or that you discovered a rare bug in the graphics driver. In any way, as of right now, I don't have a solution for your problem, I'm sorry.

legluondunet commented 1 year ago

ok, I let this report open, in case another user have the same issue as me on Linux or Windows. We'll see in several month if I can still reproduce it. Thank you for your help.

stohrendorf commented 1 year ago

FYI, the recent nvidia and AMD driver updates on my Windows system point towards the engine having some issues with resource handling regarding textures. As the shadowing is (basically) just a texture, this means that it's probably a fundamental engine issue. I'm currently investigating, but as of right now, I only have very vague suspicions what's going wrong. I hope the solution to the issues the engine has resolves your issues, but as of right now, I'm mostly clueless.

legluondunet commented 1 year ago

I just compiled today's git and issue is still present.

stohrendorf commented 1 year ago

Oh sorry, there's no fix yet, there's only hope for a fix now, just wanted to let you know about that.

stohrendorf commented 1 year ago

Can you try the latest master, please? There were some major changes to the render pipeline that might resolve your issues.

legluondunet commented 1 year ago

I just compiled today's git and I have bad news, two things:

Capture d’écran_2023-03-14_20-31-37

legluondunet commented 1 year ago

I joined another log, this time crash appeared when I selected "Details levels"

croftengine.4.log

stohrendorf commented 1 year ago

Thanks, I'm pretty sure I have fixed the crashes. But I'm not sure what you mean with "strange colors", the only thing I can currently imagine is that the texture interpolation is different. Can you please try the latest master again and tell me whether it crashes and possibly fixes your issues?

legluondunet commented 1 year ago

my english is limited but "the texture interpolation is different" is exactly what I meaned. New compilation in progress...

legluondunet commented 1 year ago

Crosoftengine still crash when I try to access "Details levels"

croftengine.5.log

legluondunet commented 1 year ago

Good news: I can launch a new game without crash, but the graphical issue is still present. croftengine.6.log

stohrendorf commented 1 year ago

Oh. Thanks for that quick bug report. I'll look into it, but not today anymore, sorry. Can you tell me how you triggered that crash?

legluondunet commented 1 year ago

From the main menu, I selected "Details levels" and it crashed.

stohrendorf commented 1 year ago

Thanks, just fixed that crash (I hope). I only checked whether the menu worked in-game, not within the main menu.

legluondunet commented 1 year ago

you fixed it, no more crash.

stohrendorf commented 1 year ago

Sorry about bothering you again, but could you check the latest master? There were changes that will maybe make things worse for you, but I'm still trying to nail the problem down, and any change may help discover the root cause.

legluondunet commented 1 year ago

hello @stohrendorf , the graphic issue is still present.

stohrendorf commented 1 year ago

Thanks. Does make MESA_LOADER_DRIVER_OVERRIDE=radeonsi path/to/croftengine any difference? If so, it's an issue with the zink driver. If not, I'd like to prepare a special branch with a series of debugging commits to analyse what's going on here, but that would require a bit of work from you to test these commits and make screenshots. Would that be okay?

legluondunet commented 1 year ago

I recorded you two scenari: normal launch and a second with the specified command: https://youtu.be/p-8DT-xfEKU

" Would that be okay?" Let's go!

stohrendorf commented 1 year ago

Okay, here's the first set of tests to try and narrow the issue down. You only need to git fetch and then git checkout the mentioned commits, and then make. Please use the attached quicksave to have comparable results, so I can compare it with the results on my machine.

quicksave.zip

Big thanks!

legluondunet commented 1 year ago

1° ) 6c90e569f12832eaaa6045bac26317d1d922963b no change, same issue still present Capture d’écran_2023-03-23_20-46-17 croftengine.0.log

legluondunet commented 1 year ago

2°) a0bf5d2b16b569f35a80a7b45cbbd8e89905a520 crash before showing main menu croftengine.1.log

legluondunet commented 1 year ago

3°) ea1042fe7f13bdfe3af51383e1f5fdf5d6a3dce8 a great change on the issue, deserve a video: https://youtu.be/xpVu2k6gnmw

croftengine.3.log

legluondunet commented 1 year ago

4°) 409265ed6d8c954ba593e3e6e7d7f389390da120 black and white Capture d’écran_2023-03-23_21-01-36 Capture d’écran_2023-03-23_21-01-51 croftengine.4.log

stohrendorf commented 1 year ago

Thank you very much. The crash with test 2 shouldn't have happened at all, I'll investigate. About tests 3 and 4, these basically replace some rendering outputs with with internal shader stuff that I can test against. Regarding test 3, this confirms that the shader is working correctly at the tested point, so everything is fine here, even if it changes rendering drastically for you.

stohrendorf commented 1 year ago

Thanks, test 4 is an actual issue that is at least a part of the problem. I need to figure out a few more tests to narrow it down further, though. This is very valuable.

stohrendorf commented 1 year ago

Here's the next set of tests, these skip internal stuff and should hopefully not look that broken, except maybe the first one.

legluondunet commented 1 year ago
legluondunet commented 1 year ago
legluondunet commented 1 year ago
stohrendorf commented 1 year ago

That's worrying. Does 5fdb31535359923364e99fea85eff20aed7f401d change that?

legluondunet commented 1 year ago
stohrendorf commented 1 year ago

Dang. How about bfee7da6638e895b8c9aa6c603b11c5067477e4a? If that doesn't work there are only very few places left to check.