Grim-es/material-combiner-addon

Materials in imported GLR scene files are incorrectly treated as duplicates

Opened this issue · 1 comments

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.

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.