If you merge 2 meshes that have the same material, they can use the same material.
I dont know exactly how that is done in the engine, but it seems the material is being instanced.
So it seems there are 2 options when merging meshes:
1- Merge mesh and merge materials: Will make a texture atlas with a new UV. Awesome.
2- Dont merge material. Will not merge materials, but will reuse the material for both meshes being merged. So you end up with only 1 material if you are merging meshes with the same material. For example:
Say you are merging 10 trees into 1 mesh and the trees all have the same material.
When you merge them you end up with 1 material of 1 tree that is “instancing” in all the mesh. This is useful because you dont want to make a texture atlas of 4000x4000 for the whole mesh of trees. If that makes sense.
Now the issue is, if you merge a bunch of trees with the same material. How can you mask the material if it is “instancing” the material of 1 tree to all the mesh?
Here i made a video explaining it:
But i dont understand still how can i select one of the cubes? Do i still need a texture of all the cubes? Like thats going to be insanely large the moment i have a lot of cubes…?