Search Unity

Invalid AABB errors

Discussion in 'Scripting' started by Nanako, Jul 29, 2015.

  1. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,338
    I'm messing around with automatic imports of Humanoid animations. I've got a model that's got errors on import, but if I try to play animations on it, I get 248 AABB error messages per frame:

    errors.png

    @karl_jones, is this something you think could be fixed? I don't expect the model to work (I'm pretty sure I messed up somehow), but I expect a bit better errors. Maybe something that tells me what's broken - I don't know if it's a skinned mesh renderer or animation data or bones or what.

    I've got a minimal bug repro, #1002729
     
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,300
    Sure report the bug and we can see if it's possible to improve the error. AABB errors can be caused by all sorts of things so if we can make it better then it's certainly worth it.
     
  3. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,338
    :)
     
    karl_jones likes this.
  4. meat5000

    meat5000

    Joined:
    Mar 5, 2013
    Posts:
    118
    Can I see the model Baste? And, hello! Long time, dude.
     
    Last edited: Feb 21, 2018
  5. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,338
    I figured out exactly what the deal was - my model import script set the rotation of the root node to (0, 0, 0, 0). I'll see if I can dig it up from the importer branch.

    Also, hi! I stopped going to Unity Answers a while back - it's just too annoying to deal with the software. I see you're still the champion of that space :p
     
    meat5000 likes this.
  6. meat5000

    meat5000

    Joined:
    Mar 5, 2013
    Posts:
    118
    I do try ;) but I'd say that title goes to Bunny83.

    Is this a script you wrote yourself? If its a genericy one you may have solved a lot of peoples AABB errors.
     
  7. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,338
    Nah, this script is my desperate attempt to have models automatically import as Humanoids. Starting to think it's simply not viable.

    The reason I brought up the AABB errors was that it was really hard to figure out what I was doing wrong since the errors were so bad. The correct behaviour here should've been the fbx importer blowing up because one of my rotations was invalid (the Quaternion 0, 0, 0, 0 is not valid), rather than AABB errors down the line.

    All of the AABB issues are pretty much the same thing - Unity's renderers sanity checks are on derived values in work loops rather than early on in the data. So instead of having asserts for "is this mesh valid", invalid meshes gets handled, divisions with 0 happen, infinity/NaN values are passed on, and then somewhere deep down in the rendering loop asserts for bad values trigger.

    Not that it's easy to check that an input mesh has valid data! To fix this, Unity just needs enough examples on things that trigger these errors, and an internal commitment to actually pushing the error to the correct place.
     
  8. St4Rn3Rd012

    St4Rn3Rd012

    Joined:
    Jan 13, 2018
    Posts:
    4
    I also received the MinMaxAABB error when I had the Radius Thickness of the Shape of a ParticleSystem set to 0.
     
  9. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    We try to aggressive move our objects were the VR controllers are (For low latency). This could cause this error if the object got stuck in a collider. We fixed it by doing a overlap check and lower the force applied so the item had less chance of getting stuck
     
  10. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,300
    Could you file a bug report, please?
     
  11. St4Rn3Rd012

    St4Rn3Rd012

    Joined:
    Jan 13, 2018
    Posts:
    4
    yes
     
    karl_jones likes this.
  12. NerforNuttin

    NerforNuttin

    Joined:
    Jul 4, 2019
    Posts:
    1
    This is a huge, huge, necropost, but I thought I'd mention a fix for my version of the issue:

    I've been trying to edit a humanoid model in Blender, then port it to Unity for use in VRChat. While I don't know if this is true for every case, I unchecked Import BlendShapes on the main import of the model in Unity, and it appeared instantly.
     
  13. Richard_Roth

    Richard_Roth

    Joined:
    Dec 29, 2014
    Posts:
    64
    I get this error in orthographic camera mode, but not in perspective.
     
  14. nicmarxp

    nicmarxp

    Joined:
    Dec 3, 2017
    Posts:
    406
    Just if someone still has a problem with this, what I did to debug this was to delete each canvas at a time, until the error went away. In my case it was a subcanvas with sort order 1. I probably don't need as many canvases as I have, so if you can remove as many as you can, and merge them into one, it might help. :)
     
  15. stefanplc

    stefanplc

    Joined:
    Feb 21, 2015
    Posts:
    82
    I had this issue from importing an FBX. I was using scale 0 on some objects to hide them during animations and that's what was causing it. I now simply enable / disable objects through code via Animation Events and that fixed everything for me.
     
  16. Drakenfrost

    Drakenfrost

    Joined:
    Jan 29, 2021
    Posts:
    2
    I got the bombardment of errors when I was using a saved layout. I reset the layout to default and the errors never returned even when reconstructing the layout from scratch. The errors do however return when I go back to my originally saved layout even though it's identical to the reconstructed one.
     
  17. pradotech

    pradotech

    Joined:
    Oct 17, 2019
    Posts:
    35
    It was happening to me when I switched Time Scale between 0.0f and 1.0f to pause and unpause the game. I think it's solved after changing my character Animator "update mode" from "Normal" to "Animate Physics".
     
  18. Graemeaj

    Graemeaj

    Joined:
    Nov 22, 2021
    Posts:
    4
    For me this ended up being my aspect ratio fitter being fed a 0, I did an explicit check before I set the aspect ratio and that fixed it.
     
  19. oAzuehT

    oAzuehT

    Joined:
    Feb 14, 2020
    Posts:
    9
    Not related to UI, but I thought it was valid to share.
    When working with terrains, the errors "invalid AABB and IsFinite()" will spam the console if you set a different basemap values to active terrains.
    My 100% fix was setting the SAME basemap value for all active terrains through a script at runtime.

    LOD's don't like different basemap values, this could also be happening because of LOD's in terrain Tree and Grass objects, removing the 'LOD Group' component should also fix the problem if you need different basemap values for some reason.