Must have less than 256 vertices !?

I have a Vase with more than 256 Vertices. Unity refuse to add Mesh collider to this. This Is one of unity limitation. OK, if you can’t fix this issue. Add a new Collider that can controller it size to fit at possible. Example, If i have a sport car and add to it cube collider.

It fit the size of car but still there is some empty spaces that can be reduce it. Mesh collider can not be add because it have more than 256 vertices. If i can size this cube collider it will help.

Also if i can add more vertices to cube collider and controlle it as what we do with blender “Subdivide” it will be very helpful.

Not really a beta topic at all as this is more of a request, but I’ll offer this:

Probably need a Physics dev for a more accurate response so I may be correted here, but I’m guessing the vertices limit actually comes from PhysX (I’m guessing it’s this API)

However, under development is “Physics: Automatic convex decompositions” on our roadmap. Keep watch.

While waiting for the awesome V-HACD ( convex decomposition) from Unity, you have two options.

The 256 verts per collider is not something that will disappear, indeed even using 256 vertices is probably overkill and going to reduce performance. Games will always use approximations for collisions due to this.

The simplest option is to create your own simplified mesh for the car in your modelling app and keep it under 256 verts. Its simple, but can be time consuming to create. You can then add a mesh collider to the car and assign your custom mesh in the mesh property of the component.

The second method is to go and grab the V-HACD plugin for Blender ( Khaled Mamou's Blog: V-HACD Blender Add-on (by Alain Ducharme) ), its a complex bit of software, but extremely powerful. Just be prepared to spend a day or so playing with parameters to get the most optimal fitting mesh. Worth reading the blog on that site to understand V-HACD and how to use it.

Take a simple cube shape the length, width and height minus passenger compartment top, tilt the top poly to make it slope with the aerodynamic wedge of the vehicle. Extrude inner on the top poly and then pull the corner vertices of the inner extrude to match the passenger compartment and bevel upwards. You could slice the rear end and pull the rear upper edge downwards to get the back tail shape more accurate and maybe a few other cuts and repositionings…but the mesh collider will come in at between 14 min and 30 polys max.

https://twitter.com/anthonyyakovlev/status/664776647254663168
Alex
If unity give me the ability to customize my Vase collider it may take not more than 20verts.
If can move collider verts to shape my vase it will be really helpful.
This feature have to be done in this unity version :eyes:.

Both options is good but will more time. But Unity devs should give us something more flexible. What I’m talking about is something can be control or customize it.
Is this problem was in unity 4.6 ?

I read this before.
More time, More work, More headache. :frowning:
They should make something more easy for us.

Just make a simplified mesh collider in your 3D app. You’re not required to use the same mesh for display as you use for the collider. It would take a couple of minutes at most.

–Eric

I know that. Yes it will not take much time.
What i want from unity developers to do are make a new collider that can be modify.

Not necessary for Unity to do anything in that case; you can make an editor script to modify a mesh collider. For example, Unity Asset Store - The Best Assets for Game Making It’s probably easier just to do it in the modeling app, though, since you have dedicated tools for that.

–Eric

I’d like to point out that the 256-vertices limitation is related to the convex colliders only. The limitation is not for the source mesh, which can have any number of vertices, but for the convex collider internally generated when the convex option is enabled.

You may take a mesh of 30000 vertices, add a mesh collider, enable convex, and it may work without errors. This is because PhysX was able to generate a convex hull of <256 vertices out of the original mesh.

In some cases, the complex shape of the original mesh result in the convex hull having >256 vertices. This is when the error raises.

A solution is creating a simpler collision mesh using a modelling tool. For example, Blender has a very handy workflow for this: you can select some spare vertices of your original model, then select “Convex Hull” from the search menu (space), and it will create a convex hull out of the selected vertices. It’s more likely that PhysX will be able to generate a convex hull out of <256 vertices out of the simplified collision mesh.

You should probably not choose this for a career.