-
Notifications
You must be signed in to change notification settings - Fork 158
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
duplicate materials #251
Comments
Hi @loadpixels. I would need to see the source model to say anything definitively, but the converter does not create a new identical material for every object in the scene. I suspect what you are seeing is COLLADA instance materials with different overriden properties being split out as new materials in glTF, which is expected and unavoidable. Feel free to attach your model if you'd like me to take a closer look. |
Hi @lasalvavida - please find attached the original and the converted file. You can see multiple materials with the exact same properties, which I would have imagined would generally be best collapsed down to a single material. I don't believe that the geometry has any attributes that would affect the different materials, but perhaps I'm wrong. Is this in anyway related to pull request #100 ? |
Definitely something strange going on here. As far as I can tell, it looks like something may be tripping up OpenCOLLADA. There are some elements here that have the same id in the COLLADA, which isn't valid, they need to be unique within the document. For example, there are a bunch of nodes with the id "IfcWindow". Will look into this a bit closer later. |
Thanks for looking at this, I've tried reexporting the DAE (using https://github.com/IfcOpenBot/IfcOpenShell) to enforce GUIDs on every element, but I still appear to get the same issue. Test files attached |
I'm able to replicate this. I have a single COLLADA material set to two pieces of geometry, each of which has unique |
Hi @KermMartian, if you could attach the model, that would be much appreciated. More data always helps. |
Please find attached a sample model in DAE and GLB format. If I'm counting correctly: DAE:
GLTF:
|
bump Anything I can do to further assist with this? |
Same problem, materials are duplicated, |
bumpity bump Anything I can do to help with this? It's a serious problem for us. |
Fixed in #266 |
When converting a file I'm getting an input .dae with ~21 materials converted to ~169 materials. It appears that the converter creates a new identical material for every object it finds in the scene rather than just assigning an existing one to the object.
Obviously this has problems for further down the pipeline where reducing drawcalls by limiting materials is desirable.
The text was updated successfully, but these errors were encountered: