Search Unity

Insanely high vert increase from blender to unity

Discussion in 'Getting Started' started by tawdry, Jan 12, 2018.

  1. tawdry

    tawdry

    Joined:
    Sep 3, 2014
    Posts:
    1,357
    Hi
    I have this castle it has 450k tri's and 357k verts in blender but when i import to unity the tri's stay the same but the verts are suddenly 4 mil!!!How is that possible?
     
  2. daxiongmao

    daxiongmao

    Joined:
    Feb 2, 2016
    Posts:
    412
    blender may be telling you the actual number of vertex (positions)which could be shared by tris.
    but in unity a vertex is a unique combination of position, uv, normal, uv2 etc. but i think worst case you should have tris x 3 verts. thats a unique vertex for every triangle point.
     
  3. tawdry

    tawdry

    Joined:
    Sep 3, 2014
    Posts:
    1,357
    I havent properly uv mapped it will that have any positive effect or is it a non factor?
     
  4. daxiongmao

    daxiongmao

    Joined:
    Feb 2, 2016
    Posts:
    412
    i am not sure how it could show more than 3 x tris( shown in unity). but yes uv can afect the number. if your tris uv mapping is continous or not. for example two tris share an edge and those two verts use the same position and uv. then in unity it should count as 2 verts. but if they have same position but different uv. it would count as 4 verts.
     
    Schneider21 likes this.
  5. tawdry

    tawdry

    Joined:
    Sep 3, 2014
    Posts:
    1,357
    ok thx i will check again after i have done the uv mapping
     
  6. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,352
    Where are you seeing that vertex count? Is that the number you see in the inspector when you have the mesh asset selected, or in the game view? I have no idea how it could be 4m verts with 450k tris in the inspector, like @daxiongmao said the worst case should be 3x the tri count, or 1.35m verts. And yes, proper UV mapping can definitely be a factor, though smoothing groups are more likely the issue since by default I believe Blender models are faceted which is going to be the guaranteed worst case for vertex counts by itself.
     
  7. tawdry

    tawdry

    Joined:
    Sep 3, 2014
    Posts:
    1,357
    vert count is when i press play and have the statistics window open.
    It was the uv mapping just did a quick fix and verts are now down to 740k so hopefully can optimise it further with more hands on uv mapping.Never thought uv mapping had a effect on vert count live and learn.Thx
     
  8. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,352
    That vertex count is how many vertices are being rendered in total from all passes. For your default scene that'll be the camera depth texture, the 4 shadow cascades, and the main forward pass, which 6x the vertex count right there, not including the several thousand from the sky box. Adding a shadow casting point light can increase that by as much an additional 7x more.
     
  9. tawdry

    tawdry

    Joined:
    Sep 3, 2014
    Posts:
    1,357
    Always have shadow off as i said was the uv mapping but sorted now.ty