Search Unity

How to Use: Multiple Alembic Animations on Single Mesh?

Discussion in 'Asset Importing & Exporting' started by Hainfulsparrow, Feb 15, 2019.

  1. Hainfulsparrow

    Hainfulsparrow

    Joined:
    Nov 24, 2017
    Posts:
    8
    Hi Everyone,

    I recently imported an alembic mesh from Blender into Unity and have multiple animations that I would like to use on the same mesh (since its vertex count is the same throughout and nothing really changes). I would like to do this without having to import another mesh for each separate animation.

    I created an alembic track in the timeline and then an alembic shot. There should be some way to add shots with the different animation data to the same mesh?

    Is there perhaps a way to use multiple alembic animations on the same mesh? I cannot find an answer to this anywhere.

    Please help.
     
  2. MBolufer

    MBolufer

    Joined:
    Oct 28, 2014
    Posts:
    11
    Hi there,
    Same problem. I'm looking for the exact same answer. @Hainfulsparrow, you where quicker than me for creating this entry today .
     
  3. vladala

    vladala

    Unity Technologies

    Joined:
    Mar 3, 2017
    Posts:
    189
    Hey,

    I am not certain I understand what you mean.
    Would you be able to share the alembic file/project and give me the repro steps ideally or show me a Video of the issue you are encountering.
     
  4. Hainfulsparrow

    Hainfulsparrow

    Joined:
    Nov 24, 2017
    Posts:
    8
    Great minds think alike and all that. :D
    I have a workaround, but it is not a very effective workflow.
     
  5. MBolufer

    MBolufer

    Joined:
    Oct 28, 2014
    Posts:
    11
    Hi,

    thanks for your awnser.

    In my case, the idea is to be able to work like in a standard skeletal workflow using the "Animation track" in Timeline :
    - One basic mesh for the referenced character
    - One animation for each shot, all in a track, wich would be something like (working with Alembic) only using the animated vertices data extracted (in clips) and applied to my referenced character.

    For now I have to use one full character for each shot in an Alembic Track and Activate/Desactivate each "character shot", wich just makes me cry.
     
    Hainfulsparrow likes this.
  6. Hainfulsparrow

    Hainfulsparrow

    Joined:
    Nov 24, 2017
    Posts:
    8

    You explained it a lot better than I could.

    I have the exact same problem.
     
    MBolufer likes this.
  7. Hainfulsparrow

    Hainfulsparrow

    Joined:
    Nov 24, 2017
    Posts:
    8
    Hi Vladala,

    I have at least 5 separate animation sequences that I have imported into Unity as alembic files. However, all animations are used by the same character mesh, but because of the alembic, there are 5 separate characters possessing the animation data.


    I wanted to know if there is a way to only use one character and then assign the other animations to that same character, without the need of 5 separate meshes. So basically I have the one character in the timeline with the assigned animation as an alembic shot. I would like to add more shots with the other animations to the same mesh without having to create 5 separate alembic tracks for each animation.

    Capture_01_LI.jpg

    When I try to assign the different animations to the same mesh, then the character simply does not move. It only seems to work with the exported animation in the original alembic file.

    Capture_02_LI.jpg Capture_03_LI.jpg

    If that makes sense?
     
  8. vladala

    vladala

    Unity Technologies

    Joined:
    Mar 3, 2017
    Posts:
    189
    If I understand correctly an Alembic is a "vertex soup". There is no animation to speak of. It simply is a lookup table that at a particular frame, there a set of vertices with a 3d position.
    The imported model in unity is streamed from the original alembic. it never becomes a "native" object. The same hold for Maya.
    If you know that the vertex count is the same, and the vertices undergo a Rigid Transform, you'd have to compute your own animation clip.
    Hope I solved your problem.
     
  9. Hainfulsparrow

    Hainfulsparrow

    Joined:
    Nov 24, 2017
    Posts:
    8
    I think I understand you, but does that basically mean that my question is a no go?
    It wouldn't be possible to have it display these other computed vertices transforms on the same alembic mesh?
     
  10. vladala

    vladala

    Unity Technologies

    Joined:
    Mar 3, 2017
    Posts:
    189
    I think it is a no go for Alembic to support this natively. It is not the core problem alembic is solving. If you wish to have animation clips with static meshes, FBX is probably a better choice for format.
    You could write some code to compute the vertex transformation (if you know meshes moved only with Scale/Rotate/Translate) you need only 5 vertices. Then take copy a mesh over from alembic and apply your clip. Not sure if it's worth the hassle...
     
  11. Hainfulsparrow

    Hainfulsparrow

    Joined:
    Nov 24, 2017
    Posts:
    8
    I am not that advanced just yet. :(

    Could you maybe explain a little more? Or perhaps refer me to a tutorial or documentation?
    So far, I have worked with both FBX and OBJ files and the reason for my choice of Alembic was to preserve some of the more heavier simulations of my 3D objects.

    But if there is a way to do this with FBX I would be happy to try it out? Could come in handy knowing these things in the future.

    Thank you so much for your help. :D
     
  12. MBolufer

    MBolufer

    Joined:
    Oct 28, 2014
    Posts:
    11
    Hi,
    Maybe there is a way to have one character occurence (we call it Bob...) in the scene binded in a timeline track and timelines clips that "read/stream" Alembic data (for each shot) directly on Bob ? Bob has the same vertex structure than other shots right ? Does it make sense to think like that ? How did Baymax or Adam team dealed with that problem ?
     
  13. Hainfulsparrow

    Hainfulsparrow

    Joined:
    Nov 24, 2017
    Posts:
    8
    I thought so too, but when I tested it out, the mesh would simply stay static and not perform any animation other than its own. :(
     
  14. MBolufer

    MBolufer

    Joined:
    Oct 28, 2014
    Posts:
    11
    :(
     
  15. vladala

    vladala

    Unity Technologies

    Joined:
    Mar 3, 2017
    Posts:
    189
    Hey,

    Unfortunately I do not have enough alembic production experience to answer this. If I am not mistaking the Adam project is freely available so you could take a look at it.
     
    Hainfulsparrow likes this.
  16. Hainfulsparrow

    Hainfulsparrow

    Joined:
    Nov 24, 2017
    Posts:
    8
    That's alright, thank you so much for your help. I will go have a look at the Adam Models

    :D
     
  17. unity_771D202EDB79B06CB710

    unity_771D202EDB79B06CB710

    Joined:
    Oct 16, 2022
    Posts:
    2
    Hello ... its an Old trick ... but maybe u can use it ... put your same Char in On Spot ... and give the game obejct an Animation ... (enable and disable) Mesh renderer based on timing
     
    Prodical likes this.