NVIDIAGameWorks / dxvk-remix

zlib License
316 stars 64 forks source link

Vertex Capture regression identified: "Meshes Exploding" or garbled when viewed from certain angles. #43

Closed WeRideForCoffee closed 1 year ago

WeRideForCoffee commented 1 year ago

Some meshes appear to "explode" when viewed at certain angles, and while which meshes do so differ from run to run as does the severity of the issue, but it always shows up eventually.

By investigating the issue, it appears that there is some form of race condition that results in Remix confusing the list of vertex positions from multiple different objects, and trying to reconstruct a mesh from that; presumably trying to construct a mesh with the same number of vertices as originally correct, but with positions varying between the correct ones and those of other meshes in the scene. (This is best demonstrated by a screenshot of a USD capture provided below, imported into Blender, where you can see some scene geometry is clearly accessing the vert information of the character's eye, with and without relative translation from the presumed center of the scene)

By sheer dumb luck, I remembered this issue not always existing and by testing I've been able to identify a specific older version of Remix DXVK which does not experience the same issue, which thankfully was easy to test against and mostly stable with the newest version of Bridge.

Remix Version information:

Please Note I did some testing just before posting, dxvk-remix-e010672-87-release is the last version I have saved that does not have this issue. dxvk-remix-cb1d0a3-115-release (saved to my machine ~12th June) also displays the garbled meshes same as the newest builds.

Machine and game information:

GPU: 3070 Aorus Master, Nvidia Driver 537.13 Game Ready driver

Game & Build: TES IV Oblivion: Retail box copy with Shivering Isles Expansion and the boxed set of "DLC" and patched to v1.2.0416 (Latest) Oblivion has also been treated with the 4GB patch, but the issue was present before this.

Logs:

Zip contains log files generated while running the game with latest Bridge and each of the dxv remix builds as labled in the folder and listed above: Log Files from old and new dxv-remix.zip

Configuration Files:

Attached below as a .zip, as Github is a little fussy with INI and CONF file type attachments: ConfigFiles.zip

If you need a copy of the action build files identified let me know, I'd attach them here but Github won't accept a ~30gb.zip

To Reproduce this issue

Follow the following steps on a fresh install of Oblivion, patched to latest, with Remix 0.2.0 installed, the latest bridge build installed and one of either of the identified dxvk-remix action builds installed in turn:

  1. Navigate to C:\Users\{USERNAME}\Documents\My Games\Oblivion\Oblivion.ini and edit the following lines for a minimal setup: If the .ini does not exist, launch and exit the game's launcher, which should create the .ini as required. Comments are provided for configuration options where I have been able to provide them

Perform a search for each key (eg "bFull Screen") and set that whole line to the line below, or replace your INI with the one provided and DO NOT launch the Oblivion Launcher (as it will replace the INI provided with default values for reasons I dont understand)

bFull Screen=0 ; For your convenience when reloading the application multiple times to avoid monitor resolution switching.
iSize W=1920
iSize H=1080
SIntroSequence= ; by setting this value to nothing, it skips all of the intro videos, very convenient for multiple restarts.
bDoImageSpaceEffects=0 ; Prevents an unrelated visual glitch regarding Remix struggling to handle fullscreen shader effects, which causes a while quad mesh to be drawn over the sky in a veryy distracting and inconsistant manner

The below edits are not nessesary, but can save you from needing to enter several console commands during testing:

bFullBrightLighting=1 ; Replaces the console command 'tlb` (Toggle Light Bright)
bDisplayLODLand=0
bLODUseCombinedLandNormalMaps=0 ; Prevents LOD Normals from being loaded
bForceHideLODLand=1 ; Replaces the console command 'tll` (Toggle Lod Land)

Full Bright Lighting is borderline essential for Remix without comprehensive mod replacements available, as it simplifies the scene sufficiently that Remix is able to produce a mostly-correct result, and on the plus side also significantly reduces the performance cost of the game. I've never been able to get any point lights from Oblivion to capture regardless, so running with tlb has no cost aside from issues with the terrain LOD from the original game, which can be disabled with tll during runtime, or disabled in the INI,

  1. Install one of the two identified DXVK-Remix versions, I reccomend starting with the latest to see and understand the issue at hand, IDing the issue following the steps below, then copying the older version over the top in .trex and continuing from this reproduction step to see how the same scene responds without.

  2. Start the game by navigating to where it is installed and running Oblivion.exe directly. This skips the game launcher which prevents it from trying to modify the game's INI file, which it often tries to do.

  3. Select "New Game" from the main menu. After the loading screen you may skip the opening cutscene by pressing escape. If you are not using the rtx.conf provided below, you will need to flag some UI textures on the main menu before you continue.

  4. If you are not using the INI settings that enable lightbright mode by default, you will need to open the console here (with '~' key) and type in 'tlb' to toggle Light Bright mode, this will prevent Remix from getting confused by any of the game's shaders or normal maps. If you find yourself testing outside, tll can disable LOD land, and ts disables the sky dome. The issue is still visible without doing so however, but instead of meshes exploding, some meshes (most reliably the player body) will simply cease to render at all when mesh explosions would occur.

  5. Pan the view on the character creation screen by clicking and dragging left and right over the character visisble on the right side of the screen. At certain angles you should notice severe slowdowns and visual artefacting. If you cannot see anything (scene too dark), you can enable "Include Unordered Emissive" under the Pathtracer > Integrator portion of Remix's Developer menu, or enable fallback lighting. Some panning back and forth might still be required to get the scene lit correctly. The old version of DXVK respects the unordered emissive option in the menu and should load it correctly for you, but the newer versions of DXVK Remix never respect this rtx.conf setting and do not set it on load (or the denoiser setting for separating primary or indirect denoising, but I'll make a separate issue for these)

For the old version of Remix, nothing should happen, on the newest version the artefecting should be immediate, reliable and noticable on panning (or rarely: without panning at all).

Expected behavior

The older version of DXVK Remix shows the expected behavior, ie the lack of performance impacting, capture impacting and visually distracting "mesh explosions", as shown as present in the latest builds.

Screenshots

Provided is a screenshot from a USD Capture of the issue brought into Blender, with the matching texture assigned to illustrate the issue. example of the mesh explosions captured in USD

Demonstration of the same scene, with the old version of dxvk which does not produce the issue on the left, and the latest build on the right. I had recordings of a more severe example but the visuals completely destroyed the bit rate making it unrecognisable, so I've gone with the simpler, milder occurance here: demonstration of issue in game


Finally just a big, ol' thank you to everyone over at team green working on this amazing set of tools, you're all awesome! This project has been immensly fun to work on, and I'm happy to be able to contribute if only in the form of very intermittent bug reports.

WeRideForCoffee commented 1 year ago

Accidentally hit enter while typing the title and before attachments, gimme a mo and I'll put these here. Submitted bug report here instead of under combined repo as I was unable to submit to the combined repo at all for reasons I couldn't figure out. Ill put attachments under here in just a moment:

WeRideForCoffee commented 1 year ago

Nevermind on the attachments front, I didn't realise they re-uploaded when I pasted the issue back across from my notes app. Good stuff!

WeRideForCoffee commented 1 year ago

Posted as originally intended (and asked for in the Discord at some point) to the combined repo bug tracker: https://github.com/NVIDIAGameWorks/rtx-remix/issues/245 Closing here as not needed.