Search Issue Tracker

Won't Fix

Votes

0

Found in

2019.3.0a9

2019.3.0f1

2020.1

Issue ID

1209911

Regression

Yes

Build throws "One of the triangles is too large" when an object with "Mesh Collider" and "Generate Colliders" enabled is present

Physics

-

How to reproduce:
1. Open attached project "physics triangle edge too long.zip"
2. In Inspector window, observe the "golemplains terrain" children have "Mesh Collider" component
3. In Project window, observe the "golemplains terrain" "Generate Colliders" is enabled
4. Build and Run
5. Observe the Console window

Expected result: error containing additional information, for example, which scene contains the object, how large the triangles should be
Actual result: error specifies which object is causing the error

Reproducible with: 2019.3.0a9, 2019.3.0f5, 2020.1.0a18
Not reproducible with: 2017.4.36f1, 2018.4.15f1, 2019.2.18f1, 2019.3.0a1, 2019.3.0a8

  1. Resolution Note:

    In the current version of PhysX, a large triangle is one that has at least one of the edges longer than 500 * mesh_scale. This check will depend on PhysX version, and the API doesn't communicate back the details, only the error message and the status. Priorly, in the older versions there wasn't be even a message, just the failed status so it's an improvement compared to how it worked before actually.

Comments (13)

  1. fredholmsimon

    May 28, 2024 09:51

    I had an probuilder mesh with the length 90000, which caused the issue.

    You can use this to find huge pro-builder meshes:

    [MenuItem("company_name/Find Big Meshes", false, 100)]
    public static void FindLargeProBuilderMeshes()
    {
    ProBuilderMesh[] meshFilters = FindObjectsOfType<ProBuilderMesh>();
    foreach (ProBuilderMesh meshFilter in meshFilters)
    {
    MeshFilter filter = meshFilter.GetComponent<MeshFilter>();
    Mesh mesh = filter.sharedMesh;

    if (mesh != null)
    {
    Bounds bounds = meshFilter.GetComponent<MeshRenderer>().bounds;
    if (bounds.size.magnitude > MinSize)
    {
    Debug.Log($"<color=red>BIG!</color> Found very large Renderer with mesh name on GameObject '{mesh.name}': magnitude: {bounds.size.magnitude} ({filter.gameObject.name})");
    }
    }
    }
    }

  2. Marcos-Elias

    Sep 16, 2022 03:04

    Still no fix or workaround without having to manually edit all meshes?!
    It sucks. Trying to upgrade projects from 2018 to 2020.x... What a pain...

  3. radiantboy

    Sep 17, 2021 09:38

    This stops a build for me in 2021.1.16f1, so why wont you fix? Its a shower stopper and it didnt used to stop a build being made. It NEEDs a fix.

  4. dariony

    Feb 09, 2021 19:33

    still happens in 2019.4.19f1

  5. radiantboy

    Feb 01, 2021 15:24

    Im getting this now, a build does work on unity 2019.4 lts, but materials disappear, I think its related but not sure.

  6. rtknapp28

    Dec 07, 2020 03:21

    I just ran into this same error. The fix for me was to build out to a new folder rather than overwriting the previous build files.

  7. darkAbacus247

    Aug 14, 2020 21:53

    Did anyone find a resolve to this? I'm also getting this error...

    Failed to create Physics Mesh from source mesh "default". One of the triangles is too large. It's recommended to tesselate the large triangles.
    UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

  8. vrzone-io

    Jun 24, 2020 23:03

    PLEASE RE-OPEN THIS TICKET or at least provide a valid solution. Failing building my app on 2019.3 because of some mesh downloaded on sketchfab

  9. jgrimm42

    Jun 12, 2020 02:00

    I'm running into this issue. What is unity defining as mesh_scale?

  10. Marcos-Elias

    Mar 26, 2020 21:43

    Sorry, 2019.3 *

Add comment

Log in to post comment