I would like to create a texture atlas for a larger scene with all sort of objects without having multiple copies of the same texture in it, based on how many times that object appears. So for example lets say I have 6 identical trees and 2 identical houses, I would like my textures atlas to contain one tree and one house texture as if I only had 2 objects, instead of having 6 tree textures and 2 house textures that look exactly the same.
I did find a solution to this, however it's not easy to use so I'm wondering if there's another easier way. The way I can do it is when I'm done with the scene is to delete all the copies so I only have 1 instance of every object. Then I can just join all the objects into 1, create a new UV map, bake my textures into a new image and be done. (I found this method here: https://www.youtube.com/watch?v=Tj-S5QAac3U ). Once my atlas is created then I can separate all of my objects and make copies again and move them where the old ones used to be. The new copies of the objects will take their texture from the atlas without needing to have that texture appear multiple times.
The issue with this technique is that if I end up adding a new object at any point in the scene, then I have to do this whole process again which is pretty annoying and time consuming especially if the scene gets larger and more complex.
So what I'm wondering is if there's a better way to create a texture atlas which will know that some objects are just copies and will only include 1 texture for all of those instances of the same object inside the texture atlas.
Thanks in advance!