NVIDIAGameWorks / rtx-remix

Combined repo for the RTX-Remix runtime
https://www.nvidia.com/en-us/geforce/rtx-remix/
MIT License
1.38k stars 69 forks source link

[Toolkit bug]: Left Handed Z-Up game is upsidedown in toolkit #312

Closed mmdanggg2 closed 9 months ago

mmdanggg2 commented 9 months ago

Contact Details (Optional)

No response

Describe the bug

I have a game (Unreal) that uses a Left handed Z-Up coordinate system and I have marked it as such in the remix menu. The captures and cameras load in fine but everything is upsideown, up is towards -Z which makes navigating quite difficult!

How do you reproduce the bug?

  1. Find a game that uses a left handed Z up coordinate system and capture a scene
  2. Load that scene in remix toolkit image Attached capture: 2024-01-22_21-28-35.zip

What is the expected behavior?

The toolkit should load the scene the correct way around!

Version

2024.1.1

xbei-nv commented 9 months ago

Have you sync to the latest dxvk-remix code? We have merged lots of fixes and asaik this issue has been solved.

mmdanggg2 commented 9 months ago

Grabbed the latest from main as of 2hrs ago (https://github.com/NVIDIAGameWorks/dxvk-remix/commit/d1ba9c9f2f08652bd2a4d05adedf34d2fc63d975) and it is the right way up now but everything is mirrored now: image

xbei-nv commented 9 months ago

How does it looks like in the real game?

xbei-nv commented 9 months ago

I just did multiple tested with exactly same setups (zUP + LHS), haven't seen any mirror issues

mmdanggg2 commented 9 months ago

As the first capture: image

mmdanggg2 commented 9 months ago

If I disable both Zup and LH then it will come in correctly but in the wrong orientation: image And then only enabling Z up it is correctly oriented but mirrored. Setting LH from that seems to do nothing different.

xbei-nv commented 9 months ago

That's very interesting, I tried many more tests with left handed Z up coordinate system but still can't reproduce this

xbei-nv commented 9 months ago

Which game are you testing? Also, could you create a new issue ticket to report bug for this specific game? We need to close this one b/c it's not upside down issue anymore and not generic to all games.

mmdanggg2 commented 9 months ago

Ok, sure. It's Unreal Tournament but I've written a new render plugin for it.

xbei-nv commented 9 months ago

Did you change any transformation matrix? Especially the projection matrix

KCDQYaniss commented 9 months ago

Same problem here with GTA San Andreas, Z-Up + left-handed it ends up upside down, I updated everything of course

mmdanggg2 commented 9 months ago

Did you change any transformation matrix? Especially the projection matrix

I'm using the DirectX XMMatrixPerspectiveFovLH for projection XMMatrixLookToLH for view

xbei-nv commented 9 months ago

Same problem here with GTA San Andreas, Z-Up + left-handed it ends up upside down, I updated everything of course

You need to update to https://github.com/NVIDIAGameWorks/dxvk-remix/commit/d1ba9c9f2f08652bd2a4d05adedf34d2fc63d975 . I tested exactly same thing 1 minute ago and no upside-down issue.

xbei-nv commented 9 months ago

Did you change any transformation matrix? Especially the projection matrix

I'm using the DirectX XMMatrixPerspectiveFovLH for projection XMMatrixLookToLH for view

That could be issue if it's dx matrix. How does it looks like without your plugin

mmdanggg2 commented 9 months ago

Well, it's a total mess since the game transforms the world on the cpu around an identity matrix view normally. Z up and LH seem to do nothing here: image Here's an apitrace from my plugin version if that helps: UnrealTournament_apitrace.zip

xbei-nv commented 9 months ago

Is this screenshot from your plugin version or it's original game?

mmdanggg2 commented 9 months ago

Is this screenshot from your plugin version or it's original game?

That's from the game, unmodified, basically unusable.

KCDQYaniss commented 9 months ago

Same problem here with GTA San Andreas, Z-Up + left-handed it ends up upside down, I updated everything of course

You need to update to NVIDIAGameWorks/dxvk-remix@d1ba9c9 . I tested exactly same thing 1 minute ago and no upside-down issue.

Nope, issue still there :/

xbei-nv commented 9 months ago

Same problem here with GTA San Andreas, Z-Up + left-handed it ends up upside down, I updated everything of course

You need to update to NVIDIAGameWorks/dxvk-remix@d1ba9c9 . I tested exactly same thing 1 minute ago and no upside-down issue.

Nope, issue still there :/

Are you sure you have updated all binaries and run game/capture again? You need to compile the latest code and update DLLs. This is one of the first games on my test list when solve this issue, so I think it should work well.

KCDQYaniss commented 9 months ago

Same problem here with GTA San Andreas, Z-Up + left-handed it ends up upside down, I updated everything of course

You need to update to NVIDIAGameWorks/dxvk-remix@d1ba9c9 . I tested exactly same thing 1 minute ago and no upside-down issue.

Nope, issue still there :/

Are you sure you have updated all binaries and run game/capture again? You need to compile the latest code and update DLLs. This is one of the first games on my test list when solve this issue, so I think it should work well.

Yep, updated everything, image

RuneStorm commented 9 months ago

I am running into a similar issue with Unreal Tournament 2004. Capturing without any changes gives me a 90° rotated and flipped capture because in UE Z is up, so changing it gives me the correct orientation, but flipped along the X. When I toggle Left handed however, the entire scene breaks. Left Handed seems to breaks a lot of things. By the looks of it, the front faces get inverted too which is unexpected behavior. Ingame-Screenshot capture_orientation

xbei-nv commented 9 months ago

@RuneStorm @mmdanggg2 OK I guess there're something not works well on UE based games, we will investigate it.

automata-rtx commented 9 months ago

Yeah it might be a UE issue. I'm trying it on Star Wars Republic Commando (UE2) and the capture is also on the wrong axis. Makes the toolkit editor super disorienting to use

z1chsr commented 9 months ago

having the same problem with call of cthulhu dark corners of the earth, this game is NOT a UE based game. flippedfaces

xbei-nv commented 9 months ago

Hi we have got a fix for this one, you can quickly check the fix on main branch (release version will be updated soon)

z1chsr commented 9 months ago

wooo, thx for the update!

xbei-nv commented 9 months ago

Confirmed this upside-down issue in toolkit is solved.