I’m currently attempting some performance-tuning in one of my levels, and could use some help, please:
My current focus is on one particular node. According to DirectTools (which is a wonderful tool, by the way!), removing this node results in a significant jump in performance. The node in question represents a band of trees, modelled at a polygon-count that looks reasonable to me, and that encircles the outdoors “courtyard” section of the level. (The trees behind, representing the rest of the surrounding woods, become progressively simpler.) The model also includes vertex-colours. There are about thirty-one trees included in the model, and the entire thing is made up of ~270 000 vertices, I believe.
Again according to DirectTools, this one node accounts for a significant percentage of the memory used by this region of the level. While the actual amount of memory used doesn’t seem enormous, I may be mistaken in that, and it may either way point to this being an expensive model.
However, I’m not sure of what to do about this. I don’t want to reduce the quality of the trees. If I split them up and use LODNodes, I fear that the proliferation of nodes may itself hinder performance, as might the fade between LOD-levels. (Having the trees pop in would be rather unsightly in this case, I think, as they’re the “front line” of the woods.)
One thought that occurred to me was to use Panda’s built-in instancing feature, instancing a single tree-model thirty-odd times–but I don’t know whether that would help here. It helps reduce the CPU cost of animating multiple Actors, as I recall, but would it help reduce the cost of these trees? (Note that they are in any case identical, just scaled, rotated, and with their own vertex colours. Those colours could perhaps be left aside.)
Hardware instancing is possible–but how widespread would availability of this feature be in potential users? I don’t want to limit my game’s potential audience for something that right now appears in only one level.