Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All terrain tiles render black when running natively on Quest headsets #1391

Closed
AmrAbuElyazid opened this issue Apr 7, 2024 · 8 comments
Closed
Labels
bug Something isn't working

Comments

@AmrAbuElyazid
Copy link

Description:
When running a project natively on Meta Quest 3, all terrain tiles render black. However, the project renders correctly on PC. John uploaded the sample project, and I, as the reporter, am also facing the same issue. I've tried rebuilding the project from scratch multiple times to isolate potential settings causing this issue, but no luck.

Sample project: CesiumQuest (uses the Meta XR plugin)

Thanks to @john-terrell for uploading the sample project

Steps to reproduce:
Clone the provided sample project from the GitHub repository.
Build and deploy the project to a Meta Quest 3 headset.
Observe that all terrain tiles render black.

Expected behavior:
Terrain tiles should render correctly on Meta Quest 3, similar to their rendering on PC.

Additional information:
This issue occurs consistently on Meta Quest 3.
The project utilizes the Meta XR plugin.

Any insights or suggestions on resolving this issue would be appreciated.

image

@j9liu j9liu added the bug Something isn't working label Apr 9, 2024
@j9liu
Copy link
Contributor

j9liu commented Apr 9, 2024

Hi @AmrAbuElyazid, thank you for opening this issue.

You mentioned "rebuilding the project from scratch multiple times to isolate potential settings causing this issue". Can you describe what you've tried in more detail? It can help us narrow down the issue when we try to troubleshoot this.

@AmrAbuElyazid
Copy link
Author

Hi @j9liu

Thanks for getting back to me.

I've isolated the issue to Cesium's terrain by creating empty projects with Unreal's VR and blank templates, building and deploying with and without Cesium to Meta Quest 3. The issue appears once Cesium is included in the project.

Here's what I've experimented with so far:

  • Lighting settings (dynamic/static)
  • Tried Lumen as global lighting with dynamic lights
  • VR-specific rendering settings (anti-aliasing, Temporal AA and MSAA)
  • Cesium optimization settings (LOD, occlusion culling, etc)
  • Forward shading and differed shading
  • Instanced Stereo in Rendering (On and Off)
  • Following recommendations to disable dither fade (see DitherFade material layer causes serious artifact with forward rendering / MSAA #1104).
  • Experimenting with Cesium SunSky with the mobile setting enabled, and comparing it against Unreal's default SkySphere.

Despite these efforts, the terrain tiles continue to render black only on the Meta Quest 3, while the project works as expected on PC. I hope these details help in narrowing down the potential cause of this issue.

Looking forward to any suggestions or insights you might have.

Thank you.

@azrogers
Copy link
Contributor

Just to update you on where things are at @AmrAbuElyazid - while we don't yet have a Quest 3 around the office to test with, I was able to replicate your issue using the provided project on the Quest 2. I'm digging into it now, and I'll keep this issue updated with my findings!

@AmrAbuElyazid
Copy link
Author

@azrogers Thanks a lot, looking forward to hearing your inputs!

@azrogers
Copy link
Contributor

I've tracked the issue down to the KHR_texture_transform changes in Cesium for Unreal 2.4.0. Particularly the way normal textures are transformed. I still haven't figured out why this breaks on Quest specifically, but I can at least offer a workaround for the time being - under CesiumForUnreal/Content/Materials/Layers open ML_CesiumGltf.asset. Scroll over to the section where the normal texture coordinates are transformed:
image
And change the graph to ignore the transformation node:
image
This, of course, disables KHR_texture_transform support for normal maps, so it's not a permanent solution, but it should help you get unblocked while we continue to investigate.

@AmrAbuElyazid
Copy link
Author

@azrogers Thanks a lot for prompt response!
I've tried your suggestion but it seems to be the same on my meta quest 3.
I've tried it in both the sample project I linked and in my main project that I am working on, but to no avail, the terrain is still black.

com oculus shellenv-20240414-183909

@azrogers
Copy link
Contributor

As it turns out, this seems to have been the same issue that #1225 was addressing for iOS devices - that is, for some reason, 1x1 textures on mobile just get sampled incorrectly. I've merged #1225 which just upscales our default textures to 4x4 instead of 1x1, which fixes the issue on my end. Please give the latest version of main a try and let me know if it works for you too! @AmrAbuElyazid

@AmrAbuElyazid
Copy link
Author

@azrogers That fixed it! Thanks a lot for your support!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants