Search Unity

FBX ModelImporter avatar

Discussion in 'Scripting' started by iPickle, Nov 18, 2016.

  1. iPickle

    iPickle

    Joined:
    Oct 21, 2013
    Posts:
    46
    Hi everyone!
    Its been a while since I've been here :)

    I have a quick question that I hope you can help me with, I am trying to speed up our animator's workflow by setting everything he does automatically with the importer, most of the settings are pretty easy to find.
    But when I try to set the animation type, it does not find the avatar / skeleton....
    In the editor, when you change to Humanoid, Unity scans the model and creates kind of the best skeleton it can for your model...

    Do you have an idea? how I can make sure that all fbx files that are coming into unity will be by default as a Humanoid type and will use the default avatar that unity builds?

    Thanks!
     
  2. Lethn

    Lethn

    Joined:
    May 18, 2015
    Posts:
    1,583
    Ohhh, I don't know too much about how this tool you've described works but I wouldn't rely too much on automatic generators for your assets, especially if they're humanoid. Don't get me wrong, they'll work on simple stuff most likely but there will always be problems with the way the mesh bends and so on because the computer won't know what stuff you want to bend on certain joints and what won't.

    I've actually been looking into the skeleton side of things in a lot of detail recently and you do need to just spend some time rigging models properly and then when you import your fresh skeleton Unity should detect all of that fine. I do recommend using IK skeletons from some proper modelling software, if you want some help I can point you to tutorials I've been finding as well about weight skin painting which is absolutely necessary for this kind of thing.

    Sometimes stuff like this just can't be rushed, I think that's your main problem there, you seem to be trying to cut corners where it isn't really a good idea. No offence to you, but animating and skeleton rigging is a job for artists, not programmers, there's only so much you can do in that area with code or automatic tools.

    I'm sure someone will have a more detailed knowledge of the tool that could maybe help you with this but I really don't recommend it if you want to keep the quality of your models and animation high.
     
    Last edited: Nov 18, 2016
  3. iPickle

    iPickle

    Joined:
    Oct 21, 2013
    Posts:
    46
    Thanks for the reply :)

    I agree with you mostly, but for what we do this is perfect....
    We are doing some motion capture now, so the skeleton and model are always the same, but when we import the animation files, we always have to do some settings, that are also always the same for this type of work, and I find it that we waste too much time waiting for the setting process and the re-import of files after every change
    This request came from the animators

    Sure, I would never do it for something that actually requires a "human's touch"

    My solution for now was mapping all the settings of one model and manually create them in script, each bone, each setting...
    It was time consuming but it works, but I would still like to know if there is a better way to do it

    That said, I would love to see the tutorials you mentioned, skin painting is one of the things I find hardest in rigging, so that could help me anyway :)
     
  4. Lethn

    Lethn

    Joined:
    May 18, 2015
    Posts:
    1,583


    Now I've had a think about it I'm not sure whether it would be possible or not to do what you're asking for because the thing is you're asking for the same sort of settings and animations on individual models.

    What you could potentially do is put the skeleton in as a prefab perhaps and then your animator controllers would duplicate all the settings? I don't know how well that would work though but you would at least be able to speed that sort of thing up a bit more and you would still have to attach everything and make it work but it's something.

    I think though this sort of thing is unavoidable grunt work and unfortunately there isn't much you would be able to do unless you could get a programmer more experienced to mess with things inside the Unity editor itself and set things up for you.
     
    Last edited: Nov 19, 2016
  5. iPickle

    iPickle

    Joined:
    Oct 21, 2013
    Posts:
    46
    Thanks!
    Yea I realize it could get messy, but I got it working for now at least

    Your idea is interesting, maybe I can find the original model and reference the avatar to the imported file... I will give it a try just to see if that's possible