Giter Club home page Giter Club logo

material-combiner-addon's Introduction

material-combiner-addon

An addon for Blender that allows to get lower draw calls in game engines by combining textures without quality loss and avoiding the problem of uv larger 0-1 bounds.

If you like an addon, you can support my work on Patreon or Buy me a coffee.

FEATURES

  • Combining multiple materials. (allow applying diffuse colors and choosing each image and atlas sizes)
  • Multicombining. (add layers for each image that are combined into different atlases, allow generating a Normal map, Specular map, etc atlases) (Currently Disabled | Supported in version 2.0.3.3)
  • Packing UV into the selected scale bounds by splitting mesh faces, compatible with rigged models. (Currently Disabled | Supported in version 1.1.6.3)

INSTALLATION

  1. Download an addon: Material-combiner
  2. Go to File > User Preferences > Addons
  3. Click on Install Add-on from File
  4. Choose material-combiner-addon-master.zip archive
  5. Activate Material Combiner

KNOWN ISSUES

After clicking "Save atlas to.." the materials are simply merged or the atlas image does not have all the textures

  • Textures are packaged in a .blend file. You need to save the .blend somewhere and click File > External data > Unpack All Into Files (to any directory of your choice).
  • Your version of Blender is not in English, in this case the nodes will be named differently, their names are strictly written in the script. You need to manually rename the nodes to their own names, or switch the blender version to English and regenerate the nodes by re-importing the model.
  • You are using an unsupported shader (Surface property of material). You can view the file utils/materials.py to see what shaders are supported or what node names should be.

Pillow installation process is repeated

  • Make sure the VPN is not currently active.

  • Windows | Make sure Blender isn't installed from the Windows Store because it's not supported. If you want to install Pillow manually, go to the blender installation folder, navigate to the folder with the blender version name\python\bin and copy this path. Press Win+R on your keyboard and type cmd.exe, press Enter. After that, write this commands to the Windows console:

    set PythonPath="Your\Copied\Path\To\Python\bin\Folder"
    
    %PythonPath%\python.exe -m pip install Pillow --user --upgrade
    

    Make sure to replace Your\Copied\Path\To\Python\bin\Folder with your copied path.

  • MacOS | Open a Mac Terminal console and write these commands:

    /Applications/Blender.app/Contents/MacOS/Blender -b --python-expr "__import__('ensurepip')._bootstrap()" 
    
    /Applications/Blender.app/Contents/MacOS/Blender -b --python-expr "__import__('pip._internal')._internal.main(['install', '-U', 'pip', 'setuptools', 'wheel'])"
    
    /Applications/Blender.app/Contents/MacOS/Blender -b --python-expr "__import__('pip._internal')._internal.main(['install', 'Pillow'])"
    

    if you install Blender in a different path, change the first part of each command to the correct path.

No module named 'material-combiner-addon-2'

You have installed the Source code from the Releases, instead install from master branch Material-combiner. But first remove the old installation folder. Default location: C:\Users\YourUserName\AppData\Roaming\Blender Foundation\Blender\BlenderVersion\scripts\addons.

BUGS / SUGGESTIONS

If you have found a bug or have suggestions to improve the tool, you can contact me on Discord: @shotariya

material-combiner-addon's People

Contributors

darkblader24 avatar grim-es avatar mysteryem avatar s-ilent avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

material-combiner-addon's Issues

Diffuse BSDF and Toon BSDF

Thanks for the 2.8 update, i utilize the Diffuse and Toon shaders that are part of the standard Blender shader set.

These are incompatible with the Addon but it appears they have much the same structure as Principled BSDF.

Could support for them be added?

Thank you

Blender 2.83: PIL not installed

Using Blender 2.83, it says that PIL is not installed, when in fact it is. I verified this manually through the command-line.

C:\WINDOWS\system32>"C:\Program Files\Blender Foundation\Blender 2.83\2.83\python\bin\python.exe" -m pip install Pillow --user --upgrade
Requirement already up-to-date: Pillow in c:\users\user\appdata\roaming\python\python37\site-packages (7.1.2)

Still, it is not recognized. Note: I used the master version as of this posting date.

All Facial Features Become White Blocks

