Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Alembic for Unity

Discussion in 'Asset Importing & Exporting' started by ans_unity, Mar 13, 2018.

Thread Status:
Not open for further replies.
  1. miniduck

    miniduck

    Joined:
    Sep 27, 2012
    Posts:
    117
    I've only tested this under Linux, but setting scripting runtime to 4.x, then import a new (or reimport) an alembic throws
     
  2. miniduck

    miniduck

    Joined:
    Sep 27, 2012
    Posts:
    117
    Now tested Windows 2018.2.6f1 - same result
     
  3. amorinImgSpc

    amorinImgSpc

    Joined:
    Jun 11, 2018
    Posts:
    41
    Hi! We're trying to reproduce your issue on our end to no avail. Are you using the Windows Mixed Reality Package for Unity?
     
  4. amorinImgSpc

    amorinImgSpc

    Joined:
    Jun 11, 2018
    Posts:
    41
    Thank you for reporting the issue! I was able to reproduce it in the version of the package you're using and fortunately it has since been fixed for the coming 1.0.0 release. Stay tuned!
     
  5. Phatage13

    Phatage13

    Joined:
    Nov 13, 2015
    Posts:
    5
    As in UnityEngine.XR.WSA? Yes I am using that, albeit it could be an old version. I'll have to try it with a new app sometime I guess.
     
  6. radoo

    radoo

    Joined:
    Jun 18, 2014
    Posts:
    5
    Hi,

    I just tried it and it crashes 100% of the time when importing the asset. Unity version is 2017.4. The .abc file comes from Softimage/Crate and works perfectly in another Alembic capable 3D App. I could send you the file, it's just an animated cube.
    Thank you

    Edit: I ust tried it with a generic .abc file from 3ds Max with the same result...
     
    Last edited: Sep 19, 2018
  7. amorinImgSpc

    amorinImgSpc

    Joined:
    Jun 11, 2018
    Posts:
    41
    Hi! Thank you for reaching out.

    By 2017.4, do you mean the 2017.4.11f1 LTS Release? Additionally, which version of the package are you using? I just tested
    0.1.2-preview with the the 2017.4 LTS release without any crashes. Do you think you could send me one of your files so that I can try and reproduce the bug in more accurate conditions?

    Alexis
     
  8. Kaldrax

    Kaldrax

    Joined:
    Sep 14, 2017
    Posts:
    44
    This plugin is awesome! However every time I hit play mode, my alembic child gameobject ends up at world (0, 0, 0) regardless of where I place the parent game object. Is this intended behaviour?
     
  9. radoo

    radoo

    Joined:
    Jun 18, 2014
    Posts:
    5
    Hi Alexis,

    thank you for your answer. That was quick, sorry I didn't check yesterday, I thought the system would notify me.
    The Unity version is 2017.4.11f1. I am not sure how to check which package version I have, but it is the latest I found here: https://github.com/unity3d-jp/AlembicForUnity. I attach the .abc file here, as well as the log and the .dmp files.
    Thank you!
    Radoo
     

    Attached Files:

    Last edited: Sep 20, 2018
  10. amorinImgSpc

    amorinImgSpc

    Joined:
    Jun 11, 2018
    Posts:
    41
    Alright, I was able to reproduce your issue and luckily found a fix for it!

    The short of it is that you probably have a setting toggled on in your DCC's Alembic export settings that causes Unity to misinterpret the Alembic file on import and crash. What DCC are you using to author your Alembic files? With Maya, having the Frame relative sample option toggled on in the export settings causes this issue.

    Additionally, here's a guide to install the most recent package manager version, so you can stay up to date with future releases more easily!

    Keep me up to date!

    Alexis
     
    Last edited: Sep 20, 2018
  11. amorinImgSpc

    amorinImgSpc

    Joined:
    Jun 11, 2018
    Posts:
    41
    Hi!

    What version of the Alembic package (and which version of Unity) are you using? If you'd like, you can attach your defective Alembic file and I can try to reproduce your issue.

    Alexis
     
  12. radoo

    radoo

    Joined:
    Jun 18, 2014
    Posts:
    5
    Hi,

    Thank you.
    I use Crate for Softimage. I don't have anything similar to that Maya option- here is a snapshot from Crate. I will try the solution suggested and keep you posted.
    Radoo
     

    Attached Files:

  13. radoo

    radoo

    Joined:
    Jun 18, 2014
    Posts:
    5
    Hi again,

    I installed Unity 2018.1 for max compatibility etc. and the 0.1.2.-preview version. I have the same problem as before- crash on import. I was able to reproduce in Softimage the Maya bug you flagged before by setting the frame substeps to 0 in the Crate exporter (please check the attached screenshot in the previous post). In this scenario the .abc file comes without crashing in Unity, but also without animation, meaning only the first frame is exported from Softimage.
     
  14. Kaldrax

    Kaldrax

    Joined:
    Sep 14, 2017
    Posts:
    44
    Thanks for the quick reply! I'm using the latest package from Unity3d-JP on Github with Unity 2018.2.3f1. I'm also on a mac running High Sierra. It might be worth noting that the new transform position stays even after exiting Play Mode.
     
  15. amorinImgSpc

    amorinImgSpc

    Joined:
    Jun 11, 2018
    Posts:
    41
    Interesting. Is your Alembic file an mesh or a point cloud? Does it happen to all your Alembic files or just this one?

    Alexis
     
  16. amorinImgSpc

    amorinImgSpc

    Joined:
    Jun 11, 2018
    Posts:
    41
    Okay, I looked into what could be done: if you report this issue with an attached file through the Unity bug reporter and report back here with the Issue ID, it'll get escalated and one of our developers should take a look at it soon.

    Alexis
     
  17. Kaldrax

    Kaldrax

    Joined:
    Sep 14, 2017
    Posts:
    44
    It's mesh, and it seems to happen with all files.
     
  18. Kaldrax

    Kaldrax

    Joined:
    Sep 14, 2017
    Posts:
    44
    Alright it's Case 1083205
    The Bug Reporter ate my CPU for like an hour but it finally sent.
     
  19. radoo

    radoo

    Joined:
    Jun 18, 2014
    Posts:
    5
    Hi Alexis,

    I just submitted the bug report, case number is 1083318

    Thank you
     
  20. s0w4

    s0w4

    Joined:
    Aug 15, 2014
    Posts:
    3
    Hello everyone, is there any way to add iOS support here?
     
  21. vkovec

    vkovec

    Unity Developer - FBX Exporter

    Joined:
    Aug 9, 2017
    Posts:
    257
  22. zcream

    zcream

    Joined:
    Nov 11, 2018
    Posts:
    2
    Hi. I seem to remember a statement that I could export an alembic scene ? Can this be done ? I have my unity project but need to export the entire scene to Fusion for further work.
     
  23. ignacioG

    ignacioG

    Joined:
    Oct 31, 2018
    Posts:
    2
    Hello, I need to export animation with alambic to Unity with Vuforia but at the moment I import Alembicpackage I stop being able to build for Andrior. The following error appears: "UnityEditor.BuildPlayerWindow + BuildMethodException: 3 errors
    ". Any solution?
     
  24. ignacioG

    ignacioG

    Joined:
    Oct 31, 2018
    Posts:
    2
    Hello, I need to export animation with alambiqueae to Unity with Vuforia but at the moment I import Alembicpackage I stop being able to build for Andrior. The following error appears: "UnityEditor.BuildPlayerWindow + BuildMethodException: 3 errors
    ". Any solution?
     
  25. sbartstv

    sbartstv

    Joined:
    Jun 14, 2017
    Posts:
    1
    Hi, I used the Alembic importer and got a model into Unity. I am having a problem getting the texture applied, there are 100s of textures since it's an animation and I do not know where or how to add all the textures to the model. Does anyone can help?
     
  26. willanie42

    willanie42

    Joined:
    Jan 23, 2016
    Posts:
    1
    wondering about any progress on alembic IOS support ... using alembic cache is so easy in comparison with alternate methods for animated meshes
    I dont see any updates related to IOS on the github
    https://github.com/unity3d-jp/AlembicForUnity

    In the mean time does anyone have a alternate workflow with abc caches.
    Ive been searching around for for helpful hints to convert abc caches in Maya into another cache type with no luck.
    I have more than 65k vertices so mega-fiers will not work.
     
    R_lapham likes this.
  27. markvi

    markvi

    Joined:
    Oct 31, 2016
    Posts:
    118
    Alembic caches aren't a great format for mobile devices for a bunch of different reasons. We are planning a native vertex cache format suitable for mobile devices, but I don't have a timeline that I can give you. If you want to live dangerously, it is theoretically possible to build the Alembic plugin for iOS devices, but it's not a trivial task. We'd be happy to accept a pull request though.
     
    R_lapham likes this.
  28. markvi

    markvi

    Joined:
    Oct 31, 2016
    Posts:
    118
    Hello! I'm happy to announce that Alembic 1.0.0-preview.7 is now available as a package.

    Please note that this package doesn't yet work with 2019.1 due to Timeline becoming a built-in package. Because of this issue, we're not making it discoverable in Package Manager just yet, so you'll need to manually add it to the Packages/manifest.json file in your Unity project. Just add the line below in the
    "dependencies"
    section:
    "com.unity.formats.alembic" : "1.0.0-preview.7"
     
    ManjitSBedi likes this.
  29. AnonUser84727

    AnonUser84727

    Joined:
    Nov 16, 2018
    Posts:
    3
    Hey thanks! I gave this a shot and was told abci.dll was missing -- tried reimporting the project (it was basically empty to begin with anyway) and still got

    Code (CSharp):
    1. DllNotFoundException: abci
    2. UnityEngine.Formats.Alembic.Sdk.aiContext.DestroyByPath (System.String path) (at C:/Users/USER/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.formats.alembic@1.0.0-preview.7/Runtime/Scripts/Importer/AbcAPI.cs:315)
    3. UnityEngine.Formats.Alembic.Importer.AlembicStream.DisconnectStreamsWithPath (System.String path) (at C:/Users/USER/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.formats.alembic@1.0.0-preview.7/Runtime/Scripts/Importer/AlembicStream.cs:18)
    4. UnityEditor.Formats.Alembic.Importer.AlembicImporter.OnImportAsset (UnityEditor.Experimental.AssetImporters.AssetImportContext ctx) (at C:/Users/USER/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.formats.alembic@1.0.0-preview.7/Editor/Importer/AlembicImporter.cs:175)
    5. UnityEditor.Experimental.AssetImporters.ScriptedImporter.GenerateAssetData (UnityEditor.Experimental.AssetImporters.AssetImportContext ctx) (at C:/buildslave/unity/build/Editor/Mono/AssetPipeline/ScriptedImporter.cs:19)
    I just edited and re-edited this JSON file a handful of times and reimported the asset a handful of times and now it works not sure why
     
  30. markvi

    markvi

    Joined:
    Oct 31, 2016
    Posts:
    118
    Fix on the way for this one. It's a weird bug, I can't reproduce it but you're not the only one hitting it.
     
  31. markvi

    markvi

    Joined:
    Oct 31, 2016
    Posts:
    118
    Alembic 1.0.0-preview.8 has been released!

    Please note that this package doesn't yet work with 2019.1 due to Timeline becoming a built-in package. Because of this issue, we're not making it discoverable in Package Manager just yet, so you'll need to manually add it to the Packages/manifest.json file in your Unity project. Just add the line below in the "dependencies" section:
    "com.unity.formats.alembic" : "1.0.0-preview.8",


    ## [1.0.0-preview.8] - 2018-12-19
    ### Changes
    - Alembic files are No longer copied to the StreamingAssets folder
    - renamed Linux dso to abci.so for consistency
    - reordered DllImport path selection so Editor locations are always found first

    ### Known Issues
    - If you rename the prefab once instantiated, all scene references are lost (move works)
     
  32. Bentoon

    Bentoon

    Joined:
    Apr 26, 2013
    Posts:
    98
    hello All, I'm pulling in an animation from Oculus Quill, works beautifully in Unity, won't export to mobile... Any ideas?

    Thanks!
    ~be
     
  33. raydentek

    raydentek

    Joined:
    Jul 27, 2016
    Posts:
    103
    It's not supported yet on mobile platforms due to: https://github.com/unity3d-jp/AlembicForUnity/issues/65
    I'm also trying to solve this for our project, but would require me to adjust the way assets are loaded as our alembic files would be loaded from asset bundles and the plugin expects they are part of the project.

    The versions at https://github.com/unity3d-jp/AlembicForUnity have not been updated but new versions were added as packages. Seems like if we worked with the git hub repo, we would be working on older versions and missing updates made recently?

    Thanks for the work done on this package. It is really important for allowing creators from VR animation tools to bring in content to unity.
     
  34. U3D2307428397

    U3D2307428397

    Joined:
    Mar 22, 2018
    Posts:
    4
    What should I do if I want to use a "Animations Clips" for Alembic
    It's important to me
    If anyone knows,please tell me
    Thank you
     
    Last edited: Dec 29, 2018
  35. markvi

    markvi

    Joined:
    Oct 31, 2016
    Posts:
    118
    By "export to mobile", do you mean you're trying to build for a mobile Runtime platform? Unfortunately Alembic is only supported on Windows & MacOS at the moment. We have no plans to directly support Alembic on mobile. See my reply above (Reply).
     
  36. markvi

    markvi

    Joined:
    Oct 31, 2016
    Posts:
    118
    Could you explain what you're trying to do a little more? I'm not sure I understand.
     
  37. U3D2307428397

    U3D2307428397

    Joined:
    Mar 22, 2018
    Posts:
    4
    Abc file inspector not have this Animations Clips
    QQ图片20190110141421.png 2019110-142136.jpg
     
  38. prisonerjohn

    prisonerjohn

    Joined:
    Jul 31, 2013
    Posts:
    28
    Hello,

    I'm wondering if there's an easy way to get access to the mesh before it goes to the renderer. Specifically, one of the things I'm trying to do is to change the topology from triangles to points so that I can work with a point sprite shader.

    Looking through the code, I think this is set in the `AlembicMesh` objects, but it looks like getting access to these from the `AlembicStreamPlayer` is not an easy task.

    Also, somewhat related, but why are all these classes marked as `internal` and/or `sealed`? It would be great to make this pipeline more accessible so specific parts of it can be customized.

    Thanks!
     
  39. bastianLstrube

    bastianLstrube

    Joined:
    Feb 15, 2014
    Posts:
    9
    Edit: Sorry! reread release notes above. Edited my manifest.json.
    Wasn't even aware there was a third level hidden alpha prelease so couldn't see the forest for the trees.

    I do find it a little confusing with unity splitting into this many pieces. Isn't ticking the 'show preview packages' enough of a warning? why have this extra hidden level? Seems a little too fragmented.

    But thanks, my alembics are running!


    Hi!
    I have just downloaded and installed unity 2018.3.3f1 and I'm trying to figure out how to get the alembic package.
    I don't see it in the package manager. I'm looking at preview packages. Am I blind?

    Thanks!
     
    Last edited: Jan 29, 2019
  40. SKoptev

    SKoptev

    Joined:
    Jan 15, 2019
    Posts:
    37
    Is it possible to modify shader HDRP/Lit (from High Definition Rendering Pipeline) to work properly with alembic (using motion vectors)?
    "ADAM EP2/EP3 - Alembic Timeline Sample" demo uses built-in rendering pipeline; and "Film Sample Project" - uses HDRP, but without any alembic assets.
    Sure they can work together, but what kind of modification shoul I do?
    Thanks a lot!
     
    Rich_A and fherbst like this.
  41. Panogramma3d

    Panogramma3d

    Joined:
    Dec 11, 2018
    Posts:
    4
    Thanks for a great plugin. I have a quick question.

    I'm getting some odd transform issues. Once i have the alembic in Unity (its transforms have been altered. To get it to match what i see when i have the alembic imported into Maya where it is all 0,0,0 and 1,1,1 scale. I had to put the transforms to Rotation: 0,0,180, Scale: -1,-1,1. Super odd.

    What could cause this issue? I am dealing with volumetric videos and it's important that what i see in Maya, line up with Unity. (btw, all parent transforms are clean).
     
  42. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    802
    Version: 1.0.0-preview.8

    Bug 1: It seems I can't properly make a build with this Package out of the box. Dropping an alembic file into the editor creates a copy of the file in StreamingAssets, but in a build, the path to the alembic file is wrong.
    File in Editor is at
    D:\Projects\Test\Assets\01_Assets/jumping_rabbit.abc


    Streaming Assets was automatically generated at
    D:\Projects\Test\Assets\StreamingAssets\01_Assets/jumping_rabbit.abc


    Error message in Build:
    failed to load alembic at D:/Projects/Test/Builds/Jumping Rabbit_Data/01_Assets/jumping_rabbit.abc


    I was able to resolve that by moving the file to
    D:/Projects/Test/Builds/Jumping Rabbit_Data/01_Assets/jumping_rabbit.abc 
    (out of StreamingAssets folder).

    Bug 2: Seems it is not possible to control the Alembic time other than through timeline since everything is sealed away / internal. This is very confusing and especially very much not "Unity-like" to have fields visible in the Inspector that cannot be accessed by other scripts. Plus some extra confusion since the Timeline component is allowed to access it...

    Bug 3: Accessing one of the Alembic MeshFilters with
    GetComponent<MeshFilter>().mesh
    (just accessing!) immediately stops Alembic playback, but only in a build, not in the Editor - nothing plays anymore afterwards. Doing
    Instantiate(GetComponent<MeshFilter>().sharedMesh)
    does work though. Took me quite a while to figure that out...

    Question 1: I read above that preview 8 shouldnt copy the file to StreamingAssets anymore, but still it does.
    Question 2: Is there an example of reading an external Alembic file (not first imported into Unity)? That would be an important functionality. Since all classes are marked as "internal" it's not possible to try anything without changing a lot of things in the code first.
     
  43. mb28

    mb28

    Joined:
    Oct 7, 2012
    Posts:
    27
    Not sure if this will help with the current alembic package, but I used this one on Github: https://github.com/unity3d-jp/AlembicForUnity and that provides access to an animation clip which you can put in an animation controller.

    It's a bit older, but the functionality is there. I've got a screenshot how it looks in Unity. I'm struggling with getting the motion vectors part to work right now but that's something else I'm trying to figure out. Anyways, hope this helps.
     
  44. Sapien_

    Sapien_

    Joined:
    Mar 5, 2018
    Posts:
    102
    Hello, I really need help with the alembic format in Unity.

    I am working on a game called Gigga Bit Labyrinth. The characters in this game are almost all in the alembic format. I see a lot of potential to this game, however there are some issues I have been having that is preventing me from using this concept to its full potential.

    The first issue is that whenever I move an alembic object, it always returns to 0,0,0 when I play the scene. My temporary solution is to have some kind of empty object to use as a spawn point, so that instead of moving the character in position, it moves to where I want it only when the scene is playing. This becomes very inconvenient quick. Is there a way to fix this?

    The other issue is more of a rendering issue. If you look at the concept teaser for my game (which can be watched here),



    you will see that the characters have a very flat material, like there is no depth. The reason for this is because, when I give this a normal material. Unity appears to render tris. So in other words, instead of a cube rendering shadows the way it would normally render on a cube, it will instead render diagonally across the cube as if there is an extra edge. If you look at the big boss at the end of the trailer, you can actually see this. It makes it look like there is a smoothing effect when there is not.

    Can anyone help me with any issues or point me to anybody that can help me with these issues?
     
    wickedwaring likes this.
  45. vladala

    vladala

    Unity Technologies

    Joined:
    Mar 3, 2017
    Posts:
    189
    I have a hunch what you are seeing is the expected behaviour: The AlembicStreamPlayer "owns" the whole hierarchy of GameObjects: it will change whatever data in the scene it needs to reflect the current frame in the Alembic file. This is because the data is always live streamed from the ABC.
    You workaround, to put a top level GameObject is in fact the proper way for the object to not start at 0,0,0
     
  46. mb28

    mb28

    Joined:
    Oct 7, 2012
    Posts:
    27
    Experimenting a bit more on this. I had to comment out some sections of the alembic stream player code in order for the animation clip functionality to work properly. After this is done, the animation controller and corresponding animation clip should drive the alembic streaming asset correctly.

    Code (CSharp):
    1.         public void Update()
    2.         {
    3.             if (abcStream == null || streamDescriptor == null)
    4.                 return;
    5.  
    6.             ClampTime();
    7.             //if (lastUpdateTime != currentTime || forceUpdate)
    8.             //{
    9.                 abcStream.vertexMotionScale = vertexMotionScale;
    10.                 abcStream.asyncLoad = asyncLoad;
    11.                 if (abcStream.AbcUpdateBegin(startTime + currentTime))
    12.                 {
    13.                     lastUpdateTime = currentTime;
    14.                     forceUpdate = false;
    15.                     updateStarted = true;
    16.                 }
    17.                 else
    18.                 {
    19.                     abcStream.Dispose();
    20.                     abcStream = null;
    21.                     LoadStream(false);
    22.                 }
    23.             //}
    24.            
    25.         }
    26.  
    27.         void LateUpdate()
    28.         {
    29.             // currentTime maybe updated after Update() by other GameObjects
    30.             //if (!updateStarted && lastUpdateTime != currentTime)
    31.                 //Update();
    32.  
    33.             //if (!updateStarted)
    34.                 //return;
    35.             //updateStarted = false;
    36.             abcStream.AbcUpdateEnd();
    37.         }
    Anyone know why this process involves such high CPU usage? I may be trying to use this more than what's intended, but cloning this asset 10 times lets say and running those clones results in super high CPU usage. Around 100ms to be exact. Render thread is 1.1ms. Is alembic streaming really that CPU intensive? Anyone know of a more efficient way to drive this?
     
  47. Sapien_

    Sapien_

    Joined:
    Mar 5, 2018
    Posts:
    102
    Is there really no way around this because even then it can be extremely fiddly, especially if there are constraints. Even with this method, a simple parent hierarchy won't work (though I do have an idea to fix it).

    Also this rendering issue. That is the issue that is far more urgent and really need help on this.
     
  48. marief_unity

    marief_unity

    Unity Technologies

    Joined:
    Oct 9, 2018
    Posts:
    142
    Hi everyone,

    Just a quick word to let you know that an "alembic" tag has been created in Editor Workflows sub-forum.

    This means, we will now encourage you to create separate threads (and tag them as alembic) to ask questions or discuss specific issues about the Alembic package.
    Tags are watchable, so when you will use the alembic tag, we will get a notification too \o/

    The idea is to answer and keep track of questions more efficiently and keep the "Alembic for Unity" thread for official announcements.

    Thanks for your patience and feedbacks !
     
    Sapien_ likes this.
  49. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    802
    @marief_unity Sounds more organised. Will you still go through the several unanswered issues in this thread or should we start creating separate topics from them?

     
    Sapien_ likes this.
  50. marief_unity

    marief_unity

    Unity Technologies

    Joined:
    Oct 9, 2018
    Posts:
    142
    Yes, we are going to go through the question backlog.

    But as we might have to ask you more details on your issue @fherbst, I would suggest you go ahead and create a new thread.

    Thanks for your patience !
     
Thread Status:
Not open for further replies.