Obi Official Forum

Full Version: Strange dark surface reflection at low viewing angles
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
(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?
Thanks for the quick answer! Sonrisa

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.
(07-03-2022, 01:15 PM)locque Wrote: [ -> ]Thanks for the quick answer! Sonrisa

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
(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 Sonrisa

I have a Valve Index / SteamVR SDK.
(08-03-2022, 10:40 AM)locque Wrote: [ -> ]Those pictures were taken with the patch, I was the one asking for it Sonrisa

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.