Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Using Fluid in VR (HTC vive)
#1
Hello.

I want to use unity to display a liquid on the screen in VR (HTC vive), but it does not show up.
It shows up fine in a scene without VR.
Do I need some special settings?
I don't know the cause of this problem, so please let me know.

Obi Fluid Version : 6.3
unity Version : 2020.3.16f1


Thank you.
Reply
#2
(02-12-2021, 02:09 PM)curryrice Wrote: Hello.

I want to use unity to display a liquid on the screen in VR (HTC vive), but it does not show up.
It shows up fine in a scene without VR.
Do I need some special settings?
I don't know the cause of this problem, so please let me know.

Obi Fluid Version : 6.3
unity Version : 2020.3.16f1


Thank you.

Hi there!

VR Fluid rendering requires setting up separate cameras for each eye. See our FAQ:
http://obi.virtualmethodstudio.com/faq.html

Quote:Does it support VR (Virtual Reality)?

Cloth, Rope and Softbodies support VR. For Obi Fluid, you will have to use separate cameras for each eye since the renderer does not support single-pass stereo rendering.
Reply
#3
(02-12-2021, 02:20 PM)josemendez Wrote: Hi there!

VR Fluid rendering requires setting up separate cameras for each eye. See our FAQ:
http://obi.virtualmethodstudio.com/faq.html

Wow!

I missed that section in the FAQ.

Thank you!
Reply
#4
Can you elaborate on how this one-camera-per-eye setup is supposed to work?

I can't get any fluid rendered as soon as I target the left or right eye on a camera, it just disappears. It works fine again as as soon as you set the target back to None (Main Display).
Reply
#5
Gonna request more details too.
You need to setup separate cameras for each eye with a fluid renderer in each, right?
But in URP the fluid renderers don't do anything as it's the Obi Fluid Renderer Feature that does the job (at least that's how I got it to work in non-VR).
How do you setup Obi for VR in URP?
Reply
#6
(07-02-2022, 11:47 AM)Epineurien Wrote: Gonna request more details too.
You need to setup separate cameras for each eye with a fluid renderer in each, right?
But in URP the fluid renderers don't do anything as it's the Obi Fluid Renderer Feature that does the job (at least that's how I got it to work in non-VR).
How do you setup Obi for VR in URP?

I was wondering the exact same thing, seems like it's not possible with URP. I couldn't get any fluid rendered on the builtin pipeline either though, the camera-based fluid renderer stops working as soon as you target an eye.
Reply
#7
(07-02-2022, 11:59 AM)locque Wrote: I was wondering the exact same thing, seems like it's not possible with URP. I couldn't get any fluid rendered on the builtin pipeline either though, the camera-based fluid renderer stops working as soon as you target an eye.

What Unity version are you using? targeting a specific eye vs the screen should make no difference as far as rendering goes: it just changes the render destination, the entire render pipeline remains unchanged.
Reply
#8
(07-02-2022, 12:05 PM)josemendez Wrote: What Unity version are you using? targeting a specific eye vs the screen should make no difference as far as rendering goes: it just changes the render destination, the entire render pipeline remains unchanged.

Thats what I would have thought too, but unfortunately that's not the case. I'm using 2020.3.27f1.
Reply
#9
(07-02-2022, 11:47 AM)Epineurien Wrote: Gonna request more details too.
You need to setup separate cameras for each eye with a fluid renderer in each, right?
But in URP the fluid renderers don't do anything as it's the Obi Fluid Renderer Feature that does the job (at least that's how I got it to work in non-VR).
How do you setup Obi for VR in URP?

URP VR is not supported as of now, since Unity does not support using renderer features on a per-camera basis which would be required for this to work.
Reply
#10
Here are some pictures showing what happens when you switch the target from the main display to the left eye:

https://imgur.com/a/gV2cVfy

The shadow is still being rendered for the left eye, but the fluid itself is missing.
Reply