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

未關閉
#809 7 則留言 0 個 reaction 已指派 1 人 在 GitHub 檢視

@robertdorn83 已經在處理了。

開始於 2025年2月13日。

評估

這個 Issue 還沒有評估資料。

描述

bug
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 🩹
主要語言
C#
星號
2.3k
分支
539
平均合併
3 天 15 小時
30 天內合併 PR
2

環境準備

  • 沒有 Dockerfile 或 Docker Compose 檔案
  • 沒有 Pull Request 範本
  • 閱讀貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

KhronosGroup/UnityGLTF 的其他 Issue

查看 KhronosGroup/UnityGLTF 的全部 Issue

相似的 Issue

更多 C# Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。