Jump to content

Wrong number of verts calculated in mesh uploader?!


Christhiana
 Share

Recommended Posts

I'm uploading a mesh model I made to the beta grid. The LOD2 (low) model has 45 verts and 86 tris in blender. However when in the uploader I select it as the low LOD it says it has 174 verts and 86 tris! So it sees the correct number of tris but for some reason it sees 4x as many verts. Is this a bug in the mesh uploader or am I doing something wrong? When I import the exported collada file back into blender it still says 45 verts. The calculated Li in the uploader does seem right for 45 verts (it should be a lot higher with 174 verts on the low LOD).

EDIT

I remade the LOD2 model and still the same effect. The other LODs are calculated correctly

I'm using the latest firestorm x64

/EDIT

Link to comment
Share on other sites

screenshot.jpg

OK....so I never noticed before that the number of verts in the uploader is always higher then the verts count in blender. Am I correct to assume that the uploader splits the verts so each triangle has it's own 3 verts? That would explain things a little bit more. Even if this is the case I still find it strange that the verts count is 4x as much compared to the other LODs which seem to be about 2x as much as shown in blender...

 

Link to comment
Share on other sites

Nearly right. In the internal upload format there is a list of vertices in which each item has geometric position (xyz), normal (x,y,z) and UV coordinates (uv). Several triangles usually share each geometric position, where they meet, but if the shading is flat and the triangles have different normals, then that causes a new vertex item to be entered for each different normal. The same thing happens if the same geometric position appears in the UV map with different  coordinates because the triangles are either side of a UV seam. Finally, each material has completely separate triangle and vertex lists. So vertices with the same geometric position along a material seam are duplicated for each material. In Blender the vertex count is the number of different geometric positions, but in the uploader it is the number after all that splitting.

There are several implications. Smooth shading, where all triangles at a vertex share a normal, is nearly always going give fewer vertices. Smooth shading is a win-win because it can also make a smooth appearance with far fewer vertices than subdivision. Minimising the UV seams/islands can also reduce the vertex count. Once a vertex is split for normals or UV coordinates, it doesn't need to be split again for the other. So keeping UV seams along any avail;able sharp edges can also reduce vertex count.

So in conclusion, vertices are frequently, but  not always split, and by careful design you can minmise the splitting and thus minimise the download weight.

  • Like 2
Link to comment
Share on other sites

Thank you so much, Drongle! Now it makes perfect sense. I do have quite a lot of UV seems in the model and verything is shaded flat. I knew smooth shading made a difference on Li, but I had no idea this was the reason. Knowing this will make designing good low Li LODs a LOT easier. especially on the low and/or lowest LODs I see no reason not to shade everything smooth.

Sooooo....back to the drawing board!

 

Link to comment
Share on other sites

I would be very careful with changes in the shading of LODs. Most often I have to shade the lower LODs flat, even when the high LOD is smooth shaded, to maintain a consistent shading over the LOD transitions, under various lighting conditions.

It can be very obvious and disturbing going from flat to smooth shading on the LODs, depending on the camera angle and the light conditions.

Also, as Drongle has pointed out. Once the vertices got duplicated by a UV split, or material border, they won't duplicate again by having a hard edge at those. So hard edges on UV splits, material borders are for free, and vice versa, UV splits on hard edges are for free.

Personally I would never destroy the shading to get a slightly lower LI. Though, as always, it depends alot on the model what works, and what not.

  • Like 1
Link to comment
Share on other sites

When making LODs I try not to have visible LOD switching. I test with a viewer LOD setting of 2 (firestorm default) and 256m viewing distance. I guess you're right on the shading. If I don't want visible switching I'll have to keep shading consistent across my LODs. Especially when working with normal and specular maps. As for UV seems, I can't really seem (no pun!) to reduce on the ones I already have if I want to avoid stretching.

 

I'm already getting better results with all the tips! At least now I know where things are coming from... 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...