Skip to content

Transparent materials appear black or opaque after runtime import on Meta Quest. #809

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

Open
4 of 7 tasks
EfimBash opened this issue Feb 13, 2025 · 7 comments
Open
4 of 7 tasks
Assignees
Labels

Comments

@EfimBash
Copy link

EfimBash commented Feb 13, 2025

Describe the bug 💬

When placing the GLB model in the Unity scene before building the app, all transparent materials (e.g., glass and EyeAO) render correctly. However, after building the app and loading the model at runtime using the GLTFComponent, all surfaces with transparent materials are rendered as black or opaque instead of transparent.

Image

Image

On the left (black eyes), you can see the model that has been instantiated, and on the right, the model that was already in the scene.
Image

Steps to reproduce 🔢

  1. Open Unity and place the GLB model directly into the scene. (this will work fine)
  2. Ensure the transparent materials (e.g., glass of the glasses, EyeAO) are displayed correctly in the editor.
  3. Add a EmptyGO with a GLTFComponent attached to it. This is what will instantiate the avatarToTest.glb at run time .
  4. Add the avatarToTest.glb to a streaming assets folder in the project and reference it in the GLTFComponent .
  5. Build and run the application.
  6. At runtime, use the GLTFComponent to load the same GLB model into the scene.
  7. Observe the model’s materials: all surfaces with transparent materials are rendered as black or opaque instead of transparent.

Files to reproduce the issue ♻

avatarToTest.zip

Editor Version 🎲

2022.3

Render Pipeline and version

URP

UnityGLTF Version

2.14.1

Operating System 👩‍💻

Android

When does this problem happen?

  • Editor Import
  • Runtime Import
  • Editor Export
  • Runtime Export

Additional Info 📜

No response

Validations 🩹

@EfimBash EfimBash changed the title Black mesh appears when importing a GLB model into a Unity scene at runtime. Transparent materials appear black or opaque after runtime import on Meta Quest. Feb 13, 2025
@hybridherbst
Copy link
Collaborator

Thanks for providing a test file –
Looks like for some reason the rough refraction pass isn't correctly set up for the runtime material in your case here.
We'll look at it!

@ciotonyleone
Copy link

verified indeed seems to be a problem with the pbrgraph shader, with gltfast no problem. looking forward to the bug being closed

@ciotonyleone
Copy link

ciotonyleone commented Feb 24, 2025

@hybridherbst @pfcDorn do you have a guess as to when we might get a version with this fix?

@hybridherbst
Copy link
Collaborator

@pfcDorn could you please check this again? Thanks!

@EfimBash
Copy link
Author

Hi @hybridherbst @pfcDorn, I wanted to check in on this issue. Could you provide an update on the progress or if any further details are needed? Let me know if I can help in any way. Thanks!

@hybridherbst
Copy link
Collaborator

hybridherbst commented Mar 18, 2025

Hey @EfimBash could you try on latest dev?

I think you can use this URL in your manifest.json:

https://github.com/KhronosGroup/UnityGLTF.git#77cdc3f49e775ca02c32d99e9d5e94ba851aea33

@EfimBash
Copy link
Author

Hi @hybridherbst,
I have tested with the latest dev, but unfortunately, I still have the problem with the GLB instantiated at runtime.

Let me know how can I help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants