Search Unity

3 mil vert model being split up into 70,000+ parts, need to keep small as possible

Discussion in 'General Graphics' started by waddellt15, Jun 20, 2018.

  1. waddellt15

    waddellt15

    Joined:
    Jun 14, 2017
    Posts:
    7
    So I have a decently complex model, about 3 million verts. But everytime i import it as an asset it splits it into 70,000+ different groups. and this it what destroys my graphics. I need to get it to less than 500. I'm exporting it from modo if that helps in anyway. maybe im exporting wrong?
     
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,348
    There are a number of potential causes, but:

    By default Unity uses a 16 bit index buffer which limits each mesh to 65535 vertices. For a 3 million vertex mesh that’ll result in at least some 46k meshes. With 2017.3 and newer there’s an Index Format option you can change to 32 bit to increase the count to 2 billion vertices per mesh. Changing that alone may solve your issue.

    Note that the resulting mesh may still be broken up quite a bit! And the in Unity vertex count is likely to be much higher than what you see in Modo. Meshes for real time graphics can only have one “set” of data per vertex. That means anywhere there’s a material change, or UV seam, or hard edge, this necessitates duplicating vertex. If you’re using baked lighting and Unity’s automatic lightmap UV generation this may add additional UV seams as well beyond what the original model included, and may break the mesh up to accommodate multiple light maps. Different material indices will also break up the mesh, though this won’t necessarily show as being separate objects.
     
    theANMATOR2b likes this.
  3. waddellt15

    waddellt15

    Joined:
    Jun 14, 2017
    Posts:
    7
    Will try that! The biggest thing i notice as that the smaller meshes that its being broken up into are maybe 10-20 polys each. And I cant figure out why or whats doing this. Whether its apart of the model itself or not
     
  4. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,348
    If the model is multiple primatives in Modo it'll be multiple meshes in Unity.
     
  5. waddellt15

    waddellt15

    Joined:
    Jun 14, 2017
    Posts:
    7
    I'm fairly new with modo, do you know how to do this or point me into the right way?
     
  6. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,348
    I've never used Modo, so not really, no. It's just fairly common for modelling tools to have some way of keeping models in multiple "joined" parts which Unity will treat as separate objects.
     
  7. waddellt15

    waddellt15

    Joined:
    Jun 14, 2017
    Posts:
    7
    Gotcha thanks anyways! I mean are there any other programs would be really good at bringing about 12 mil verts down to 2?
     
  8. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,348
    I don't have any particular recommendations, no. Meshlab maybe?
    http://www.meshlab.net/

    Simplygon works really well, but has always been either way too expensive, or now just kind of confusing as to how to actually use it even though it's "free".

    I know 3DCoat is also popular for this, but I believe it looses a lot of things like material assignments and potentially surface normals.