Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Using Fluid in VR (HTC vive)
#16
(08-02-2022, 01:23 PM)josemendez Wrote: Hi there,

Could reproduce the issue with fluid not rendering on separate cameras in 2020.3 and above. Not sure what has changed in Unity's side for this to stop working, going to investigate and get back to you.

All fluid lighting us calculated using the eye-space position of the fluid. Since the fluid's surface is not a mesh but an implicit function, positions areĀ  reconstructed from the depth buffer and the camera's frustum data (which is passed to the fluid shaders from the CPU). For this reason, fluid rendering can't possibly work using single-pass stereo or multipass, since the frustum data passed to the shader will be wrong and so will be all lighting calculations. You do need two cameras for it to work correctly.

I couldn't reproduce the lighting issues you describe when using two cameras, though. I'm on Unity 2019.4.30f1, using Oculus Quest.

Are you using Legacy VR or XR Plugin Management? The Fluid Renderer doesn't work with XR Plugin Management for me, not even in 2019.4. With Legacy VR I can get the fluid rendered, but the Lighting is definitely broken just as badly on a two-camera setup as one a single one.

I also noticed that using two cameras more than halves my framerate, and shows a massive CPU load compared to single camera stereo pass. Is the physics simulation also being done twice with two cameras? That doesn't make sense to me, but what other explanation could there be?

I cant even get a stable 45 frames for using 90Hz with reprojection in the faucet sample scene with only 1200 particles. I can't throw any faster hardware at it either, I'm already using a 5950X and a 6900XT.
Reply


Messages In This Thread
Using Fluid in VR (HTC vive) - by curryrice - 02-12-2021, 02:09 PM
RE: Using Fluid in VR (HTC vive) - by josemendez - 02-12-2021, 02:20 PM
RE: Using Fluid in VR (HTC vive) - by curryrice - 03-12-2021, 05:51 AM
RE: Using Fluid in VR (HTC vive) - by locque - 07-02-2022, 11:36 AM
RE: Using Fluid in VR (HTC vive) - by Epineurien - 07-02-2022, 11:47 AM
RE: Using Fluid in VR (HTC vive) - by locque - 07-02-2022, 11:59 AM
RE: Using Fluid in VR (HTC vive) - by josemendez - 07-02-2022, 12:05 PM
RE: Using Fluid in VR (HTC vive) - by locque - 07-02-2022, 12:54 PM
RE: Using Fluid in VR (HTC vive) - by josemendez - 07-02-2022, 01:09 PM
RE: Using Fluid in VR (HTC vive) - by Epineurien - 07-02-2022, 02:15 PM
RE: Using Fluid in VR (HTC vive) - by josemendez - 07-02-2022, 02:22 PM
RE: Using Fluid in VR (HTC vive) - by locque - 07-02-2022, 01:48 PM
RE: Using Fluid in VR (HTC vive) - by josemendez - 07-02-2022, 02:22 PM
RE: Using Fluid in VR (HTC vive) - by locque - 08-02-2022, 09:06 AM
RE: Using Fluid in VR (HTC vive) - by josemendez - 08-02-2022, 01:23 PM
RE: Using Fluid in VR (HTC vive) - by locque - 09-02-2022, 11:09 AM
RE: Using Fluid in VR (HTC vive) - by josemendez - 09-02-2022, 11:46 AM
RE: Using Fluid in VR (HTC vive) - by locque - 09-02-2022, 01:16 PM
RE: Using Fluid in VR (HTC vive) - by locque - 21-02-2022, 09:52 AM
RE: Using Fluid in VR (HTC vive) - by locque - 24-02-2022, 09:13 AM
RE: Using Fluid in VR (HTC vive) - by josemendez - 24-02-2022, 09:33 AM
RE: Using Fluid in VR (HTC vive) - by josemendez - 24-02-2022, 03:09 PM
RE: Using Fluid in VR (HTC vive) - by josemendez - 24-02-2022, 05:29 PM
RE: Using Fluid in VR (HTC vive) - by locque - 24-02-2022, 07:34 PM
RE: Using Fluid in VR (HTC vive) - by josemendez - 25-02-2022, 09:55 PM
RE: Using Fluid in VR (HTC vive) - by locque - 28-02-2022, 11:00 AM