x


Why is there such a huge disparity in polycount between Unity and Maya?

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?

more ▼

asked Dec 12 '09 at 05:15 PM

noradninja gravatar image

noradninja
805 17 23 41

(comments are locked)
10|3000 characters needed characters left

4 answers: sort voted first

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.

more ▼

answered Dec 12 '09 at 06:30 PM

duck gravatar image

duck ♦♦
41.4k 95 152 415

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)
10|3000 characters needed characters left

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.

more ▼

answered Dec 12 '09 at 07:07 PM

Brian Kehrer gravatar image

Brian Kehrer
2.8k 9 11 50

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)
10|3000 characters needed characters left

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.

more ▼

answered Jan 06 '10 at 05:15 PM

rob gravatar image

rob
1

(comments are locked)
10|3000 characters needed characters left

Note also that if your model has quads, they get converted into two triangles on import into Unity.

more ▼

answered Jan 07 '10 at 11:43 AM

IainC gravatar image

IainC
1

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x584

asked: Dec 12 '09 at 05:15 PM

Seen: 3465 times

Last Updated: Dec 12 '09 at 05:15 PM