Vert count for models different in max and unity .what's up?

Hi,

I’m importing some simple models from max and I have noticed that the vert count in max is not the same that the one unity shows. I’m setting smoothing angle to 180 to minimize verts but it still shows much more vets. For example, I have a little tile model for my enviroments and in max it shows 10 verts and unity 21.

Does anybod know what is happening? If the problem are smoothing groups is there anyway to disable this when importing into unity?

By the way: I’m not using any light on the scene. I’m checking this in a really basic scene, a camera and the model.

Thanks in advance,
HexDump.

I recommend you try right clicking in Maxs viewport and unhiding all first. If you dont have anything hidden then go the mesh your importing into unity and click on a vertex and click on the unhide all button. If you see a bunch of floating verts then that may be your problem. Another thing can do is look in the select by name panel (hit h shortcut) and if you see a mesh there with a name but no polys or vertex or whatnot you may need to delete that.

Cerainly don’t count on the number of triangles which unity3d shows in the STATS display. Its not very accurate because of a lot of factors.
With vertexcount there are multiple possibilities why unity might show (mostly) more then in max.

Depends on how you map materials and also hard edges tend to increase vertices.

I’m guessing it’s a smoothing thing. In Max, when you make a hard edge, it still shows the vertices as singles, when in reality, to get vertex normals for lighting the faces differently, there has to be more than one vertex at each location to hold the different normals.

Max just hides them from us dumb artists so we don’t have to worry about meshes splitting apart and other ugliness while we’re modeling :slight_smile:

You can prove it to yourself by putting a Displacement map onto a cylinder and rendering- the caps (hard edges)break apart from the rest of the cylinder

Actually, I’ve been digging around with this today, and it’s not (necessarily) any of the reasons above. I have a mesh where all triangles lie on a plane, all have the same smoothing group, all share one material and all vertices are welded. Yet when it’s imported into Unity, there are nearly twice as many vertices as there needs to be.

So I’m at a bit of a loss to explain why Unity creates redundant vertices. I guess I’ll have to package up a sample mesh and submit it as a bug report if no one has any other suggestions what could cause this.

It’s not a bug. it’s related to materials and number of lights. The stats show the number of processed verts.

For every material on the object, it has to process every vertex. For every light affecting the object, it has to process every vertex.

But just cause it’s being processed doesn’t mean it’s affecting performance. its just how it works.

You can look at the mesh itself and check the preview windows to see the object and it flat out says the stats.

Granted, the number itself is misleading.

262114--9420--$box_168.jpg

That’s your problem right there. Welding is all well and good for applications like 3DS Max, but the simple fact of the way that realtime rendering engines like Unity work is that welding is meaningless. If you were to unweld your planar mesh you would see that it has ‘nearly twice as many vertices as there needs to be,’ exactly as you see in Unity.

I’m a bit fuzzy on the details, so hopefully someone with a bit more knowledge can correct me, but I believe that welded vertices are simply shorthand for vertices that have identical normals. Just because you weld one vertex to another doesn’t mean that it goes away.

Ive got this problem right now. My programming partner has made some system that swaps out mesh to different states (ie damage states). Only problem is none of them are the same amount of verts in unity when they are in max so the system doesnt work.
I have learnt some things but still not found a solution. Here’s what I have learnt:

-If you want a textured, unwrapped object with smoothing groups it will have more verts in unity. Thats the way it is.
-Welding verts does weld them (ie make them one), not move them to the same location
-You can match the amount of verts in max by doing this: go to the utilities tab (little hammer) > More > UVW remove and remove UVs and materials from the object. Export it with the fbx exporter with nothing selected. I managed to match the vertex count in max. Only problem was that theres no easy way to texture it now. This is good for streamlining collision though.

So what ive figured from this is UVs also affect the vertex count. All my duplicate models have different UV layouts, seems to be when there are more UV islands there are more vertcies which kinda makes sense.

Heres my question back to the community…how can I have many identical models with the same number of verts in unity but different UV layouts?#