Search Unity

Blender Animation Import

Discussion in 'Animation' started by Kaiwhitehat, Mar 14, 2019 at 1:21 PM.

  1. Kaiwhitehat

    Kaiwhitehat

    Joined:
    Mar 5, 2019
    Posts:
    6
    Hello everyone!

    I recently started using Unity so I am relaively new to that. I want to make an AR APP where I can see several machines that are doing some movements (e.g. building parts or whatever) and showing some info when touching on the screen.

    I had my first big problem when I realized that Unity cannot import CAD-files that are used in mechanical engineering. I spent several days to find a workaround, since nothing seemed to work. The .fbx files had not the colours with it and sometimes specific parts of the machines are anywhere. .3ds didn't have the animation at all.

    Luckily it happened that when I opened a .blend file of my first machine (Lets call it "Machine A"). Everything worked. It had the colours and animation as "Default Take" and I could start working on interface and touch input and stuff. Yesterday I wanted to add a second machine ("Machine B") the same way but this time the .blend file does not include the animation when I import it to unity. Interestingly though when I export Machine B form blender as .fbx the animations are there.

    I would like to keep working with the .blend files. I spent a lot of time doing research to find out why this approach worked the first time but not the second time. I am unable to ifnd out what I did different with machine B.

    Any adidvice or idea what the cause of this problem could be?

    Thanks in advance!
     
  2. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    3,687
    Unity doesn't have native support for .blend files. Instead, it uses the blender install on the local computer to convert to .fbx, and store that .fbx file in the Library folder.

    This means that each machine using Unity needs to have the same Blender version, with the same relevant user settings (eg. "auto run python scripts" must be turned on on all of the installs for it to work).

    Last I checked, Unity also used a very old, pretty bad way of exporting from Blender to FBX, so the files becomes much larger and slower than they need to.

    So you can use .blend files - we've shipped a game doing that - but I really recommend exporting to .fbx.
     
  3. Kaiwhitehat

    Kaiwhitehat

    Joined:
    Mar 5, 2019
    Posts:
    6
    The Problem I have with -fbx files is that the texture are not getting exported with the machine. That is why I was pretty relieved when I found out that the .blend file from Machine A had everything I wanted: colours and animation. I just wonder why it did not work the second time. I just don't know what I did different.