oculus-samples / Unity-TheWorldBeyond

Presence Platform showcase demonstrating usage of Scene, Passthrough, Interaction, Voice, and Spatializer. The Oculus SDK and other supporting material is subject to the Oculus proprietary license. Multiple licenses may apply.
Other
306 stars 83 forks source link

Passthrough artefacts #22

Open josefgrunig opened 6 months ago

josefgrunig commented 6 months ago

I am running the VirtualFrames scene of original Project "The World Beyond" and have some nasty artefacts on the edges of the virtual objects drawn on passthrough; I can see the virtual environment outside of the door. See attached image. It happens when there is a virtual environment behind the door frame, as the alpha to get the passthrough is cleared in the wrong way. Any ideas?

IMG_8478

PanyaMeta commented 6 months ago

Hello @josefgrunig the theory is that this is a case of engine-level super-sampling or anti-aliasing that ultimately "blurs" the pixels to improve image quality. There is no singular solution here, but you could try a couple things to minimize the effect:

  1. Get those background pixels to be more wood-colored in this case; that might involve something like adding a small mesh "fin" perimeter to the door frame, with a material that writes to color but NOT to alpha. This may not look good in certain scenarios.
  2. While it may degrade your overall quality, you can also try disabling anti-aliasing for your Android build: Screenshot 2024-01-08 at 3 48 49 PM

Ultimately, like all things Passthrough, it's a tradeoff between the complexity of the solution with how ugly the problem is that it's trying to solve.

josefgrunig commented 6 months ago

Thank you @PanyaMeta.

Antialiasing has been my thirst thought too, but the project already comes with the option disabled. I also disabled MSAA from all cameras, and unflagged the "Use Recommended MSAA Level" option from the OVRCameraManager. Still same weird results.

The effect is even worse the more distant you are from the door. Any further idea?