Help Fluid not rendering on VR (URP) with single-pass stereo - Printable Version +- Obi Official Forum (https://obi.virtualmethodstudio.com/forum) +-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html) +--- Forum: Obi Fluid (https://obi.virtualmethodstudio.com/forum/forum-3.html) +--- Thread: Help Fluid not rendering on VR (URP) with single-pass stereo (/thread-4299.html) |
Fluid not rendering on VR (URP) with single-pass stereo - arrnav96 - 21-07-2024 I purchased and am a long time user of all of your assets (Cloth, rope, softbody) and have happily been using it even with URP until I got stuck with a unique client requirement this time. I have a project specifically needing VR with URP, and can't get OBI fluid to render anything in standalone android builds running on Quest 3 devices. I cannot switch from single-pass stereo to multi pass for performance reasons as this is a standalone project and not PC-VR. Been through all your VR related forums and answers suggest using Built-In for VR, which is not possible for our team's pipeline right now. Is there ANY way I could get Fluid working on VR with URP? Desperately need help right now, as without your asset we really have no other options at all for dynamic fluid sim. For context, we are simulating blood in a VR-based surgery scene. RE: Fluid not rendering on VR (URP) with single-pass stereo - arrnav96 - 22-07-2024 Solved! What worked for me was to set the stereo render mode from class OpenXRSettings (UnityEngine.XR.Management and UnityEngine.XR.OpenXR assemblies) on runtime, courtesy of Virtual Method's support and a helpful post from another forum. I simply switch to Multi-pass when fluid rendering is needed/visible in my scene, then switch back to single-pass instanced using event calls when done. Works great on my Quest 3 standalone URP build on Unity 2022.3.36f1. Code: public class VRRenderModeSwitcher : MonoBehaviour Also, for performance reasons, I additionally ended up enabling or disabling the 'ObiFluidRendererFeature' in my renderer asset on runtime as well, using the same event calls as above to enable/disable Obi rendering when needed. Below code uses reflections and is a hacky way to set renderer features, but it's the only way I found which works on current URP. This greatly boosts performance on standalone when fluid is not used: Code: public class SetUrpRenderFeature : MonoBehaviour |