Grim-es / material-combiner-addon

Blender addon for material combining, uv bounds fixing
MIT License
451 stars 36 forks source link

Weird output uv map #86

Open awesomedudeer opened 6 months ago

awesomedudeer commented 6 months ago

I am wanting to make an atlas of my minecraft world but some parts of the world became black when run through this program and i think its because of the uv map WM-Screenshots-20231108085146

Grim-es commented 6 months ago

Looks like black colored parts are on Banners and such. That might be due to unsupported shaders or incorrect node names. The combiner relies on node names to identify which nodes to use. The easiest approach is to use a Diffuse BSDF node for Each material, as it has only one input, and check that its "name" property is set to "Diffuse BSDF" without translations. And the Image Texture node has "Image Texture". You can find the name property in the Shading tab when you select the node and press the 'N' key to reveal the right-side panel in the nodes window. Information on supported shaders and the expected node names can be found in this script: utils/materials.py.

Additionally, minecraft textures are small, so UVs can be misaligned a bit. To disable that you can manually remove the + 2 from the margin and the 1 + from the border_margin in this file: https://github.com/Grim-es/material-combiner-addon/blob/55a235dcd93455994aec1226bbbfd78092ff6463/operators/combiner/combiner_ops.py#L339

Also make sure all textures saved in 24/32 bit and non of them are indexed.

Mystery24601 commented 3 months ago

All I had to do was turn off a checkbox that would supposedly be in this menu. That only ever works on the addon "images to planes" case scenario. Don't know if that will fix the issue of yours but I did get the same output UV map Supposedly somewhere here