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?
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.
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 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…
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.
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.