The guide recommends separating atlases based on transparency. However, even doing so, when I combine all of the materials with transparency, I just get these white blocks. I've tried disabling the option for "Multiply image with diffuse color" but that doesn't fix it either. It just doesn't seem to combine materials correctly if the material has transparency. Is there something I'm doing wrong?

image

Disabling viewport on any object causes a context error

If you disable this toggle for an object in the outliner, it'll error out when you use the "Save atlas to..." button, even if the disabled object is not the one you want to combine materials on:
image

Here's the traceback:

  File "C:\Users\C\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\material-combiner-addon-master\operators\combiner\combiner.py", line 45, in invoke
    set_ob_mode(context.view_layer if globs.version > 0 else scn)
  File "C:\Users\C\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\material-combiner-addon-master\operators\combiner\combiner_ops.py", line 46, in set_ob_mode
    bpy.ops.object.mode_set(mode='OBJECT')
  File "C:\Users\C\Downloads\blender-3.0.1-windows-x64\3.0\scripts\modules\bpy\ops.py", line 132, in __call__
    ret = _op_call(self.idname_py(), None, kw)
RuntimeError: Operator bpy.ops.object.mode_set.poll() Context missing active object

location: <unknown location>:-1

Atlas won't generate, materials don't actually combine, textures get reassigned, all materials are Principled BDSF

So my model has 6 materials. As I'm trying to create an atlas for these materials, I keep seeing no atlas generated, I STILL have 6 materials, and the textures are looking... odd. The python traceback error I'm getting is as follows-

