Code Monkey home page Code Monkey logo

Comments (10)

Siccity avatar Siccity commented on May 28, 2024

The problem has to do with how Unity renders transparent objects. To fix it, use less transparent materials or split your mesh into multiple objects
https://answers.unity.com/questions/609021/how-to-fix-transparent-rendering-problem.html

from gltfutility.

florolf1 avatar florolf1 commented on May 28, 2024

I read the article already. Unfortunately this is not the answer for me. Thanks for the quick answer!

from gltfutility.

Siccity avatar Siccity commented on May 28, 2024

Can you share your model so I can have a look at it?

from gltfutility.

florolf1 avatar florolf1 commented on May 28, 2024

I've sent you an email.
Thanks.

from gltfutility.

Siccity avatar Siccity commented on May 28, 2024

I tested your model and everything is using transparent materials. Don't use transparent shaders for things that are not transparent, and set each objects pivot near the object to help Unity sort the remaining transparent materials.

from gltfutility.

florolf1 avatar florolf1 commented on May 28, 2024

Because the model was not created by me, I have no access to the metadata.
However, this problem also occurs with models that I have created myself. Maybe the reason is the program the models are created in. (Autodesk Revit).

Is there a way to extract the materials so that I can assign a different shader to them without having to recreate each material and assign it to the objects?

Thanks for your support! (y)

from gltfutility.

Siccity avatar Siccity commented on May 28, 2024

GLTFUtility will assign transparent shaders to transparent objects, and opaque shaders to opaque objects. Your file has every object set to transparent, so GLTFUtility sees them all the same.

There are options for replacing import shaders in the "Shader Overrides" section, but doing it this way will also affect your actually transparent materials like glass.

Currently there is only one way to extract materials, by selecting them all in the project window and hit Ctrl+D.

from gltfutility.

florolf1 avatar florolf1 commented on May 28, 2024

When I extract the materials and set the Shader Queue from 3000 to >3000 (e.g. 3100), the model is displayed correctly.
But I would have to do this manually for all materials and then assign them to the corresponding part in the model.

Is it possible to set the Render Queue in your plugin?

from gltfutility.

florolf1 avatar florolf1 commented on May 28, 2024

I found a way, but that wont work if all materials have the same render queue..

from gltfutility.

florolf1 avatar florolf1 commented on May 28, 2024

Problem solved, it had nothing to do with your work.
Thanks for the support!

from gltfutility.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.