WolvenKit icon indicating copy to clipboard operation
WolvenKit copied to clipboard

Road Proxy/LOD Textures Stop Working If Save Game Was Reloaded

Open NeHooYeY opened this issue 1 year ago • 9 comments

Description: Road proxy meshes that have "engine\materials\metal_base_proxy.mt" in preloadLocalMaterialInstances with BaseColor texture shows replaced texture correctly when loading save game from Main Menu, but when player reloads save from pause menu during active game session all custom proxy textures stop working globally. If player returns to Main Menu and loads save game without game restart, proxy textures working again.

  • Loading game from Main Menu: Replaced Proxy Textures Work
  • Loading game from Pause Menu: Replaced Proxy Textures revert to vanilla
  • Return to Main Menu without game restart and loading save from there makes Replaced Proxy Textures work again.

Reloading Archives using RHT, then reloading save from Pause Menu(ESC) does not fix the issue, also game doesnt crash when doing so if it matters.

From my observations:

  • There are no "embedded" textures in proxy meshes, paths to textures within mesh have "Default" flag.

  • Switching from preloadLocalMaterialInstances to > localMaterialBuffer as a test does not fix the issue.

  • Adding .streamingsector_inplace that contains original proxy mesh as well as texture with "embedded" flag, then nulling it completely and testing does not fix the issue.

I'm adding only proxy textures for roads into my project/.archive, no .streamingsector files, as well as no proxy meshes(prx.mesh for search in Asset Browser) used. Adding proxy road mesh to project and custom-pathing .xbm texture does not fix the issue.

  • Textures were imported as .png using correct import settings [Checked in CBitmapTextue > "setup"] from original proxy texture.
  • I'm not using any LOD altering mods, that could affect my textures.

To Reproduce Steps to reproduce the behavior:

  1. Install "brightE3r_roads.archive" : https://drive.google.com/file/d/1bR6eR3sr7waJEvAAKA4X6vFkdk5W_o9V/view?usp=sharing

  2. Go to this location:

(map)


  1. Save your game at that spot and Restart the Game.

  1. Load That Save Game From Main Menu and look in Kompeki Plaza direction, you should see working proxy texture:

works

  1. Press ESC to enter Pause Menu and Reload Same Save, when game is loaded, you will see that proxy texture reverted to vanilla:

doesnt

  1. Press ESC and Exit To Main Menu, load that save again from Main Menu without Game Restart, it will work again:

works

Expected behavior Working proxy textures when game was loaded from Main Menu or Pause Menu during active game session after initial save load.

Version:

  • WolvenKit Nightly 8.14.1 from June 11, 2024

NeHooYeY avatar Jun 17 '24 19:06 NeHooYeY

Don't think that a bug in WolvenKit. If it were, it would never work. But since its working on a "full" reload... The archive contents won't magicly change on reload. Probably more like the engine loads another mesh/texture on "soft" reload.

Also if you want that one of us (or another modder) take a look at it, please provide a minimal working example (files/info needed to replace the (proxy) texture in the first place). Since we won't ( at least not me ) start to fiddle around hundred of files (or how sectors work) just to test something^^ Working on WolvenKit doesn't mean/imply that we know how everything works ingame :)

seberoth avatar Jun 18 '24 04:06 seberoth

they've linked the mod in the steps to reproduce?

Simarilius-uk avatar Jun 18 '24 08:06 Simarilius-uk

I know. And its good to reproduce it ingame. But at least me doesn't know enough about streamingsectors that I can tell which of the 130 mesh/texture files in the archive is responsible for the street texture at this location (or which mesh / proxy mesh is used to load them).

If it is enough for you, feel free to check it.

seberoth avatar Jun 18 '24 09:06 seberoth

Oh, yeah, that's confusing.

If it still matters im linking relevant .streamingsector, proxy mesh and proxy textures from screenshots example.

Link: https://drive.google.com/file/d/1OEajZLTwHxF0IbGV2JJUJN75sjsfuLzj/view?usp=sharing

  • Path to sector: base\worlds\03_night_city_compiled\default\exterior_-2_2_0_4.streamingsector
  • Node: 707
  • Path to prx1.mesh from screenshots: base\worlds\03_night_city\sectors_external\road_meshes\r_roadsplinenode_103_ff74f81a\prx1.mesh

Cyberpunk-2077-C-2020-by-CD-Projekt-RED-18-06-2024-18-14-46

I see there is indeed "Soft" flag in that 707 node mesh DepotPath. I dont know what that means to be honest.

NeHooYeY avatar Jun 18 '24 15:06 NeHooYeY

Thanks for the info :)

Didn't test it yet, but node 707 refers to base\worlds\03_night_city\_compiled\default\4e5438109469f1cf.streamingsector_inplace which indeed has an embedded version of base\worlds\03_night_city\sectors\_external\proxy\2727358387\rt_2x2_with_sidewalks_12m_cracks_d.xbm and base\worlds\03_night_city\sectors\_external\proxy\3059599730\rt_2x2_with_sidewalks_24m_cracks_d.xbm

seberoth avatar Jun 18 '24 16:06 seberoth

Yes, i've added that .streamingsector_inplace to the project for tests and removed all data from it, no change. What i had not yet tried is converting it to .json, change all flags to "Default" and convert back from .json

NeHooYeY avatar Jun 18 '24 16:06 NeHooYeY

Done some "research" (Modified each file which has rt_2x2_with_sidewalks_24m_cracks_d.xbm as embedded and removed it...)...

As soon as I remove it from base\worlds\03_night_city\_compiled\default\ac5dc8a397fc4856.streamingsector_inplace, the texture will stay between "ingame" reloads. Its strange since its only referenced in base\worlds\03_night_city\_compiled\default\exterior_-3_3_0_4.streamingsector which doesn't seem to be related... grafik

seberoth avatar Jun 18 '24 17:06 seberoth

Maybe exterior_-3_3_0_4 gets loaded first if reloaded ingame, the texture gets cached and then exterior_-2_2_0_4 gets loaded and uses that cache. Not sure why the behaviour is different when someone loads from the main menu

seberoth avatar Jun 18 '24 18:06 seberoth

Oh nice, so after removing the original proxy texture from the .streamingsector_inplace files, custom one becomes stable?

NeHooYeY avatar Jun 18 '24 21:06 NeHooYeY