I have a mesh that has 486 verts in maya, but jumps 20 3.1k verts in Unity. It had a bunch of UV’s originally, and I deleted those and the history to be safe, but it didn’t help.
I’m pretty new with Maya, so please forgive me if this is a dumb question.
I too have found this to happen on occasion. One thing that I found to help is that even when you delete history, you can have some stray nodes floating around (visible in your Outliner). Sometimes those nodes are from past functions that you moved an object out of a node that was part of a previous function or some other weird thing.
Anyway, take a close look at your Outliner and delete any empty nodes that might be lurking. Sometimes that will clean up your poly count a bit.
Still, even with that, the vert count in Maya often differs from that in Unity (not sure why).
Well, I’m no expert on how Unity handles geometry on import, but there are a few things from general game development that may be causing your issues.
Most rendering engines need to duplicate verts to achieve certain rendering looks, so here are some of the most common things to look at.
Hard edges. If you have lots of hard edges on your model, most engines will duplicate the verts of the hard edge to achieve the look.
UV borders. Check to make sure you don’t have any un-necessary UV border edges. You can tell Maya to display UV borders and they will appear on you model as thicker edges. If you turn on border edges and your model is covered with thick lines, this may be your problem.
Material boundries. Multiple materials/textures applied to the same object can cause duplicate verts, as well.
Another posability is tri-stripping. I don’t know if Unity tri-strips the models, but that can cause TONS of duplicate vert if you don’t understand how tri-stripping works.
Hope some of those tips point you in the right direction.
I have an issue much like this, and other’s I’ve seen posted.
I always get more verts than I have inside Max or Maya. I’ve done different tests to see where things are going wrong but it seems to differ with each attempt.
Exporting a cube out of Max actually multiplies the verts times three. But exporting my soft edged obj made in Maya with an original vert count of 761, now has 1.7k verts in Unity.
I have the exact same thing: in 3DS it’s 972 verts, but in unity its 2900 (3x’s the amt shown in 3DS)
I only have the one model in the scene and with or without a light, it’s the same vert count. So since someone else is seeing 3x’s the vert count from a 3DS exported file, there’s GOT to be a good explanation ( and hopefully solution)
Hey
Maya might do the same as Max: Count the physical verts and tris not regarding split uvs and hard edges (smoothing groups)
Unity counts differntly, all “hard edges” and split Uvs make extra verts.
So the tris number usually not match
Shaders effect the physical number of times a tri is drawn to the screen. If you have a shader that requires two passes, it is the same as doubling the triangle count for the triangles that have the shader applied. If you have 24 faces of a mesh that have a two pass shader applied, it is the same as having 48 faces.
This is all based on the way the previous engines I used worked, Renderware and Unreal, and numerous in house engines.
I suppose it would depend on where in Unity you were looking at teh numbers, and how Unity reports the numbers.
This could explain a lot of the problems I’ve been having.
How do you create an edge that looks hard but that Unity accepts without magicing up more vertices? Anyone know what Unity sees as the optimum edge?
The only way to get hard edges is to duplicate the vertices (more to the point, the normals).
If you’re lightmapping your scene one thing you could do is bake the lightmap with the edges hard and then smooth them all in Unity. They’ll still look hard then. I do this a lot on the iPhone to save precious vertices
Yup, all lightmapped (though not sure about baked) but how do I smooth the vertices in Unity?
Is there a tutorial somewhere I’ve missed?
I’m not sure I’m totally understanding about the hard edges. I’ve got a lot of straight walls and rooms with square corners thinking this was low polygon but the models come into Unity huge.
In the Unity import stats, a 1 metre cube imported from SketchUp has 24 vertices and 12 triangles. A one metre cube from C4D has 8 vertices and 12 triangles. Neither of which really seems to make sense. A cube from Silo is 24 verts and 12 tris again.
8 vertices fully makes sense.
Thats 1 vertex per corner of the cube, which basically means its shared with all sides that include that point
This is the common if you don’t split sides on cubes created in 3D modelling apps normal.
24 makes just as much sense.
You have 6 sides, each 4 vertices.
6*4 = 24 → each side has its distinct set of vertices, while the triangles on the same side share the two on their seam.
Well that’s what I thought but 12 triangles and 8 vertices was the bit that confused me. Then I tried to add up the vertices on a cube with triangulated faces and including the diagonals got 18. I might have added it wrong.
Either way, Unity isn’t adding more vertices so I don’t have to worry about this aspect I guess.
Cheers and huge thanks to everyone for all your help!
Perhaps you are confusing vertices (points, or corners) with edges? A cube with triangulated faces does indeed have eighteen edges, but only eight vertices.
All programs should be able to produce either eight or twenty-four vertex cubes. The reason for this is normals and smoothing:
Picture the corner of a cube. It is shared by three sides, each of which faces in a different direction. Because a vertex can only have one normal, each corner has to be triplicated in order to get a version with each normal.
A cube with twenty-four vertices will look like you’d expect a cube to look, with hard edges. An eight vertex cube will always have a gradient on each side, which will make it look like it’s from an old, Gouraud-shaded 3D game. That is, it won’t look like a real cube.