|
I have a model, in Maya it says I have 1108 tris. When I load this object in Unity, statistics tells me I have 2600 tris! I checked in Maya to make sure that I did not accidentally duplicate all the faces of the model or have any hidden objects in the scene, etc and I don't...so what gives? The vert count Unity is giving me seems a little high too...in Maya I have 576 verts and 758 UV's, this comes out to 1334, in Unity it says I have 1200 verts. I am aware that UV cuts in your map can cause degenerate tris when OpenGL goes to render the triangle strips, etc, but this seems like too much of a difference, over 2x the polycount. Am I missing something here?
(comments are locked)
|
|
The vertex and tri count reported are the number actually being drawn by Unity's renderer. This usually differs from the values shown in your 3d editor because of the way realtime 3d rendering works. The tri count is often higher - double or perhaps triple - depending on how the shader that you're using works. Many shaders draw the tris once for ambient lighting, and then another pass for direct lighting. Some shaders use even more passes for more complex effects, and with these, the number of tris redrawn can be even higher. There's a separate reason why the vertex count can be higher. Any vertices in your original model which fall on a smoothing seam, or a UV seam, has to be duplicated in the mesh data. This is due to the way in which the data is sent to the graphics card. So, the more smoothing seams and UV seams you have, the more vertices will be reported. Thanks for the explination about the shader, thats pretty critical. I figure the tri count is so high because the shader uses two passes (ambient and direct lighting) plus degenerate tris being generated by Unity's renderer when setting up the triangle strips. As our game will have no lighting, I will test with a single pass ambient shader and see how that affects things. As for the verts, I knew about the smoothing/UV seams, but I can actually live with the vert counts I am getting.
Dec 12 '09 at 08:27 PM
noradninja
(comments are locked)
|
|
Additionally, any vertices on 'hard' edges are duplicated, since a vertex can only have one normal direction. You can force soft edges in Unity by setting the normals to 180 degrees. Doing so may make any edges that need to be hard look strange. You can solve this either by leaving them hard, or adding additional vertex loops where necessary. A 'hard edge' is what I mean by a smoothing seam. I guess 'hard edge' is probably a more descriptive term for this! :)
Dec 12 '09 at 08:55 PM
duck ♦♦
(comments are locked)
|
|
Hello, i had the same problem and i figured out that when exporting from maya a glitch happened and there was actually 2 meshes in exactly the same position when the final file came out. im not sure if im explaining myself right but what i did was just delete the inner mesh.
(comments are locked)
|
|
Note also that if your model has quads, they get converted into two triangles on import into Unity.
(comments are locked)
|
