Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Mesh Cooking options and performance

Discussion in 'Physics Previews' started by Carpet_Head, May 23, 2019.

  1. Carpet_Head

    Carpet_Head

    Joined:
    Nov 27, 2014
    Posts:
    258
    Hey,

    So I was wondering if someone could help me out. We are having some issues where mesh cooking takes a considerable amount of time in our application that generates procedural meshes.

    Tuning the mesh cooking options allows us to reduce cooking time by a factor of 4 which is a huge improvement!

    The issue comes is that when you scale meshes that are cooked with non-default settings, the collider is fully regenerated instead of reusing the old data. This Unity issue suggests it is by Design.

    https://issuetracker.unity3d.com/is...en-using-non-default-mesh-collider-parameters

    I was really hoping someone could go a bit deeper to help me understand why this is? or perhaps why we cannot set the global mesh cooking flags? we have very tight control over the meshes we use for collision, so can ensure quality before we pass it over to physx.

    The cooking flags never change on the object, it is simply that any flag setting other than default causes a re-cook every time the GameObject is scaled
     
  2. AlanMattano

    AlanMattano

    Joined:
    Aug 22, 2013
    Posts:
    1,501
    I'm not an expert answer: And if you try to export as FBX, fix the problem in other 3D app and Reimport it to Unity to look if works. And if works then with some version control compare the two FBX to debug the problem and fix the original script.