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. Dismiss Notice

Inflate mesh is gone in 2019.3 and Unity hates unprepared geometry

Discussion in 'Physics' started by xVergilx, Feb 4, 2020.

  1. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,292
    upload_2020-2-4_15-7-38.png

    Soooo. WTF?
    I've saw issue regarding this, and it states as solved for 2019.3. Is it some kind of patch that isn't published yet?

    I'm using 2019.3.0f6.
    Please don't tell me that I would need to optimize mesh colliders manually from now on.
     
  2. SomeGuy22

    SomeGuy22

    Joined:
    Jun 3, 2011
    Posts:
    722
    If you're talking about this issue it seems to be that any problematic mesh (one with > 256 polys) has always had this limitation since the dawn of time. It's just that now with the latest PhysX the message is actually printed to your console instead of remaining silent. That's what I'm inferring from the resolution note. So if you have any meshes which have mesh colliders (perhaps checked in the import settings?), they have always failed to create the convex collision shape; the only difference now is that you actually see the error.

    EDIT: I should make a correction. It is not the original mesh polycount that has this limitation--it is the one generated by Unity to make the convex mesh. So your mesh can actually have more polygons so long as they don't impact the convex surface which will be created when the collider is added.
     
  3. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,292
    I'd say we've got enough annoying warnings already. It would be okay to spam them upon import, not upon every play scene loading.

    Hmmm, I wonder if they also spam in the build. That would be nasty.

    I wonder what inflating algorithm was replaced with. If it works the same - I don't see why it should even mention this at each scene load.
     
  4. SomeGuy22

    SomeGuy22

    Joined:
    Jun 3, 2011
    Posts:
    722
    Just quirk of the latest PhysX I guess. I'd actually prefer to know about an issue like this if it existed in my project, but you're right that it probably should only warn on import instead of each scene load.

    Really the best thing you should do is to remove any unneeded Mesh Colliders which exist on your models and only add them in your scene instead of at import. That should at least get rid of the warnings. If you have a Mesh Collider on a shape you believe should be <256 polys then that would be a bigger problem.

    Don't quote me on this but it appears as though convex inflation has been gone since at least 2019.2 and probably 2019.1 as well if you look at the API, so this isn't new to 2019.3.
     
  5. chantey

    chantey

    Joined:
    Mar 5, 2017
    Posts:
    49
    From the docs:

    Inflate Convex Mesh deprecated in 2018.3 because the new convex hull computation algorithm (Quickhull) is more tolerant towards imperfections in the input mesh.