0
$\begingroup$

I need a way to have multiple materials per polygon. Basically what I want is to have one "layer" of materials to create a colorID mask and another "layer" to export a mesh with the correct Texture Sets for Substance Painter (the latter creates a separate texture for each material the mesh has). In most of my cases the two don't match (I want multiple colorIDs on the same Texture Set-material) so I idealy need a way to have a single mesh, which I can dynamically change, while having two layers of materials on it, where I can disable/enable a single layer to make an export.

I thought of have a feeling that one can do it by splitting the object in blender into several objects and then writing a script that assigns a single material to each object, but It would be preferable for me to have a single object with two material layers.

Another idea I had is to use vertex groups, but they are invisible in viewport and should still be manually selected to apply materials every time before export (and I do export often). Maybe there is a modifier that can allow two cloned meshes on two different layers, both of which change whenever you change any of them, while maintaining unique materials on each layer?

$\endgroup$
2
$\begingroup$

Maybe this can be realised (if I understand your question correctly, that is) by utilizing Blenders ability to link materials to the object instead of the object data, as it does by default. What I'm talking about is this little dropdown here:

object link

What that does is, it tells Blender to keep track of Material assignments by storing the assignment on the object instead of the object data (the mesh itself). The trick now is to use instances of the same object, and assign different sets of materials to those instances. You can instantiate the objects using Alt + D, and verify the presence of an instance if there is a number appearing at the mesh datablock:

instances

Now, if you have a setup like this, which the three heads instanciated:

setup

and you move a vertex in edit mode:

move vertex

after getting back to object mode, you have this:

final

So you can now edit the mesh once, but export different objects with different materials at any time from it.

$\endgroup$
  • 1
    $\begingroup$ Dude, I actually never thought that would ever be possible... Speachless... I will check in Blender today and mark this as answer. $\endgroup$ – cubrman Mar 27 '17 at 11:39
  • $\begingroup$ Nope I think it won't work, for what I need is having 1 suzanne with 1 material all across it and another suzanne with 5 materials on her different polygons. $\endgroup$ – cubrman Mar 27 '17 at 11:47
  • $\begingroup$ @cubrman That should work. You can assign to individual faces regardless of the material link option. What I'm not sure is the different number of material slots. When I tried it today, I was able to add slots on one object, but not having them on the other object. That worked. However, trying to remove a slot made Blender crash. To be tested. $\endgroup$ – aliasguru Mar 27 '17 at 14:33
  • $\begingroup$ None of my tests yielded any required result. If you would be able to assign different number of materials to two cloned meshes - do post the solution here. I actually dug out a theory on clones and all pointed to the fact that my request is impossible, because the clones both point to the same mesh. If you succeed - please do post your solution. $\endgroup$ – cubrman Apr 1 '17 at 13:03
0
$\begingroup$

aliasguru's answer above is close, but it doesn't quite do the trick, at least in my setup. I'm using the Export Colour Layout addon, which is unable to produce a correct ID map when using "Object" as the material attachment as suggested above.

I did make a few modifications to get it working, however: I duplicated the mesh with shift-D instead of option/alt-D and then linked "object data" between the two. Only in the object to be exported into Substance Painter did I set the material attachment to "Object"; the other I kept at "Data". I set all the material slots all to be the same material in the Substance Painter-destined object instead of deleting any, as this has an effect on the material assignments to both objects, and Substance Painter only sees one material.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.