Failed to create Physics Mesh from source mesh.

After upgrading my project from 2023.2.x to 6000 beta a lot of models are now unable to generate mesh colliders. The console are flooded with errors:

UnityEditor.EditorApplication:Internal_RestoreLastOpenedScenes ()```
![9740620--1393474--upload_2024-3-31_11-1-13.png|1085x290](upload://m5DaTLQni6ChyQbpubOmb434ZuN.png)

I’ve seen this too (One of the triangles is too large). Seems a strange limitation.

Just ran into this bug in 6000 as well. Wasn’t a problem in the previous version.

This bug is spammed for every inappropriate prefab that spawns in the game, even though the colliders are fine. There was no need for this. I think everyone knows that using mesh with high vertex counts is physics heavy, but what should those who have to use it do?

Is there a fix for this? I have never seen this error before, but it just came up when switching to Unity 6 (6.000.0.0f1).

1 Like

I got fixed that issue by importing fbx models to Blender and then exporting it back to Unity overwriting an original model.
I think it is something do to with FBX files exported from 3ds Max.

Rather annoying that this occurs a lot (in 6000.0.0 betas and up to 6000.0.0.f1).In the editor game preview mode the colliders for the terrain mesh are missing, so avatars fall through. Hope it can be fixed soon, or an automatic “fix” capability added.

Just to support @Scarabay , that fix does work (opening them in Blender and re-saving them). It’s frustrating for me because these were purchased assets from the Asset Store. But at least its working now.

Alas, that solution doesn’t work for me, at least with obj files.

Having the same issue. 2023.2 to 6000.0.3f1. Very strange and annoying. Was never an issue for many years and nothing changed in the source content.

…

[C:\build\output\unity\unity\Modules\Physics\CollisionMeshCooking.cpp line 3134664]
Failed to create Physics Mesh from source mesh. One of the triangles is too large. It’s recommended to tesselate the large triangles. Source mesh name:

I worked out that “Physics Mesh” really means “collider”. Would be nice if the error message was improved. It has little to do with the size of each triangle or face in the model, rather the size of the triangle in the (mesh) collider.

If there is a large (flat) area that is >500m on one side, this will happen. My solution was to replace the mesh collider with a box collider - and not modify the actual model. Changing the number of faces on the plane (quad) in the model made no difference.

I was running into this problem and the problem was definitely on my side, not a Unity bug. Here’s how I fixed it:

I converted my project from Unreal originally, and some models were imported with the wrong scale unit. So 100cm instead of being 1 meter, was being imported as 100m. Then my prefab had the scale set to 0.01 to compensate. So even though the model had the correct scale ingame, the actual model scale was insanely huge.

So I changed the import settings to the right scale, set my prefab/model placement’s scale to 1 1 1 and the error is gone:

This is probably why importing to Blender and re-exporting worked for a previous user.

TLDR: Make sure your model’s scale ingame is actually 1 (or close), and not something like 0.01 :slight_smile:

Hope this helps!

This is helpful to know, it is definitely something to with scale.

But in my case I generate an asteroid field by dramatically changing the scale of each asteroid. So naturally this solution doesn’t hit the spot for me…

Is there any workaround for this issue ? This happen every time on the our project even though the mesh triangles not that much like that.

A better way to fix this was to actually set the units on the FBX Exporter to centimeters, so 1 unit in Maya becomes 100 cm in Unity. Then I set the model import scale factor to 1, and it’s cleaner this way, since nothing gets scaled.

@CoderPro this error happens because your mesh is too big. Check out the solution I posted above. It might be that your model is actually huge, but scaled down to 0.01.

After looking into this closer, this is happening for me on a dynamically generated mesh. The size of a triangle, not the triangle count, seems to be the issue.

I have preference visually for triangles with large area in this particular circumstance.

A thought was to use the simple mesh for mesh rendering and a tessellated mesh for the collider. I have experimented tessellating triangles in the C# script that creates the mesh. As you can imagine that gets pretty involved and I have been unable to create satisfactory results that completely eliminate the error message.

But then I wondered, why on earth is it preferable for a mesh collider to have a large triangle tessellated to a smaller one. I couldn’t think of a good reason why.

I’m curious what changed that requires the physics engine to care about the triangle sizes.

This seems to have been reverted in 6000.0.7 and converted to a warning? From the release notes:

2 Likes

If you’re facing the “Failed to create Physics Mesh from source mesh. One of the triangles is too large.” error because your models have a scale factor different from 1 (in my case, 720), and manually adjusting the sizes in the scene would be too time-consuming, I wrote a script to automate the process. This script saves you from manual resizing. Here it is: Github gist.

In my case it helped a lot.

Thank you. But it seems fine when I use Unity 2023 or bellow. Only happen when use Unity 6.

I hope this is fixes, currently Unity 6000.0.25 is not usable due to this warning.

Is there a way to just suppress it ?