PadWorld-Entertainment / worldofpadman

World of PADMAN game repository
https://worldofpadman.net
Other
39 stars 9 forks source link

OPENGL2 : Game crashes when loading a map using build #62 from the build workflow (RENDERER: static + missing header includes) #124

Closed 3aTmE closed 2 years ago

3aTmE commented 2 years ago

The Issue:

Upon starting any map with the opengl2 renderer activated crashes the build 62 build immediately. I've have quite a few opengl2 settings set beforehand.

Please refer to the attached qconsole.txt and wopconfig.txt for the console log and my configuration likewise.

Wop 1.6.2 works with my config.

What i tried so far:

Setting cl_renderer from opengl2 to opengl1. >map does load proper

Deleting my wop.config and enabled the opengl2 renderer again with all my settings reset. >crashed again

Please refer to the attached RESETqconsole.txt for the console log.

How to replicate:

My System:

OS: Windows 10 RAM: 64 GB, DDR4 CPU: Intel Xeon E3 1505M V5 GPU: Nvida Quadro M2000M, 4 GB GDDR5

mgerhardy commented 2 years ago

did you use the most recent pk3s? (or pk3dirs - read below)

if you are going to use that build, you should also clone the github repository - set sv_pure to 0 and copy the binaries to the proper locations inside the git workspace. This would allow you to run the game with the most recent binaries and the most recent data files without preparing the final pk3 files.

kai-li-wop commented 2 years ago

I can confirm this issue. Game crashes to Windows 10 desktop after enabling opengl2 renderer, vid_restart, and loading a map from the menu without any error message. I started WoP directly from VS Code workspace using local build Win binaries.

mgerhardy commented 2 years ago

Must be a windows issue - works fine on Linux. Can someone give me a stacktrace? is it an ERR_DROP - or a segfault?

kai-li-wop commented 2 years ago

I could narrow it down to changes I made with https://github.com/PadWorld-Entertainment/worldofpadman/commit/f53a546d67bc0cd2de1a53d81a6e27c53e3b7cd8. When I revert my changes for the OpenGL 2 renderer by setting the Max_Grid_Size from 129 back to 65, the crash does not appear.

kai-li-wop commented 2 years ago

I have now tested a bit and played around with the r_subdivisions of the curved surfaces, but only in the OpenGL1 renderer. For the others it should behave the same.

The maximum details so far with r_subdivisions 4 looks like this. subdivisions4_tris

Reducing r_subdivisions to 2 provides much better detail, as you can see. subdivisions2_tris

Reducing r_subdivisions to 1, however, does not bring any further improvements, at least not here in the example shown. subdivisions1_tris

If you stand a little further away from the surface, it doesn't matter whether the value is set to 4, 2 or 1. The displayed level of detail is the same.

The goal of setting r_subdivisions to 0 was to disable this kind of distance-dependent reduction of the detail level for curved surfaces in general and to always display the maximum. However, this requires an adjustment of Max_Grid_Size from 65 to 129 to avoid the error shown in the screenshot. However, this may not be the correct approach, nor is it necessary. Finally, this leads to a bigger problem with the OpenGL2 renderer. subdivisions0_tris

To be able to keep the Max_Grid_Size of 65, I will now undo some of my adjustments in f53a546d67bc0cd2de1a53d81a6e27c53e3b7cd8 and exclude the possibility to set r_subdivisions to 0 via the system options menu.

kai-li-wop commented 2 years ago

@3aTmE Please try and test with build 68.

3aTmE commented 2 years ago

@3aTmE Please try and test with build 68.

Just tried build 68 and everything just worked fine! Even when throwing settings at the OpenGL2 Renderer that normally tends to break it just worked!

shot0012

OpenGL2 settings used on that build:

r_sunShadows "1"
r_sunlightMode "2"
r_drawSunRays "1"
r_dlightMode "2"
r_glossType "2"
r_pbr "1"
r_cubeMapping "1"
r_parallaxMapping "1"
r_ssao "1"
r_subdivisions "2" // Not OpenGL 2 Related but listed anyways for completion sake

The rest ist kept on default values.

kai-li-wop commented 2 years ago

Great, I think the problem is fixed now and hereby I close the ticket. The screenshot looks very good!

ghost commented 2 years ago

The goal of setting r_subdivisions to 0 was to disable this kind of distance-dependent reduction of the detail level for curved surfaces in general and to always display the maximum.

Actually r_lodCurveError sets the distance, not r_subdivisions.