-
Notifications
You must be signed in to change notification settings - Fork 253
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
Models import as flat pink models with different appearance per eye (Android/Meta Quest) #725
Comments
I'm also seeing this, adding my specs here too in case it helps
|
Hi, Have you had a look at how to setup your project's materials and shader variants? Likely some are missing. GltfImport, by default, does not log eventual problems unless instructed to do so. Initialize it like so and try it again: GLTFast.GltfImport gltf = new (logger:new ConsoleLogger()); Now it should log errors/warnings to the console. Let me know if you need further assistance. |
Hi @atteneder , thanks for the logger tip. Got an error saying to include the glTFPbrMetallicRoughness shader, great for later projects! I did just need an unlit shader though, so I modified the glTFUnlit shader. Had to add a couple lines of shader code to make it work: https://docs.unity3d.com/2022.2/Documentation/Manual/SinglePassInstancing.html |
Hello @snaik27, just want to know exactly what you modified in that shader because I got the same issue on my side. Thanks in advance |
I've read this, but I'm not sure it applies. I'm trying to load user models at runtime. There's nothing to setup in advance. What's the best way to approach this? |
Creating a shader variant collection and include it in preloaded shaders doesn't work for me, but, I solved this by adding the shaders that are missing in 'Always Include Shaders' section, I'm loading models at runtime as well. |
Describe the bug
Importing models from a C# MonoBehavior results in models that are with solid pink (no shading, like a silhouette) with each eye seeing the model at a different offset. Models appear fine in Windows Player, but not in Android build running on Meta Quest.
Left eye sees it in its correct location.
The right eye sees it offset to the right and it moves around based on head movement.
I'm not doing anywhere in my app that renders differently per eye and I don't manipulate the instantiated model.
Files
This happens with every model I've tried to load, but here's an example.
petroglyphs.zip
glTF Validator shows a few warnings that don't seem relevant, but no errors.
To Reproduce
C# Code:
Expected behavior
I expect it to load with correct shape, textures, and stereo view.
Screenshots
If you can do cross-view 3D (cross your eyes) you can align the grid and see how each eye has the model shifted a bit.
Desktop (please complete the following information):
additionally (if significant for the bug):
Additional context
n/a
The text was updated successfully, but these errors were encountered: