Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Fluid rendering issue on second camera when VR is active (URP)
#1
Okay, got a real edge case here. I've got a project that is primarily VR, but I want to provide a way for the screen to display a different camera view rather than being a direct mirror of the VR camera. Previously I had set this up using a second camera in the scene with a higher priority than the VR camera, and it seemed to work well. Since upgrading the project to use URP, I'm noticing some irregularities in the way the second camera renders fluids, especially when changing priorities to show/hide this second camera view.

I've recorded a video showing the issue, which shows the URP settings - though they're pretty much defaults aside from enabling the depth/opaque texture for transparency.

https://www.dropbox.com/s/v2h92gextezcdo....webm?dl=0

In case it's hard to see there, I've basically just imported the SteamVR CameraRig prefab and set its camera's priority to 1, and set the second camera's priority to 2. I also set the second camera's "Target Eye" to "None (Main Display)", where the SteamVR camera has its Target Eye set to "Both". In the video I switch the VR camera's priority to 3 so the VR view is shown in the Game window, then set it back to priority 1.

There are actually a couple different issues that seem to be present. Even before changing the priority, the rendering of the fluids doesn't look quite right in the Game view from the second camera - the fluid isn't blended/smoothed together as much as it is in the Scene view, or later in the VR camera's view. Then after changing the priority and changing it back, the fluid almost disappears entirely in the second camera's view.

Now realistically I wouldn't enable or disable this second camera view by changing priorities, I would just activate/deactivate the entire GameObject so it doesn't get rendered anymore, and if I do that then the second issue of the invisible fluid does not happen. However, the smoothing issue is still happening on the second camera in that case.

I've noticed that I can't recreate this in a non-VR project - it only seems to happen when VR mode is active and a camera with Target Eye of "Both" is being controlled by the VR headset.

(Unity 2019.4.15f1, URP 7.5.2, Obi Fluid 5.6.1)

Any ideas what would be causing this, or if there's a way to fix it? This isn't a huge priority since it isn't a major feature of the game, but it would be nice to have if there's a fix for this.
Reply


Messages In This Thread
Fluid rendering issue on second camera when VR is active (URP) - by Softscale - 23-12-2020, 10:17 PM