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.

Having trouble with OBJ sequence and baked animations

Discussion in 'Animation' started by mr_pablo, Nov 18, 2014.

  1. mr_pablo

    mr_pablo

    Joined:
    Jun 26, 2014
    Posts:
    12
    I have a sequence of OBJ files that I am importing into 3DSM. They are loaded in so that OBJ_0 equals frame 0, OBJ_01 is frame 1 etc.

    Clicking through the timeline shows the animation of the object.

    I have exported this as an FBX, with baked animations selected.

    But when I import this FBX into Unity, there is no animation, and the object is simply stuck on a single frame.

    What are the criteria for (baked) animations in order for Unity to correctly import and show the animation?
     
  2. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    Pablo I don't know if I understand your problem accurately but I'll try.
    It'd be awesome if you could supply an animation preview from Max - Tools - Preview - Create Preview Animation.

    It sounds to me like you have separate mesh/model objects on each frame. This works in Max if they are hidden and unhidden each frame in Max because Max doesn't care if you have different objects appearing and disappearing each frame to simulate animation. But if the objects don't have position/rotation/scale keyframes on the timeline they really aren't animating, you are just changing from one inanimate object to the next on subsequent keyframes.

    Does the obj_0, obj_01 have animation keyframes?
    If you are essentially just swapping inanimate objects each frame that isn't what Unity needs for animation. Unity needs actual animation keyframes, (transform/rotate/scale) of the object or you can animate the object in Unity itself.

    To answer your question more specifically my general/basic rule for baked animation is this; Objects that have a deforming mesh but are not controlled by bones should be baked in the export process.
    If your just moving/rotating an object that doesn't have organic mesh deformation (rigid) you could just animate it inside Unity.
    If you have an organic object that has a deforming mesh but isn't controlled by bones, that object should be exported with baked animation selected.
    If you have an object that is rigid or deformable controlled by bones, export as normal without bake selected.

    Hope that helps a little. Post your solution when you figure it out.
     
  3. mr_pablo

    mr_pablo

    Joined:
    Jun 26, 2014
    Posts:
    12
    That sounds about right. The OBJ's are separate, non-animated meshes.

    I am using a script I found to load the OBJs.

    I have a feeling it is doing what you said, and simply hiding them in sequence (I am trying to look through the script code to figure out what its doing but I'm not clued up on Max Scripting)

    Is there an easy way I can assign each mesh to a keyframe?

    EDIT - I just tried loading a few OBJs, keyframing them so they are visible/invisible in order, but that didn't make any difference. I really need to figure out how to get these OBJs animated in Unity!
     
    Last edited: Nov 18, 2014
  4. SoorajSharma

    SoorajSharma

    Joined:
    Aug 20, 2018
    Posts:
    1
    Hey! Did you ever find the solution that you were looking for? if so. Please share. i have the same question!