-
Notifications
You must be signed in to change notification settings - Fork 13
Description
I've been exploring multiple types of stud instancing. Linked duplicate objects, collection instances, and geometry nodes.
Initial testing seems to indicate instancing doesn't help performance at all. In a lot of cases it seems to hurt performance.
In the case of collection instances and linked duplicates, import times went up and RAM usage either also increased or stayed the same.
Blender starts to run into performance problems with large amount of objects. Using linked duplicates on a large set like http://omr.ldraw.org/files/1052 is very laggy because there are so many studs. Replacing the studs with empties and instancing the studs using collections had very similar results.
The case of the geometry nodes strategy, I removed the edge split modifier and implemented a color replacement node so that a part is only loaded once, as opposed to once per material. Import times slightly decreased and RAM usage went down or stayed the same. http://omr.ldraw.org/files/1052 was more pronounced, while http://omr.ldraw.org/files/338 was pretty close to the same. It appears the more studs and parts and studs that share the same color, the more performance is gained.
Although the improvement isn't very notable at this scale, it may become relevant at the scales of projects like Datsville. I will have to test.
There is also the issue of how to handle instanced studs that have a texmap applied to them. I think the best approach is to not instance those and just treat them like normal. At the moment, the textures don't load at all in the instancing branch. But, I don't know if it's worth pursuing this much further considering the minimal effect on performance versus the complexity of the code.
It is also possible that this logic will work better in a different engine, so it may be worth fleshing out.