- Home /
Can I force unity to "weld" or "attach" a vertex of common faces, just like 3ds max?
Hello everyone! I have a small city scene where in 3ds max I check the number of vertices to be about 3 million, and as I researched and got this and this links , I understood why I have 30 million! verts in unity. I also read about smooth groups, but still search for a solution to this. First I have to optimize the model in 3ds max, since 3M is too much for game use. But I thought of a method or script that can tell unity to see each vertex as one, or is it a system feature that cannot be changed?
Any other hint/solution about having a detailed city model and still not acceeding the limits.
Also in this link, "not more than several million" on PC mentioned by the user manual. several million in 3ds max or in Unity?
From my understanding you want to do the blender equivalent of Remove Doubles. $$anonymous$$erge all verticies that are in the same position, correct? if so I can help :)
I don't know if this is possible! I am a bit confused. In this link that I mentioned above it says:
"Note that the actual number of vertices that graphics hardware has to process is usually not the same as the number reported by a 3D application. $$anonymous$$odeling applications usually display the geometric vertex count, i.e. the number of distinct corner points that make up a model. For a graphics card, however, some geometric vertices will need to be split into two or more logical vertices for rendering purposes. A vertex must be split if it has multiple normals, UV coordinates or vertex colors. Consequently, the vertex count in Unity is invariably higher than the count given by the 3D application."
then this must be something done by the graphic card and not the engine, as I understood.
I believe my method is the only way, but maybe there's something in the import settings???
Answer by MountDoomTeam · Mar 07, 2013 at 10:16 AM
Thanks for the info about unity duplicating any vertices with multiple normals, UV coordinates or vertex colors.
Yes you can merge and process the vertices how you want inside unity. if you are talking about mesh made from maths, that would make sense.
if you're talking about code made in modelling application like 3d Max, it's probably best to process it in 3d Max 1st.
the reason for that is that 3d Max already knows where all the vertices are and will have special code to merge them faster. if you are doing a city, the different facing vertices on the same point should be distinct, and that means only the edges and corners of buildings duplicate. curved shapes can share vertices. All the vertices that are on the same flat sides should be merged and have the same normals and UVs etc. if you wrote code to do that in unity, it kind of has to compare every one of 3 million vertices to every other which takes a long time, maybe it's doable at load time, or as a separate editing code that resaves an object. but in 3d Max if you can do it it's a lot faster.
the answer is that you have to optimise and merge all same vertices on your meshes 3d Max 1st.
Dude first thanks for you answer, $$anonymous$$y question is a bit different, suppose I have done all the merging/welding in 3ds max. Still Unity splits each vertex. Take a basic example, draw a simple cube in 3ds max which has 8 verts in 3ds max, but 32/48 or more verts in unity depending on the lighting ..etc.. $$anonymous$$y question is: Is there a way (a script) that we can force the engine or the graphic not to split the verts , which will optimize performance.. Personally I think, that's the way the graphic cards work, they render the mesh first (one pass) the lighting(another pass) and so on .. but i am interested if there is some control over that!
Yes, there is: set vertex normals to smooth. It is hard edges that cause duplicate verts to be created.
In $$anonymous$$aya, when you're in polygon mode, there's a Normals menu and you can select the whole model and choose "Normals->Soften edge". I don't know if it is done the same way with 3ds $$anonymous$$ax- the last time I used that everything appeared to be pretty much the same as $$anonymous$$aya- but it has got to have that option somewhere, look it up.
Ah ok, you mean the turboSmooth modifier of max. But as you smooth a vertex, you create more vertices. Since the main topic was reducing the vertex number, even if the graphic card will not split the (sharp edge) verts, but we will have much more verts already co$$anonymous$$g from max.