Python: Traceback (most recent call last):
File "C:\Users\patri\AppData\Roaming\Blender Foundation\Blender\3.2\scripts\addons\material-combiner-addon-master\operators\combiner\combiner.py", line 33, in execute
assign_comb_mats(scn, self.data, self.mats_uv, atlas)
File "C:\Users\patri\AppData\Roaming\Blender Foundation\Blender\3.2\scripts\addons\material-combiner-addon-master\operators\combiner\combiner_ops.py", line 277, in assign_comb_mats
comb_mats = get_comb_mats(scn, atlas, mats_uv)
File "C:\Users\patri\AppData\Roaming\Blender Foundation\Blender\3.2\scripts\addons\material-combiner-addon-master\operators\combiner\combiner_ops.py", line 241, in get_comb_mats
existed_ids = [int(i.mat.name.split('')[-2]) for i in scn.smc_ob_data if (i.type == 1) and
File "C:\Users\patri\AppData\Roaming\Blender Foundation\Blender\3.2\scripts\addons\material-combiner-addon-master\operators\combiner\combiner_ops.py", line 241, in
existed_ids = [int(i.mat.name.split('
')[-2]) for i in scn.smc_ob_data if (i.type == 1) and
ValueError: invalid literal for int() with base 10: 'atlas'

Before and after screenshots are posted. A little help here?
unknown1
unknown

Traceback error?

Traceback (most recent call last):
File "D:\SteamLibrary\steamapps\common\Blender\2.82\scripts\modules\addon_utils.py", line 351, in enable
mod = import(module_name)
ModuleNotFoundError: No module named 'material-combiner-addon-2'

why? i downloaded and installed most recent version as of 18/05/2020

Traceback error when attempting to merge a certain material

I'm trying to atlas all of my materials and one of the materials keeps getting this traceback error, preventing it from being merged with the other textures

Python: Traceback (most recent call last):
File "C:\Users\User\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\material-combiner-addon-master\extend_lists.py", line 18, in draw_item
mat_preview = item.mat.preview
AttributeError: 'NoneType' object has no attribute 'icon_id'

location: C:\Users\User\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\material-combiner-addon-master\ui\main_menu.py:20

Allow to atlas metallics and roughness maps

Check if a material has a metallics or roughness set to them and if its a image if it is atlas those as well as i have to manually make them for now which is lets just say less than ideal

Incompatible with VRM Addon for Blender version 2.16.0+

As of Version 2.16.0 of the VRM Addon for Blender, VRM 0.x materials are now imported as VRM 1.0 materials (https://github.com/saturday06/VRM-Addon-for-Blender/releases/tag/2_16_0), which makes them incompatible with Material Combiner (both the current release and the dev-build (technically you can manually set which image is used when using the dev-build, but it's a pain to do that for every material)).

For users, I would recommend downgrading to version 2.15.26 of VRM Addon for Blender (https://github.com/saturday06/VRM-Addon-for-Blender/releases/download/2_15_26/VRM_Addon_for_Blender-2_15_26.zip) of the VRM addon if you want to use Material Combiner with VRM models (and if using VRoid, make sure to export as VRM 0.x and not VRM 1.0).
If you're not using the dev-build of Material Combiner you will still need to either tick "Extract textures images into the folder" when importing your .vrm or unpack the textures yourself after importing.

No normal map support and too much transparency

While this tool does save a lot of time, it is missing a lot of features. One of the most important would be to save atlased versions of the normal maps and emissions maps etc as well (it would need to use the largest image for space, upscaling diffuse textures if necessary). It also improperly maps textures and leaves huge open transparent spaces that will make the image have a much larger resolution and it will be downscaled in the engine.

I already used run as admin

bpy.ops.object.delete(use_global=False)
Deleted 1 object(s)
bpy.context.space_data.system_folders_active = 5
bpy.context.space_data.system_bookmarks_active = 0
bpy.context.space_data.system_bookmarks_active = 1
bpy.context.space_data.system_bookmarks_active = 0
bpy.context.space_data.system_bookmarks_active = 0
bpy.context.space_data.system_bookmarks_active = 0
bpy.context.space_data.system_bookmarks_active = 0
bpy.context.space_data.system_bookmarks_active = 0
bpy.context.space_data.system_bookmarks_active = 1
bpy.context.space_data.system_bookmarks_active = 0
bpy.context.space_data.system_folders_active = 6
bpy.context.space_data.system_folders_active = 5
bpy.context.space_data.system_folders_active = 4
bpy.ops.object.editmode_toggle()
bpy.ops.object.editmode_toggle()
bpy.ops.object.editmode_toggle()
bpy.ops.object.editmode_toggle()
bpy.ops.cats_importer.import_any_model(filepath="I:\EVAN Documents\Nintendo 64 - Elmos Letter Adventure - Elmo.fbx", files=[{"name":"Nintendo 64 - Elmos Letter Adventure - Elmo.fbx", "name":"Nintendo 64 - Elmos Letter Adventure - Elmo.fbx"}], directory="I:\EVAN Documents\")
bpy.ops.object.editmode_toggle()
bpy.ops.object.editmode_toggle()
bpy.ops.object.material_slot_remove()
bpy.ops.object.material_slot_remove()
bpy.ops.object.material_slot_remove()
bpy.ops.object.material_slot_remove()
bpy.ops.object.material_slot_remove()
bpy.ops.object.material_slot_remove()
bpy.ops.object.material_slot_remove()
bpy.ops.cats_material.combine_mats()
bpy.ops.object.transform_apply(location=True, rotation=True, scale=True)
bpy.ops.object.transform_apply(location=True, rotation=True, scale=True)
bpy.ops.object.transform_apply(location=True, rotation=True, scale=True)
bpy.ops.object.transform_apply(location=True, rotation=True, scale=True)
bpy.ops.object.transform_apply(location=True, rotation=True, scale=True)
bpy.ops.object.transform_apply(location=True, rotation=True, scale=True)
bpy.ops.object.transform_apply(location=True, rotation=True, scale=True)
bpy.ops.object.transform_apply(location=True, rotation=True, scale=True)
bpy.ops.object.transform_apply(location=True, rotation=True, scale=True)
bpy.ops.object.transform_apply(location=True, rotation=True, scale=True)
bpy.ops.object.transform_apply(location=True, rotation=True, scale=True)
bpy.ops.object.transform_apply(location=True, rotation=True, scale=True)
bpy.ops.object.transform_apply(location=True, rotation=True, scale=True)
bpy.ops.object.transform_apply(location=True, rotation=True, scale=True)
bpy.ops.object.transform_apply(location=True, rotation=True, scale=True)
bpy.ops.object.transform_apply(location=True, rotation=True, scale=True)
bpy.ops.object.join()
bpy.ops.object.posemode_toggle()
bpy.ops.pose.rot_clear()
bpy.ops.pose.scale_clear()
bpy.ops.pose.transforms_clear()
bpy.ops.object.posemode_toggle()
bpy.ops.object.editmode_toggle()
bpy.ops.object.editmode_toggle()
bpy.ops.object.posemode_toggle()
bpy.ops.object.posemode_toggle()
bpy.ops.object.editmode_toggle()
bpy.ops.object.editmode_toggle()
bpy.ops.object.modifier_remove(modifier="Armature")
bpy.ops.object.modifier_apply(modifier="VertexWeightMix")
bpy.ops.object.editmode_toggle()
bpy.ops.object.editmode_toggle()
bpy.ops.mmd_tools.set_shadeless_glsl_shading()
bpy.ops.cats_armature.fix()
Model successfully fixed.
Traceback (most recent call last):
File "F:\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\material-combiner-addon-master\operators\combiner\combiner.py", line 52, in invoke
clear_duplicates(self.structure)
File "F:\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\material-combiner-addon-master\operators\combiner\combiner_ops.py", line 100, in clear_duplicates
ob.data.materials.pop(index=mat_idx, update_data=True)
TypeError: IDMaterials.pop(): takes at most 1 arguments, got 2

location: :-1

bpy.context.scene.optimize_mode = 'MATERIAL'
bpy.ops.cats_material.convert_all_to_png()
Converted 0 to PNG files.
bpy.ops.object.material_slot_remove()
bpy.ops.object.material_slot_remove()
bpy.ops.object.material_slot_remove()
bpy.ops.object.material_slot_remove()
bpy.ops.object.material_slot_remove()
bpy.ops.object.material_slot_remove()
bpy.ops.object.material_slot_remove()
bpy.ops.cats_material.combine_mats()
No materials combined.
bpy.context.scene.optimize_mode = 'BONEMERGING'
bpy.context.scene.optimize_mode = 'ATLAS'
bpy.context.scene.smc_ob_data_id = 1
bpy.context.scene.smc_ob_data_id = 7
bpy.data.materials["material_44mat"].name = "material_44mat"
Traceback (most recent call last):
File "F:\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\material-combiner-addon-master\operators\combiner\combiner.py", line 52, in invoke
clear_duplicates(self.structure)
File "F:\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\material-combiner-addon-master\operators\combiner\combiner_ops.py", line 100, in clear_duplicates
ob.data.materials.pop(index=mat_idx, update_data=True)
TypeError: IDMaterials.pop(): takes at most 1 arguments, got 2

location: :-1

Traceback (most recent call last):
File "F:\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\material-combiner-addon-master\operators\combiner\combiner.py", line 52, in invoke
clear_duplicates(self.structure)
File "F:\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\material-combiner-addon-master\operators\combiner\combiner_ops.py", line 100, in clear_duplicates
ob.data.materials.pop(index=mat_idx, update_data=True)
TypeError: IDMaterials.pop(): takes at most 1 arguments, got 2

location: :-1

Traceback (most recent call last):
File "F:\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\material-combiner-addon-master\operators\combiner\combiner.py", line 52, in invoke
clear_duplicates(self.structure)
File "F:\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\material-combiner-addon-master\operators\combiner\combiner_ops.py", line 100, in clear_duplicates
ob.data.materials.pop(index=mat_idx, update_data=True)
TypeError: IDMaterials.pop(): takes at most 1 arguments, got 2

location: :-1

Traceback (most recent call last):
File "F:\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\material-combiner-addon-master\operators\combiner\combiner.py", line 52, in invoke
clear_duplicates(self.structure)
File "F:\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\material-combiner-addon-master\operators\combiner\combiner_ops.py", line 100, in clear_duplicates
ob.data.materials.pop(index=mat_idx, update_data=True)
TypeError: IDMaterials.pop(): takes at most 1 arguments, got 2

location: :-1

bpy.ops.cats_importer.export_model(action='CHECK')
bpy.ops.cats_importer.export_model(action='NO_CHECK')
Traceback (most recent call last):
File "F:\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\material-combiner-addon-master\operators\combiner\combiner.py", line 52, in invoke
clear_duplicates(self.structure)
File "F:\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\material-combiner-addon-master\operators\combiner\combiner_ops.py", line 100, in clear_duplicates
ob.data.materials.pop(index=mat_idx, update_data=True)
TypeError: IDMaterials.pop(): takes at most 1 arguments, got 2

location: :-1

Traceback (most recent call last):
File "F:\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\material-combiner-addon-master\operators\combiner\combiner.py", line 52, in invoke
clear_duplicates(self.structure)
File "F:\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\material-combiner-addon-master\operators\combiner\combiner_ops.py", line 100, in clear_duplicates
ob.data.materials.pop(index=mat_idx, update_data=True)
TypeError: IDMaterials.pop(): takes at most 1 arguments, got 2

location: :-1

Traceback (most recent call last):
File "F:\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\material-combiner-addon-master\operators\combiner\combiner.py", line 52, in invoke
clear_duplicates(self.structure)
File "F:\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\material-combiner-addon-master\operators\combiner\combiner_ops.py", line 100, in clear_duplicates
ob.data.materials.pop(index=mat_idx, update_data=True)
TypeError: IDMaterials.pop(): takes at most 1 arguments, got 2

location: :-1

[Question] Possible to Deselect ALL?

Hello!

I have a scene with a very large amount of smaller objects (5,000+), plus one large object with lots of materials.

Is it possible to deselect EVERYTHING? When using Material Combiner, it defaults to selecting every material. I want to only select the materials on the large object. Going through every other object one by one deselecting them isn't feasible.

RGB KeyError

Whenever I click on the "Generate Material List" button, I get the following error:

Python: Traceback (most recent call last):
File "C:\Users\Wildcat\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\material-combiner-addon-master\operators\ui\combine_list.py", line 26, in execute
mat_dict = sort_materials(get_materials(ob))
File "C:\Users\Wildcat\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\material-combiner-addon-master\utils\materials.py", line 65, in sort_materials
mat_dict[(path, get_diffuse(mat) if mat.smc_diffuse else None)].append(mat)
File "C:\Users\Wildcat\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\material-combiner-addon-master\utils\materials.py", line 88, in get_diffuse
return rgb_to_255_scale(mat.node_tree.nodes['RGB'].outputs[0].default_value[:])
KeyError: 'bpy_prop_collection[key]: key "RGB" not found'

location: :-1

Is there anything that can be done about this?

Combines textures with different transparency; Duplicates Textures needlessly

I've been noticing that the plugin tends to smash all textures down into one like texture based on shared .png files, rather than actual likeness or other settings on the material. This causes textures for things such as expressions for humanoid models (which are often transparent image overlays at varying transparencies and settings) to be flattened into a solid filled texture. This hurts way more than it helps.

Further, I've noticed on a handful of models, one in recent history, that it seems to take a material and duplicate it for seemingly no reason. There's a single material using the texture, from what I can see, but it makes two sections in the combined atlas for it.

What did I do wrong?

When I try to enable it in Blender it says
ModuleNotFoundError: No module named 'material-combiner-addon-2'
Edit: nvm I think I figured out what I did wrong

Not working, crashing blender and traceback errors

I have ran into issue. I have 9 material 3 of them with alpha textures and this scheme
image
other 6 are just colors with different shader values(like smoothness, metalic, etc)
and after installing this plugin i`ve clicked generate material list then Save atlas to... button,
image
but materials disappeared no atlas created no save file dialogue is shown.
image
I have tried reinstalling plugins, reinstalling blender, running as admin, but nothing happens. if click checkbox here
image
blender gives traceback error
image
or just crashes without any error.

What could be problem?
Thanx:)

can't work properly in blender 3.0 with errors below

Python: Traceback (most recent call last):
  File "C:\Users\zach\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\material-combiner-addon-master\extend_lists.py", line 18, in draw_item
    row.label(text='', icon_value=item.mat.preview.icon_id)
AttributeError: 'NoneType' object has no attribute 'icon_id'

location: C:\Users\zach\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\material-combiner-addon-master\ui\main_menu.py:20

No idea why it happens. I'm using blender 3.0 with cats plugin dev branch (get the same problem on 0.19 as well).

Blender 2.8 Support

With Blender 2.8, just around the corner are there plans to support Blender 2.8 within this addon?

Root directory save issue

2019-08-18 03_52_59-Window
Replicate by separate [...], join, atlas combine materials several times until it breaks - trying to save in the root directory causing an error.

Traceback - Cannot identify image file (Blender 2.83)

Imported DC17A Rifle

I cannot figure out what the issue is.

`Traceback (most recent call last):
File "C:\Users\tumnusb\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\material-combiner-addon\operators\combiner\combiner.py", line 29, in execute
atlas = get_atlas(scn, self.structure, size)
File "C:\Users\tumnusb\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\material-combiner-addon\operators\combiner\combiner_ops.py", line 192, in get_atlas
img.paste(get_gfx(scn, mat, i, i['gfx']['img']), (i['gfx']['fit']['x'] + int(scn.smc_gaps / 2),
File "C:\Users\tumnusb\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\material-combiner-addon\operators\combiner\combiner_ops.py", line 156, in get_gfx
img = Image.open(src).convert('RGBA')
File "C:\Users\tumnusb\AppData\Roaming\Python\Python37\site-packages\PIL\Image.py", line 2968, in open
"cannot identify image file %r" % (filename if filename else fp)
PIL.UnidentifiedImageError: cannot identify image file 'E:\Textures\t_dc15_01_cs.png'

location: :-1`

system-info.txt

Traceback error, also messes with colours

Traceback (most recent call last):
File "C:\Program Files (x86)\Steam\steamapps\common\Blender\2.83\scripts\addons\material-combiner-addon\operators\combiner\combiner.py", line 52, in invoke
clear_duplicates(self.structure)
File "C:\Program Files (x86)\Steam\steamapps\common\Blender\2.83\scripts\addons\material-combiner-addon\operators\combiner\combiner_ops.py", line 104, in clear_duplicates
ob.data.materials.pop(index=mat_idx)
RuntimeError: Error: Index out of range

location: :-1

There are no actual "textures" in this, just purely flat materials with different colours, and metal/specular/roughness values, Use Nodes disabled. It messes with colours pretty hard.
I'll suppose I might as well learn how to UV map all of this so I can do it manually, at this point.
old gods 1
How it originally looks like
oldgods2
How it looks like (one of the variations depending on which ones I select, only selecting the materials for the buttons results in all of them merging into one colour
oldgods3
The error message, consistently appearing, whether CATS=true or false.

selecting files to atlas, and pressing "Save atlas to" doesnt do anything

When i select all the materials i want to atlas and pess the "save atlas to" button nothing happens.
I just get the prompt saying "duplicates were combined" but non of the files are atlassed at all.
Im not sure if this is a bug, or that im doing something wrong, so if anyone could help me with this that would be much apreciated.

(edit: when pressing "save atlas to" its supposed to open my file manager and let me select where to well, save the atlas to. But when i press the "save atlas to" button it doesnt open the file manager and just does what i said before the edit.)

Material combiner only combines normal maps and no textures

Hey! This might be just me being really inexperienced and nothing to do with the add on, but I haven't been able to find a fix for this issue and I've tried everything. Pretty much what happens is, when I'm trying to combine materials, instead of the image textures combining, it's the normal maps. I do have both attached to the material, but I've tried disconnecting the normal map in the node editor and it still prioritizes baking it over the texture image. Here is an example of before and after the atlas:

Example1

Example2

Any help will be greatly appreciated!

Generates wrong atlas and destroys original textures

Hi, after I have graded the material, I click the save atlas button. Then the correct atlas was not generated, and the generated png file only had black and white images, and then the original texture of the model was lost and turned into a white model.
like this.
https://github.com/guoodddd/question/blob/main/no.png
https://github.com/guoodddd/question/blob/main/mater.png
This is the generated atlas
https://github.com/guoodddd/question/blob/main/Atlas_45991.png

Update notifications

Hey,
I am getting a lot of update notifications for version 2.1.2.0 but the version always stays at 2.1.1.9.
I think the init.py file still has the version listed as 2.1.1.9, so the updater gets confused?

Pillow and Linux

I am running blender 2.82 through steam, and I can't get pillow to install. The automatic installation option does not work, and it is already installed manually on my system on every version of python I have (3.6-3.8). I ran it in a terminal to see if that could provide any further insight, and it did not help, although I did discover something else weird. When running the auto installation or clicking the button for manual installation, after a few minutes of processing (I think it took that long because blender seems to be having issues with running through the gamemoderun command. When I exclude it there is no noticeable delay), it opens a python console in the terminal.

Can't create atlas

When I press "save atlas to.." it doesn't direct me to save it anywhere and doesn't combine the materials. It says at the bottom "Duplicates were combined" for some reason.

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.