Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Improving workflow by reducing the amount of model/animation imports performed

Discussion in 'Animation' started by ArachnidAnimal, Sep 19, 2017.

  1. ArachnidAnimal

    ArachnidAnimal

    Joined:
    Mar 3, 2015
    Posts:
    1,766
    The most frustrating things I've come across with importing files with animations is the amount of times the model needs to be re-imported into Unity. Right now it takes about 5 minutes to import the model. (Not really Unity's fault; it's the time it takes Blender to generate the .FBX)

    For example: I've imported a model with animations. Now I go to the Animation tab and add an animation event. Why does the entire model then need to be re-imported again? The model was already imported.
    This change has nothing to do with native model, so why the re-import?

    Maybe the meta file changed due to the animation event, therefore Unity re-imports the model.
    Still, it seems this could be improved to avoid having to re-import the model when it is not required.
     
  2. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,294
    We did some experiments at one point, and it seems like converting the model to .fbx in Blender and then importing the .fbx to Unity doesn't improve the import times in any noticeable way. It seems like the vast majority of the reimport time is the animations - setting "import animations" to be off makes the import fast.


    The only viable workaround we've found for this is to split the model in several parts, one for each animation. This is how humanoid/mocap stuff is usually done, and that allows you to change things fast.

    Still, this is a major, major timesink. I've spent weeks looking at the model import bar, if you add all of those 5 minute waits together. If you're going to have animation events on an animation, I suggest you clone it out of the model (select the animation clip in the project view, press duplicate), and move the events around there.
     
    ArachnidAnimal likes this.
  3. ArachnidAnimal

    ArachnidAnimal

    Joined:
    Mar 3, 2015
    Posts:
    1,766
    Reading this made me re-think my entire workflow.

    -I had never manually created the .FBX. I just imported the .blend, and let Unity control the .FBX generation process.
    I tried manually creating the .FBX, and now the time is cut in half because the .FBX does not have to be regenerated over and over again.


    -I have done this before. For another model I have one file with the animations and very low detail placeholder shapes (cubes and planes). And another file with complex meshes. At Start, the placeholder shapes are replaced with the high detailed meshes. This about cuts the import times in half during development.


    -I tried this now and it is now lightning-fast to add Animation events to an existing clip. (No re-imports required).
     
    Baste likes this.