Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

How do I remove the automatic transform 'conversion' with imported FBXs?

Discussion in 'Editor & General Support' started by ytisfu, Feb 11, 2019.

  1. ytisfu

    ytisfu

    Joined:
    Apr 26, 2017
    Posts:
    6
    Unity seems to automatically add values to the transform of one of my imported FBXs, including rotation and scale, within the asset's import settings even (greyed out so I can't edit it of course, that'd make too much sense). If Unity simply hadn't arbitrarily added these values, my object would look and perform perfectly. My question is if there's a way to turn off this seemingly random behavior. I want all imported FBXs to start at rotation 0 scale 1 regardless of whether Unity THINKS the file should be rotated or whatever. I hear it's a simple boolean that Unity determines if it thinks the object isn't Y-up or something.

    Please don't tell me to go into blender and rotate it there, that's ridiculous. Also using an empty to parent the object to inside Unity is also not a solution, it's just avoiding the problem. I've been exporting FBXs using a specifically designed preset that's been honed and perfected and has never had this behavior before. Many other files work perfectly and were made in the exact same way. I don't believe it's an issue with blender, and for the sake of this thread let's assume it isn't. I've tried everything inside blender already anyway.
     
  2. NorthStar79

    NorthStar79

    Joined:
    May 8, 2015
    Posts:
    57
  3. ytisfu

    ytisfu

    Joined:
    Apr 26, 2017
    Posts:
    6
    I appreciate the quick response NorthStar79, but unfortunately doing that doesn't change anything. Unity acts as though either orientation is the exact same file, and turns it -90x.

    BTW here's my tried and true fbx export settings (blender):
    [of course apply rotation and scale before exporting]

    -selected objects
    -apply scalings: 'FBX Units Scale'
    -forward -z
    -up y
    -deselect 'camera', 'lamp' and 'other'
    -experimental apply transform
    -under 'animation' deselect 'all actions'
     
    Last edited: Feb 12, 2019
  4. Vectorbox

    Vectorbox

    Joined:
    Jan 27, 2014
    Posts:
    143
    It's strange that a specific model is affected, I've created and imported many Blender models but have never experienced the problem. Could you post a link to the model in question ?
     
  5. ytisfu

    ytisfu

    Joined:
    Apr 26, 2017
    Posts:
    6
    I really don't think it's something having to do with the file itself. Hear me out:

    I created this file by duplicating an armature within the blend file, editing the bones a little and exporting it. the original armature fbx file still works great in unity, even if I re-export it, all same settings etc.

    Today, desperate, I deleted Unity's meta file for the fbx with issues, then replaced it with the meta file for the fbx that works, and renamed it to fool unity. It worked. Unity gave it a perfect transform: rotation 0 and scale 1. But of course this erased all the animations I had set up for the new FBX.

    I don't feel as though this a solution, but it further proves to me that it's a problem within Unity, not blender or the file itself.

    Here's the file if it helps.
    https://drive.google.com/open?id=1TVIxMYVuzxSz_ZO41KMmNLrZ-OestoNI
     
    Last edited: Feb 12, 2019
  6. Vectorbox

    Vectorbox

    Joined:
    Jan 27, 2014
    Posts:
    143
    Thanks for the link. The model's scale and rotation were indeed affected as you reported. It's probably worth reporting this issue.
     
  7. ytisfu

    ytisfu

    Joined:
    Apr 26, 2017
    Posts:
    6
    So you agree this is a Unity issue? I feel less crazy.

    Yeah I've spent the entire day basically formating everything in my project differently to work around this issue. Doesn't seem like a solution exists...

    You think it's bad enough to necessitate a report? What's weird to me is that I've not been able to find a single other thread on the internet addressing this issue.
     
  8. NorthStar79

    NorthStar79

    Joined:
    May 8, 2015
    Posts:
    57
    Hello.
    if changing 'forward' and 'up' values does not change anything in Unity (apparently this is the case here)

    close Unity > go to your project folder > "Library" > and delete "metadata" Folder completely (delete folder itself).

    re-open your project in Unity, it could take a while to open, stay calm.

    these steps probably solve your problem. please inform us about the outcome.
     
  9. ytisfu

    ytisfu

    Joined:
    Apr 26, 2017
    Posts:
    6
    Honestly I'm way past the point to be able to do such a test since I've already redone everything. I couldn't put my project on hold any longer for this BS. I actually think there will be some other benefits from doing things this new way so it's all good, just took a couple days to redo stuff using files that I know work. At some point though it'll be necessary to make new files and when that time comes I'll probably have to deal with this crap all over again. If I do ever figure out what happened, I'll definitely post it here.

    For now, I'm constantly backing up the .meta files that unity auto-creates for every FBX (while the FBX is still behaving properly within Unity), so that I can replace any new .meta files that Unity (for whatever reason) decides to screw up, seemingly on purpose... I'm still trying not to be super annoyed that an actual person would put this 'feature'/app-breaking bug into Unity in the 1st place, and also trying to figure out what in the world I could've possibly done to set off Unity's ridiculous 'conversion-necessary detectors'...

    I appreciate you guys trying to help though.
     
  10. NorthStar79

    NorthStar79

    Joined:
    May 8, 2015
    Posts:
    57
    just a warning. do not mess with any.meta file in "assets" folder. you should not play with them. probably this is why you get this bug in the first place. as I said before only delete metadata folder in library folder if you get similar problems in the future.
     
  11. ytisfu

    ytisfu

    Joined:
    Apr 26, 2017
    Posts:
    6
    I appreciate your concern, NorthStar, but it's definietly not why I got the bug occured in the first place since I only messed with the meta files BECAUSE of this issue. If Unity hadn't screwed up its own meta files in the first place I wouldn't have to touch them at all. Alas, as it's the only way I've found to fix this bug I can't help but keep playing with meta files.

    And correct me if I'm wrong but wouldn't deleting the metadata folder be doing effectively the same thing as deleting all the meta files?
     
  12. NorthStar79

    NorthStar79

    Joined:
    May 8, 2015
    Posts:
    57
    you are right, but by doing as I said is for just being sure that all meta files are synched. since there is no practical way to know which meta files are dependent each other, deleting any meta file from assets folder and triggering a new meta file generation process can cause Unity to freak out and do some BS all over your project files. when something like this happened and your last backup or git push was days (or even weeks) ago. there is no other way than re-doing everything while crying your eyes out.