Is it preferable to hollow your assets/models to improve game performance?
Hi, Whether it be the model of your character or an environment asset like a mountain, is it preferable that, for the purpose of improving game performance, such model/assets (.fbx, .obj, ...) are hollow (in other words, empty with only the surface mesh)? We're developing a mobile game that is 3D. I'm aware that this puts the phone in a tough spot in terms of computation power and graphics. I'm also aware that applying various effects generally makes things more burdensome, and that there's no magic formula as what should be how much. I'm curious, however, whether the models that I make with Zbrush should end up being hollow so that they are, say, much lighter in terms of file size and help mitigate the phone from overheating, and so on. Thanks!
Answer by JVene · Nov 12, 2018 at 12:38 PM
While a number of 3D modeling tools deal with solids, they are a mathematical model used for such diverse purposes as boolean operations (cutting holes in walls, subtracting a solid from a solid), or physics simulations (AutoDesk inventor simulating a mechanical operation). The only type of information Unity can make use of is, essentially, the outer shell. Under the hood, the data Unity uses to represent 3D models is in a form all but dictated by the GPU interfaces of OpenGL and DirectX (which carry forward into Vulkan, Metal and the DirectX12 counterparts). Those interfaces are only capable of accepting triangle collections (strips, fans) describing the surface. Where there may be underlying information (bones in characters, muscles under skin), they are for physics (or related) simulations and are not part of the rendering burden you're describing. In a basic sense, what you're thinking about (just using the surface) is automatic as a result of importing data into the form Unity can use.
There are exceptions in the details, of course. Volumetric fog or translucent effects may include interior structures, and 3D textures may be considered exceptions, but these are the kind of exceptions recognizable as 'heavy' on the GPU, and I don't think are directly pertinent to your concerns about mobile GPU hardware (you're likely to avoid such techniques while targeting mobile devices).
You're far more limited by total vertex count, and so you need an optimization tool for your models. I don't know ZBrush well enough to advise here, but if you have used 3DS Max, you may know Max's "optimize" tool, which "automatically" reduces the number of vertices in a given mesh, according to adjustable parameters. Passing your models through such a tool is paramount by comparison.