The project I’m currently on suffers from there only being one of me to keep an eye on artists. Since I got here, I’ve been nose to the grindstone trying to get the character pipeline solid. Lots of other things have come up, issues with co-workers got in the way, the usual, right? Now I’m finally getting around to trying to fix and clean up our environment art and I’m, well… terrified.
What I’ve come across so far is multiple copies of materials with no actual difference, multiple exports containing the same geometry and no way to verify that every reference is pointing to one instance of that geometry, insane numbers of multi-/sub-objects in a single export, etc… I have questions.
I have a pretty good grasp on how real-time rendering works, and specifically how it works within the version of Unity that we’re working with. What I lack is heavy experience in optimizing what other people have made. My inclination is to split out all the duplicated geometry and export a single copy of each, then export out whatever small differences exist as individual objects that can be combined at run-time to make variations on a theme. For example:
My environmental artist made two tents. The tent geometry and texture set are about 90% identical between the two. One tent has a banner on it, as well as a squared roof decoration. The other has no banner and pointed roof decorations. The 10% difference in the texture is just the roof decoration.
I want to tear the tents into bits; the main tent becomes its own object, the decorations each become an object, and the banner becomes an object. This also means I need to redo the textures so that the decorations can be pulled out into a separate - though much smaller - texture set.
This is what makes sense to me, but I’m struggling with is that I’ll be essentially making more objects, more materials, more textures, and more draw calls out of this process. There’s never more than a handful of tents in a given space, so I fear my savings will be fairly small even once batching gets involved. However, it gives me more options down the road for re-use now that the tent is in smaller, more logical components. Also worrying is that this is a pair of tents giving me pause, and the rest of the environment assets look much the same with duplicated geometry baked in instead of heavily instanced. I’m feeling pretty swamped with the sheer enormity of what it looks to me like extremely necessary busy work and I’m coming to you guys for some kind of sanity check.
Am I insane to be considering this?
We have performance issues in our game already with thousands of draw calls happening in cities and settlements and we’re bumping up against 4GB of RAM used at run-time. Batching in Unity usually involves increased RAM usage, but my assumption is that I’ll see savings after reducing the number of copied-not-instanced objects in the scene. I should also see a dramatic decrease in draw calls once I have fewer copies of materials and turn static batching back on… but I won’t be able to see any of that until I’ve already done weeks of clean-up work. What if I’m just wrong and none of the work I’m laying out in front of me gets the performance boosts I’m expecting? Turning on static batching in the past actually killed our frame rates, but that’s because there was almost nothing to batch; there was not enough savings for the amount of overhead involved in testing the scene for batching, I guess.
Help?