SWRC-Modding / CT

C++ headers for Star Wars Republic Commando
161 stars 10 forks source link

Bump Mapping Fix not working? #19

Closed donizettilorenzo closed 2 years ago

donizettilorenzo commented 2 years ago

I'm using the 2.8 fix with this: https://www.moddb.com/mods/rc-reskin-remaster/downloads/swrc-remaster-v-14

It seems that the mod is loaded (I see the FPS limit, the FOV slider, etc.) but the bump mapping fix is not working ! I have an Intel iGPU, the HD 750: https://postimg.cc/mtpx16h9

Wrapping to D3D12 with dgVoodoo2 it works.

I'm about to test the OpenGL renderer. EDIT: not working: https://postimg.cc/hhN15LJm

leon-bckl commented 2 years ago

This is not the typical bumpmapping error but something else. Unfortunately I don’t have an Intel iGPU to test it

donizettilorenzo commented 2 years ago

Setting to "LOW" the bump mapping "solves" the issue. OR wrapping to D3D11/12.

High BM (CT.exe) + D3D12 -> https://postimg.cc/9wcqqYJ4

leon-bckl commented 2 years ago

That OpenGL error is really weird though. It makes no sense that loading glDeleteTextures would fail. Especially since glCreateTextures which is loaded before apparently works just fine. Could you maybe upload the log file so I can have a look? Also try this one: OpenGLDrv.zip Shouldn't make a difference but who knows... You can also try setting DebugOpenGL=True under OpenGLDrv.OpenGLRenderDevice in System.ini and see if there's anything in the log.

donizettilorenzo commented 2 years ago

Where's the log?

I see only CT log

_Init: AL_VENDOR : OpenAL Community Init: AL_RENDERER : OpenAL Soft Init: AL_VERSION : 1.1 ALSOFT 1.22.1 Init: AL_EXTENSIONS : EAX EAX2.0 EAX3.0 EAX4.0 EAX5.0 EAX-RAM AL_EXT_ALAW AL_EXT_BFORMAT AL_EXT_DOUBLE AL_EXT_EXPONENT_DISTANCE AL_EXT_FLOAT32 AL_EXT_IMA4 AL_EXT_LINEAR_DISTANCE AL_EXT_MCFORMATS AL_EXT_MULAW AL_EXT_MULAW_BFORMAT AL_EXT_MULAW_MCFORMATS AL_EXT_OFFSET AL_EXT_source_distance_model AL_EXT_SOURCE_RADIUS AL_EXT_STEREO_ANGLES AL_LOKI_quadriphonic AL_SOFT_bformat_ex AL_SOFTX_bformat_hoa AL_SOFT_block_alignment AL_SOFT_callback_buffer AL_SOFTX_convolution_reverb AL_SOFT_deferred_updates AL_SOFT_direct_channels AL_SOFT_direct_channels_remix AL_SOFT_effect_target AL_SOFT_events AL_SOFT_gain_clamp_ex AL_SOFTX_hold_on_disconnect AL_SOFT_loop_points AL_SOFTX_map_buffer AL_SOFT_MSADPCM AL_SOFT_source_latency AL_SOFT_source_length AL_SOFT_source_resampler AL_SOFT_source_spatialize AL_SOFT_UHJ Init: Device supports: AL Log: 32 AL Audio Sources Created! Init: ALAudio: using EAX 3 Init: ALAudio: subsystem initialized. ScriptLog: Team 255 Log: (Karma): KInitSkeletonKarma: Framework, but no world. Init: Input system initialized for InGameTempName Log: Opened viewport Log: SetRes: 2560x1440, 32-bit, Fullscreen: 1 Init: Using pixel format 2 Init: 32-bit color buffer Log: OpenGL debugging enabled Critical: appError called: Critical: Unable to load required opengl function 'glDeleteTextures' Critical: Windows GetLastError: The specified procedure could not be found. (127) Exit: Executing UObject::StaticShutdownAfterError Exit: Executing UWindowsClient::ShutdownAfterError Log: Waiting for file streaming thread to finish... Exit: OpenAL Audio subsystem shut down. Critical: UOpenGLRenderDevice::SetRes Critical: UWindowsViewport::TryRenderDevice Critical: UWindowsViewport::OpenWindow Critical: UGameEngine::Init Critical: InitEngine Critical: Unable to load required opengl function 'glDeleteTextures'

