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

Materials in imported GLR scene files are incorrectly treated as duplicates #84

Open
Yoshiatom opened this issue Oct 29, 2023 · 1 comment

Comments

@Yoshiatom
Copy link

When trying to use this plugin with models imported with the blender-import-glr addon, by default trying to combine them will result in the first material being applied to everything, with all the other materials being deleted as duplicates regardless of the content of the material.

I did find a workaround, but it's very tedious:

  • Go into the nodes of a material and find the "Base Texture" node
  • Create a new "Image Texture" node from the Add dropdown.
  • Give the new node the exact same settings as the "Base Texture" node
  • Delete the "Base Texture" node and re-link the Color and Alpha
  • Repeat for all other materials

The only lead I have as to what's causing this issue is the fact that the original image texture node is called "Base Texture". Maybe there's some sort of deprecated node? I don't really know enough about Blender to know for sure.

@Grim-es
Copy link
Owner

Grim-es commented Oct 31, 2023

Not all shaders are supported. You can check the file utils/materials.py to find out which shaders are supported and what node names should be used.

The easiest solutution was to:

  • Change all shaders in your materials to use the Diffuse BSDF shader.
  • Ensure that the node's name property is set to Diffuse BSDF without any translations or variations.
  • Connect the appropriate image texture node, and make sure its name is exactly Image Texture, without additional suffixes like .001 or any translations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants