Search Unity

Trying to clone a mesh with more than 65k vertices

Discussion in 'General Graphics' started by ddnguyen_278, Feb 8, 2019.

  1. ddnguyen_278

    ddnguyen_278

    Joined:
    Sep 25, 2012
    Posts:
    7
    In the past Unity would split the meshes and you would just get all the mesh filters and clone each individually. Now they return just 1 mesh with > 65k vertices, which makes it simpler but when I actually clone the object it comes out all corrupted now. Is there something I have to do to set the mesh to support > 65 vertices correctly? Or do I have to manually split the mesh now?

    Thanks!
     
  2. kdgalla

    kdgalla

    Joined:
    Mar 15, 2013
    Posts:
    4,635
    Just a guess, but maybe the mesh you are creating has a different index format than the mesh that you are copying from.

    https://docs.unity3d.com/ScriptReference/Mesh-indexFormat.html

    Mesh index is a new feature, I think. I wouldn't be surprised if your big mesh had the bigger index format, and if you create a new mesh, I would it probably defaults to the old, smaller index format. When you clone the mesh, maybe first you have to copy the indexFormat from the other mesh to your new mesh.
     
  3. ddnguyen_278

    ddnguyen_278

    Joined:
    Sep 25, 2012
    Posts:
    7
    Thanks I'll give that a read through and report back, for people who might be trying to do same in future.
     
  4. ddnguyen_278

    ddnguyen_278

    Joined:
    Sep 25, 2012
    Posts:
    7
    Late response but it was indeed the mesh index format! Thanks again!