KhronosGroup / KhronosGroup/UnityGLTF

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

Aperta
#809 7 commenti 0 reazioni 1 assegnatario Rivendicata da @robertdorn83 Vedi su GitHub
bug
Lingua principale
C#
Stelle
2.2k
Fork
536
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

### 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](https://github.com/user-attachments/assets/9151ef2a-cb44-4154-98a6-918547093f90)

![Image](https://github.com/user-attachments/assets/d0eda846-1da1-4f0e-a0d2-3c208401adb8)

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](https://github.com/user-attachments/assets/aff589fe-e343-4174-bb09-edb2ed9776cd)

### 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](https://github.com/user-attachments/files/18785949/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
- [x] Runtime Import
- [ ] Editor Export
- [ ] Runtime Export

### Additional Info 📜

_No response_

### Validations 🩹

- [x] I have [searched existing issues](https://github.com/KhronosGroup/UnityGLTF/issues): no issue already exist that reports the same problem.
- [x] I follow the [Code of Conduct](https://www.khronos.org/about/code-of-conduct)
- [x] I provided a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example), including files when necessary.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.