SS3D
SS3D copied to clipboard
Investigate why we have so many vertices in game
Summary
We have an issue with our models in Unity having way too much vertices compared to what is expected.
We need to understand what's causing this, and eventually have some solutions to reduce the count. The issue is probably multi factorial (lighting, too much vertices in blender from the start, some other unknown factors...).
Example of the APC is below.
Media
Vertices in blender: 138
Vertices in Unity raw: 254
It seems there will be more vertices when you add lighting, and even more with shadows...
Possible Solution
This conversation can be a good starting point : https://discussions.unity.com/t/number-of-vertices-of-a-model-is-not-the-same-in-blender-as-in-unity/190409/3
We could disable the rendering of layers below floortiles if there is a floortile on that tile. There are many pipes, wires, and plenums down there that are not typically seen because there are floortiles blocking the view.
This seems to be a great breakdown of our situation: https://www.youtube.com/watch?v=yQSl2vzi0jA
When he explains its at 5:00, for those unaware, we are essentially using the method he has labeled as "PNO_Vert_03_YeEdgeYeUV_02" and "PNO_Vert_03_YeEdgeYeUV_03", which have vertex costs.
So the primary reasons for our excess vertices are:
- We use a palette texture for most models, thus we break up the uv vertex connections, resulting in increased vertex data. Basically every change of colors between two faces on a model is causing increased vertex count.
- Similarly as above, using hard edges causes increased vertex count. We use a fair amount of hard edges on some models. One thing to note is that about half the time we use hard edges on a edge separating two colors, but I do not believe the effects stack, both increasing the vertex data.
So I think the long term solution here really just comes down to optimizing our models overtime.
- Minimize base vertex count by optimizing mesh.
- Minimize UV breaks. Obviously we want to still color our models but a way to add color detail without breaking UVs is to use floating meshes more. The floating mesh is separated from the primary mesh and thus when coloring the 2 individually in the UV editor, it does not split the UVs.
- Minimize hard edges. Use them conservatively. Possibly using autosmooth with a select degree could replace hard edges on many models, though I'm not sure if that is actually more vertex efficient or not.