Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Is it possible to have one .blend file with multiple animated objects with their own animation?

Discussion in 'Formats & External Tools' started by LimeJuice, Dec 16, 2015.

  1. LimeJuice

    LimeJuice

    Joined:
    Nov 8, 2012
    Posts:
    58
    Hi,
    I have a .blend file with animated objects (no armature) but when imported in Unity only one animation show up called 'Default take'.
    Default take does contain the animations of all object at once but I would like to have each object with their own animation so I can control them independently.
    Is there a way to achieve this ?
     
  2. kburkhart84

    kburkhart84

    Joined:
    Apr 28, 2012
    Posts:
    910
    One thing I've learned with Blender and Unity at for me is that it tends to be better to keep things in separate files. This helps with organization, and also it lets you make changes and only re-import that one change. The only exception to this would be item variants, like maybe asteroids or rocks, which generally don't have animations.

    Another thing to consider, the default take animation is for the whole file. If you have armatures, you can do actual "actions" instead of having the animations fall under the default take. I'm not sure if this work for other types of animations though that aren't armature animations. As far as actually doing it, I'm not sure off the top of my head, but it involves using the action editor to create actions, etc... I understand it is also convenient in that you no longer have to separate animation frames on import because the action editor keeps separate actions(similar to default take), so you wouldn't need to say 1-10 is walk, 11-15 idle, etc...
     
  3. saneinsylum

    saneinsylum

    Joined:
    Oct 28, 2015
    Posts:
    10
    If you click on the object and look at the animation tab(i think), you can specify the start and stop frame for the default take(or other animations if imported) so if these animations are seperated in blender, and, im not sure, parented to an empty object in blender, they could all use a different frame group as their private default take. Is this any kind of helpful?
     
  4. LimeJuice

    LimeJuice

    Joined:
    Nov 8, 2012
    Posts:
    58
    Hi, thanks for the info it make things clearer.
    I am not using armature, I think that's why I can't have multiple animation in Unity.

    The animation is a rock falling in pieces but I want to control dynamically when a rock pice fall so for that I need each of the rock pieces to have their own animation.

    So I am thinking that the best way would be to have one file for one object.
    But my issue is that there is 250 objects to save in a new file so I am wondering if there is a faster process ??
     
    Last edited: Dec 17, 2015
  5. saneinsylum

    saneinsylum

    Joined:
    Oct 28, 2015
    Posts:
    10
    You "should" be able to parent all 250 to an empty object in blender and animate each rock falling individually(writing down the start and stop frames for each rock on paper or text editor) and in Unity, (this is the "should" part)set those frames as each rocks default take, and call them at different times. But this is completely speculative. Try this with 3 or 4 rocks first to see if it'll even work.
     
  6. shaderop

    shaderop

    Joined:
    Nov 24, 2010
    Posts:
    942
    It should be very to write a script in Blender that will export one FBX file for each animated rock in your scene. Importing them into Unity should be trivial then.

    I would love to be more specific, but unfortunately my Blender-Fu is a bit rusty,

    But that's what I did on a project a while back. One scene with multiple animated objects (though with armatures), and a script that exports them into individual FBX files. Works fine, and the one-FBX per object was actually more manageable than multiple blender files.
     
  7. LimeJuice

    LimeJuice

    Joined:
    Nov 8, 2012
    Posts:
    58
    My issue with using one animation with a different start frame is that when I will play a specific frame, some of the rocks will be down and some other still attach to the main rock making a strange effect. I could use a mask to solve that issue but it sound difficult to achieve. I will try to build a blender export script.
     
  8. Ziplock9000

    Ziplock9000

    Joined:
    Jan 26, 2016
    Posts:
    360
    I have the same issue. Importing Blender animations without armatures don't work. Exporting as fbx does.