Materials with the same name overwrite each other
alekasm opened this issue · comments
I've noticed that when I export to an obj/mtl combination and use the DirectX Mesh Convert tool to create the cmo, materials with the same name overwrite each other.
Example 1:
A.obj -> A.mtl
A.mtl has newmtl _2, newmtl_3
B.obj -> B.mtl
B.mtl has newmtl _2, newmtl_3
When I import the objects into my game the materials from A or B overwrite each other.
This is what the object looks like in Blender:
Here is what it looks like in-game:
Here is what other objects I have with deconflicted material names look like:
Material "sharing" is an important strategy for controlling memory resource usage, so a common practice is to 'merge' all materials with the same name.
That said, you can easily turn this off by setting a flag on the IEffectFactory
you are using. See the wiki.