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

Unity Import #21

Closed
florolf1 opened this issue Feb 24, 2020 · 5 comments
Closed

Unity Import #21

florolf1 opened this issue Feb 24, 2020 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@florolf1
Copy link

when i import the .gltf models into Unity i get a problem with rendering the models in the editor and on the device.
Bildschirmfoto 2020-02-24 um 13 19 17
Bildschirmfoto 2020-02-24 um 13 20 33

Every imported material is displayed as transparent.
I have tested three other GLTF Importer and it was the same for all of them.

is there a possibility to change this when converting it from .svf to .gltf?
If not, how did you solve the problem?

To import into Unity I used this plugin:
https://github.com/Siccity/GLTFUtility

@petrbroz
Copy link
Owner

Thank you for reporting the issue @florolf1! Looking at the screenshots, it seems that the objects are visible but rendered out of order (in the first screenshot, the red roof can be seen behind the ground mesh). I'll look into that.

@petrbroz petrbroz self-assigned this Feb 25, 2020
@petrbroz petrbroz added the bug Something isn't working label Feb 25, 2020
@florolf1
Copy link
Author

Yes, you are right. The problem has to do with how unity render transparent objects.
https://answers.unity.com/questions/609021/how-to-fix-transparent-rendering-problem.html

Changing the render queue for individual objects can fix this, but this wont work if you do this for all objects.
What I wonder is why unity recognizes all materials as transparent, even those which should not be transparent (e.g. roof, walls, etc.) and if there is a possibility to fix this during the converting process.

@petrbroz
Copy link
Owner

It's possible that I'm setting the glTF material props incorrectly, causing Unity to think that they're transparent. I'll investigate that area. Thanks for the info!

@petrbroz
Copy link
Owner

The issue is now fixed in develop branch and will go live with the next version update.

@florolf1
Copy link
Author

Tested and it works perfectly.
Thank you!

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

2 participants