History: UOpenGLRenderDevice::SetRes <- UWindowsViewport::TryRenderDevice <- UWindowsViewport::OpenWindow <- UGameEngine::Init <- InitEngine Exit: Exiting. Log: Waiting for file streaming thread to finish... Exit: Name subsystem shut down; usage 30682 names (31234 max), 925 KB (1031 KB alloc) Uninitialized: Log file closed, 07/27/22 17:43:04_

leon-bckl commented 2 years ago

Yes, CT.log is the correct one. Unfortunately it does not contain the OpenGL version which I was looking for. I reordered some things and now it should be in there. Could you please try again with this dll? OpenGLDrv.zip

donizettilorenzo commented 2 years ago

ScriptLog: InitGame: ScriptLog: Base Mutator is Entry.InGameTempName ScriptLog: GameInfo::InitGame : bEnableStatLogging False ScriptLog: MusicStat is InGameTempName Log: Entry init BeginPlay time: 0.000 sec total, 0.000 app 07/27/22 21:00:34 Log: Post load memory watermark: 2 Log: Entry init time: 0.000 sec total, 0.000 app Log: Entry file load stats: Opens 2, Seeks 4, Skips 9, Reads 31 KB / 16, Serialize 7 KB / 2092 Log: Exiting LoadMap 07/27/22 21:00:34 Warning: Dynamic load UDebugMenu.UDebugRootWindow Warning: Dynamic load UDebugMenu.UDebugBlueLookAndFeel Log: Bound to ALAudio.dll Init: AL_VENDOR : OpenAL Community Init: AL_RENDERER : OpenAL Soft Init: AL_VERSION : 1.1 ALSOFT 1.22.1 Init: AL_EXTENSIONS : EAX EAX2.0 EAX3.0 EAX4.0 EAX5.0 EAX-RAM AL_EXT_ALAW AL_EXT_BFORMAT AL_EXT_DOUBLE AL_EXT_EXPONENT_DISTANCE AL_EXT_FLOAT32 AL_EXT_IMA4 AL_EXT_LINEAR_DISTANCE AL_EXT_MCFORMATS AL_EXT_MULAW AL_EXT_MULAW_BFORMAT AL_EXT_MULAW_MCFORMATS AL_EXT_OFFSET AL_EXT_source_distance_model AL_EXT_SOURCE_RADIUS AL_EXT_STEREO_ANGLES AL_LOKI_quadriphonic AL_SOFT_bformat_ex AL_SOFTX_bformat_hoa AL_SOFT_block_alignment AL_SOFT_callback_buffer AL_SOFTX_convolution_reverb AL_SOFT_deferred_updates AL_SOFT_direct_channels AL_SOFT_direct_channels_remix AL_SOFT_effect_target AL_SOFT_events AL_SOFT_gain_clamp_ex AL_SOFTX_hold_on_disconnect AL_SOFT_loop_points AL_SOFTX_map_buffer AL_SOFT_MSADPCM AL_SOFT_source_latency AL_SOFT_source_length AL_SOFT_source_resampler AL_SOFT_source_spatialize AL_SOFT_UHJ Init: Device supports: AL Log: 32 AL Audio Sources Created! Init: ALAudio: using EAX 3 Init: ALAudio: subsystem initialized. ScriptLog: Team 255 Log: (Karma): KInitSkeletonKarma: Framework, but no world. Init: Input system initialized for InGameTempName Log: Opened viewport Log: SetRes: 2560x1440, 32-bit, Fullscreen: 1 Init: Using pixel format 2 Init: 32-bit color buffer Log: OpenGL debugging enabled Warning: wglCreateContextAttribsARB failed Init: GL_VENDOR : Intel Init: GL_RENDERER : Intel(R) UHD Graphics 750 Init: GL_VERSION : 4.6.0 - Build 30.0.101.3113 Critical: appError called: Critical: Unable to load required opengl function 'glDeleteTextures' Critical: Windows GetLastError: The specified procedure could not be found. (127) Exit: Executing UObject::StaticShutdownAfterError Exit: Executing UWindowsClient::ShutdownAfterError Log: Waiting for file streaming thread to finish... Exit: OpenAL Audio subsystem shut down. Critical: UOpenGLRenderDevice::SetRes Critical: UWindowsViewport::TryRenderDevice Critical: UWindowsViewport::OpenWindow Critical: UGameEngine::Init Critical: InitEngine Critical: Unable to load required opengl function 'glDeleteTextures'

History: UOpenGLRenderDevice::SetRes <- UWindowsViewport::TryRenderDevice <- UWindowsViewport::OpenWindow <- UGameEngine::Init <- InitEngine Exit: Exiting. Log: Waiting for file streaming thread to finish... Exit: Name subsystem shut down; usage 30682 names (31234 max), 925 KB (1031 KB alloc) Uninitialized: Log file closed, 07/27/22 21:00:37

donizettilorenzo commented 2 years ago

Intel driver OpenGL compliance issue? procedure not found, LOL

leon-bckl commented 2 years ago

Yes most likely. It's just so weird because glCreateTextures works fine. There's also this which is interesting: Warning: wglCreateContextAttribsARB failed. But all in all would say that's an Intel issue and there's nothing I can or want to do about it.

But coming back to the bumpmapping error. Maybe that has a similar cause. Could you test it with a clean version of the game? Only use CT.exe so you get an error message, no other files from the mod and no d3d wrapper. That error you posted is not the error you usually get when the bumpmapping doesn't work. It normally fails somewhere else and I'd like to know if it gives you the same error as before or the one I would expect.

donizettilorenzo commented 2 years ago

No bump map errors with original files. So it's something in the texture upscale mod (maybe the widescreen support code injected via a DLL)

leon-bckl commented 2 years ago

So it doesn’t happen if you only have my mod installed?

donizettilorenzo commented 2 years ago

Yes, all works right.

leon-bckl commented 2 years ago

Could be a memory problem with the remaster mod. Many of their textures are unreasonably large for the amount of detail they contain and not properly compressed. I'll close this now since it appears to be unrelated to the bumpmapping fix.

StormtrooperLawyer commented 2 years ago

just want to add on this; "Could be a memory problem with the remaster mod. Many of their textures are unreasonably large for the amount of detail they contain and not properly compressed."

I will have to disagree with you there Leon. All textures are properly compressed. The mod worked fine on the 2.7 release but not in the 2.8.

leon-bckl commented 2 years ago

Ok, I see you use dxt3 now. Why not dxt5? In any case, it still takes up way too much memory. I can't even run UnrealEd without the 4gb patch

StormtrooperLawyer commented 2 years ago

The debug (!) editor works fine for us on the disk version and we indeed used dxt3 in the early stages, but replaced it later with either dxt1 or dxt5.

leon-bckl commented 2 years ago

Yeah, that has the 4gb patch. I only looked at the HudArms because I noticed the huge file size difference and those are dxt3 (irrelevant when it comes to compression as both have the same 4:1 ratio though). But look, all I'm trying to say is your mod is a little wasteful when it comes to memory. A lot of the textures could easily be half the resolution (especially the bumpmaps which are not actual bumpmaps btw. which would also half the memory usage) without it looking noticeably worse. That way you'd have more memory budget left for some of the environment textures that really need it.

TheMan20085 commented 2 years ago

Other RC Remaster dev here, there's indeed textures that can be lowered in size, and i think you mean the helmet bump which can be lowered in size (which i was planning to do, 1k is max for bumps imo). There's still a ton of optimizing to do which we're working on and also hoping we don't run into the limit too fast, but since most textures are in now, along with not as much crashes as earlier versions, i feel like we're on the right track.