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

I can't merge materials #98

Open
zzwzzw12345 opened this issue Mar 18, 2024 · 2 comments
Open

I can't merge materials #98

zzwzzw12345 opened this issue Mar 18, 2024 · 2 comments

Comments

@zzwzzw12345
Copy link

I use it to merge materials and it just makes all the materials the first material (the top one in the selection) I don't know what's wrong with me, even if I switch my language to English, I don't know what I'm supposed to do.
Can I choose where to save the material?
![image](https://github.com/Grim-es/material-combiner-addon/assets/163805519/938b7d93-f008-416b-be88-d69d37cd9e05
5 3~~OC$TCQH$ZRZ19F U0Q
Before merging materials
8LAH1W1_FPCPFDRXN7)~7R6
After merging materials

@zzwzzw12345
Copy link
Author

There are no changes to the material
I've tried both 3.3.16 and 3.6.9 with this issue

@Grim-es
Copy link
Owner

Grim-es commented Mar 18, 2024

When using materials with the same image in their Image Texture node, the materials will merge instead of being atlased. Or, if the proper image is not found, they will default to the color property, which, if the same, will also merge materials. To ensure proper functionality, make sure the shader you're using is listed in the supported shaders in utils/materials.py, and that the name property is in English and matches exactly as listed in that file.

The easiest will be using the Diffuse BSDF shader with a name property set to Diffuse BSDF. Then, directly connect the image intended for the atlas to the shader using an Image Texture node with its name property set to Image Texture. To verify the name property of nodes, select the node and press the 'N' key on keyboard to open a small right-side panel displaying that data.

Note that simply changing Blender to English will not automatically rename already imported or saved nodes. It will be necessary to manually rename them or reimport the model from the beginning.

So, combined materials either use the same texture (which you can export by pressing File > External Data > Unpack files to current directory), or have the name property and shader not match the pre-hardcoded listed ones, and their texture is not used in the atlasing process.

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