- Home /
Does the (over)number of vertices make conflicts with the materials?
Hello everyone!
I have a conflict here between unity and 3ds max and can't figure out what is the problem. I have a city map made in 3ds max, I imported the map(fbx), and the materials are a mess. In 3ds max I have the materials perfectly organized, but in unity I have a single material named "standard material" which is responsible for almost the whole map. As I change the color of this material, the whole map is affected.
The map(model) has 3 million vertices viewed in 3ds max, and not in unity. Since unity counts as the graphic card counts them...
I need to know if there's a limit for the vertices count (total and not per mesh) that unity has conflicts with the materials, or what other reason? Any help would be great! Thanks
Answer by Bunny83 · Feb 28, 2013 at 10:20 PM
No, Unity has not a total vertices limit, but there's a limit of 65000 vertices per mesh. So if your "map" is split into several meshes, each less than 65k there's no problem unless your hardware(system memory, graphics memory, ...) can't handle it. If one mesh has multiple submeshes you have to add one material for each submesh in the materials array of the renderer component. Note: submeshes are not seperate meshes. Submeshes belong to the same mesh (still a vert limit of 65k) but parts of the mesh uses a different material. You can usually see the submesh count when you select the "mesh asset" in the inspector. It will also tell you the vertices and triangle count.
Thank you for the answer, but still one point is not clear to me. I want to know if the material "mess" or conflicts are caused by the over number of verts/polys or it has nothing to do with that.
@bunny83 I need to know one more thing related to this, The vertex count measured in 3ds max or unity? cause unity splits the verts to several verts ... It must be 65000 according to the 3d app, I need to be sure:)
Of course 65000 vertices in Unity since the index size used by Unity is 16 bits and can only address 65536 vertices. However it seems Unity implemented a slightly lower limit.
This might help:
http://tech-artists.org/forum/archive/index.php?t-562.html
They talk about a script for 3dsmax which will count the unique vertices directly in 3dsmax. I can't test it since i'm a programmer and i don't have 3ds max ;)
Actually i don't get why something like that isn't a built-in feature. Every engine will split the vertices because that's how the hardware works. I understand that it's easier to work with "combined" vertices, but in the end the artist should know the true vertex count.
well as I see this is a very low number!! I have a building of 24000 verts (shown in 3ds max) and 485.1 k in unity!! which is 20 times more (still no ligting) , only 2 materials are applied!
Are you applying some kind of smoothing? That kind of multiplication would imply a lot of split vertices. A vertex is split into more than one if there is a need to have a different normal, uv coordinate or vertex colour - it's hard to imagine needing 20 for each one!