Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

MeshCollider from >65k verts

Discussion in 'Physics Previews' started by TLRMatthew, May 21, 2019.

  1. TLRMatthew

    TLRMatthew

    Joined:
    Apr 10, 2019
    Posts:
    65
    It seems to me like calling
    MeshCollider.Create()
    with a very large number of verts (most likely >65k since that's where the UInt32 indexing would kick in) never resolves - is this a known issue/limitation of the current Physics preview?

    EDIT: I take it back, looks it works (reasonably quickly) on 120k verts, but chokes (or takes an inordinate amount of time) at ~390k.

    EDIT AGAIN:
    Further investigation has led me to believe this might actually be due to the mesh having orphaned triangles. Gonna experiment further and see if I can isolate the issue.
     
    Last edited: May 21, 2019
  2. alia_0

    alia_0

    Joined:
    Nov 28, 2012
    Posts:
    17
    Did you figure this one out? I was getting super slow results from this function on very small meshes. For 1961 triangles in triangle soup.

    Weld @ 65ms, DominantGeo @ 20ms, BVH @ 32ms and some 18ms for the rest of the function
     
  3. TLRMatthew

    TLRMatthew

    Joined:
    Apr 10, 2019
    Posts:
    65
    I believe the answer is simply "this isn't optimised yet" unfortunately