Home Technical Talk

Vertex count for 2 UV layouts

polycounter lvl 10
Offline / Send Message
dzibarik polycounter lvl 10
I've been wondering - if I have 2 different UV sets (one for texture, one for lightmaps) will the one for lightmaps affect vertex count too? I think it should but I'm not sure... Can anyone clear this matter for me?

Replies

  • Eric Chadwick
    Options
    Offline / Send Message
    Depends on the game engine and how it compresses data. For example Unity does increase the vertex count when I add UV2 but it's not double. One mesh goes from 1030 to 1104 when I add UV2. Only 74 verts added.
  • monster
    Options
    Offline / Send Message
    monster polycounter
    UV seams increase the vertex count, it doesn't matter what channel they are on.
    But if you use the same UV islands for both (just repacked) then the vertex count should remain the same. 
  • echofourpapa
    Options
    Offline / Send Message
    echofourpapa polycounter lvl 4
    When looking at vertex counts you have to be aware of any splits, since the arrays that hold the mesh data, the verts, normals, and UVs all need to be the same length.  Meaning you always have to have the same number of vertices, normals and UVs.  Since an engine can't remove data from your mesh, it can only add, vertex count is usually increased when the amounts don't match.
  • Klunk
    Options
    Offline / Send Message
    Klunk ngon master
    there's a best case :  exported vert count = number of verts in mesh and a worst case : exported vert count = number faces * 3.  it will always be in that range, as been said above splits in uv mapping will add to the count at export but also hard edges in smoothing and vertex color will too.
  • Farfarer
    Options
    Offline / Send Message
    It's 1 vertex for each unique combination of values (color, each UV map, normal, tangent, position, etc...).

    If you keep the same UV islands (just moved around a bit) you won't be adding any more vertices.
Sign In or Register to comment.