Posts: 71
Threads: 18
Joined: Jan 2022
Reputation:
0
07-03-2022, 12:38 PM
(This post was last modified: 07-03-2022, 01:09 PM by locque.)
Take a look this this: https://imgur.com/a/w8gOxxP
As the camera moves further from the fluid and the viewing angles gets lower, the more this dark reflection appears in the liquid's surface. I removed all reflection probes from the scene to see if that had something to do with it, to no effect. Looks like a screen space reflection, but it's way too dark for the fluid and environment. I'm using the default fluid renderer with nothing changed other than the surface downsampling seen in the pictures, but I also reverted that to see if it would make a difference.
Update:
This only affects VR rendering. Here's a comparison between the exact same scene from the exact same perspective with nothing changed other than the render target: https://imgur.com/a/2Gzumv8
Posts: 6,321
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
(07-03-2022, 12:38 PM)locque Wrote: Take a look this this: https://imgur.com/a/w8gOxxP
As the camera moves further from the fluid and the viewing angles gets lower, the more this dark overlay appears in the liquid's surface. It looks like a reflection, but it's not. If you look closely you cant actually see that it is more like a portal that renders everything behind the bucket mesh that the fluid is inside of. The faucet looks like a reflection, but you can see that the button is missing and it's actually showing the part that is behind the bucket. I removed all reflection probes from the scene to see if that had something to do with it, but this dark blob still showed up. Whatever this is happens in screen space, the darkness disappears as you move the fluid to the edges of the camera's fov. I'm using the default fluid renderer with nothing changed other than surface downsampling seen in the pictures, but I also reverted that to see if it would make a difference.
Hi!
This is probably just refraction. Refraction works by reading a opaque texture of whatever is behind the fluid (so this happens in screen space), and perturbing the read location by the fluid normal. Does this happen if you set the renderer's refraction parameter to zero?
Posts: 71
Threads: 18
Joined: Jan 2022
Reputation:
0
07-03-2022, 01:15 PM
(This post was last modified: 07-03-2022, 01:27 PM by locque.)
Thanks for the quick answer!
Turning down refraction does reduce the issue. Why does this happen in VR only though? Didn't think of changing the default parameters since it looked fine when rendering to the main display.
I would really like to use refraction, but just raising it slightly above zero will still turn the surface almost entirely dark at a distance of only a few units.
Posts: 6,321
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
07-03-2022, 01:27 PM
(This post was last modified: 07-03-2022, 01:32 PM by josemendez.)
(07-03-2022, 01:15 PM)locque Wrote: Thanks for the quick answer!
Turning down refraction does reduce the issue. Why does this happen in VR only though? Didn't think of changing the default parameters since it looked fine when rendering to the main display.
What does your VR setup look like? (Headset? SDK used?)
I recently fixed an issue with OpenVR's stereo handling, as it uses off-center projection (not currently supported by Obi) which results in incorrect eye-space positions being calculated the fluid shader. This affects not just refractions but reflections too. I added off-center projection support -which will be included in the next update-, in the following thread you can find a patch that includes it:
http://obi.virtualmethodstudio.com/forum...age-3.html
Posts: 71
Threads: 18
Joined: Jan 2022
Reputation:
0
(07-03-2022, 01:27 PM)josemendez Wrote: What does your VR setup look like? (Headset? SDK used?)
I recently fixed an issue with OpenVR's stereo handling, as it uses off-center projection (not currently supported by Obi) which results in incorrect eye-space positions being calculated the fluid shader. This affects not just refractions but reflections too. I added off-center projection support -which will be included in the next update-, in the following thread you can find a patch that includes it:
http://obi.virtualmethodstudio.com/forum...age-3.html
Those pictures were taken with the patch, I was the one asking for it
I have a Valve Index / SteamVR SDK.
Posts: 6,321
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
08-03-2022, 10:54 AM
(This post was last modified: 08-03-2022, 10:54 AM by josemendez.)
(08-03-2022, 10:40 AM)locque Wrote: Those pictures were taken with the patch, I was the one asking for it
My apologies! Didn't realize it.
(08-03-2022, 10:40 AM)locque Wrote: I have a Valve Index / SteamVR SDK.
I will try to reproduce this there then (though I only have Quest/Rift available to test, but I doubt that makes any difference). Back when I was implementing the off-center projection I didn't notice anything weird with refractions, but maybe I just wasn't looking hard enough. Will try and get back to you, in the meantime using a small refraction parameter should work.
|