Search Unity

  1. Get the latest news, tutorials and offers directly to your inbox with our newsletters. Sign up now.
    Dismiss Notice

Alembic for Unity

Discussion in 'Formats & External Tools' started by ans_unity, Mar 13, 2018.

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

    vladala

    Unity Technologies

    Joined:
    Mar 3, 2017
    Posts:
    97
    Hey guys,

    Alembic 2.1.0-preview.3 has been published on production.
    New feature:
    - Added Unity recorder integration (compatible with Unity Recorder >= 2.2.0).

    A short list of fixed:
    - Fixed a bug on Windows where file pointers would leak, and after some time all alembic loads would fail.
    - Fixed a bug that caused a crash when exporting a GameObject with a MeshRender but without a MeshFilter Component.
    - Fixed a bug where the visibility was not properly read if it was the only animated property of the object.
    - When the timeline does discontinuous time updates (scrubbing), the alembic updates the scene synchronously.
    - Updated dependency to Burst 1.3.6 (Eliminate the need to have a C++ compiler for x86-64 Mono builds).
     
  2. www_3dart_es

    www_3dart_es

    Joined:
    May 24, 2013
    Posts:
    213
    Hello,I just found this Alembic forum an I wonder if it is compatible with Android at this date.

    Thanks in advance.
     
  3. vladala

    vladala

    Unity Technologies

    Joined:
    Mar 3, 2017
    Posts:
    97
    Hey,

    Unfortunately it is only compatible with Desktop standalone targets.
     
  4. www_3dart_es

    www_3dart_es

    Joined:
    May 24, 2013
    Posts:
    213
    Ok thanks you for the info.
     
  5. scarscarin

    scarscarin

    Joined:
    Apr 5, 2019
    Posts:
    15
    Hi!

    I have a very simple issue: I import my alembic animation in Unity and it's rendered in PlayMode
    upload_2020-11-20_18-20-10.png

    But I can't see it in the Built version
    upload_2020-11-20_18-20-27.png

    I've been trying anything from using other Shaders to using URP/HDRP but it never works. What's my issue?
     
  6. cguertin

    cguertin

    Unity Technologies

    Joined:
    Aug 20, 2019
    Posts:
    47
    Hey @scarscarin! What platform are you building on?

    If you are on Windows, you will need to make sure the build Architecture is set to x86_64. The default is x86 by default but it is not supported by Alembic.

    You can go to File -> Build Settings and make the change in there (see attached screenshot).

    Let us know you are still having issues after that, cheers!
     

    Attached Files:

  7. scarscarin

    scarscarin

    Joined:
    Apr 5, 2019
    Posts:
    15
    That worked! Thanks :)

    Would alembic work on Oculus Quest 2? Or is it going to?
     
  8. Johannski

    Johannski

    Joined:
    Jan 25, 2014
    Posts:
    720
    No, it does not work for android.
    If you want to to target android you could try to compile alembic for android, it is open source after all (https://github.com/Unity-Technologies/AlembicForUnity), but I think nobody tackeled the task so far, so you might have to dig quite a bit to get it running. Another option is to use vertex shader animations for short clips or something like VAT for more complex stuff.
     
    scarscarin likes this.
  9. Sapien_

    Sapien_

    Joined:
    Mar 5, 2018
    Posts:
    59
    Any news on when Update 2.1.0 will be released?
     
  10. overmats

    overmats

    Joined:
    Jun 18, 2013
    Posts:
    6
    Hi,

    i need to bring in an animated particle sim from houdini to render in unity hdrp. The import of the alembic file works great for meshed objects but not for only rendering the particle points. The problem is, that the only shader which is working in hdrp is the Alembic/Points Transparent, which is very limited. I am not a programmer and I do not know how to write a new shader myself. For my visualization i need the be able to get the vertex color attribute from the alembic file and also an emission property in the shader.

    Any idea were can I find such a hdrp shader, or better is there a shadergraph template, so I could build one myself and be able to adapt it easily to my needs.

    Someone at Unity please can you provide a shadergraph solution. Would help me a lot with my projects to be able to render particle sims in realtime in unity!
     
  11. flyer19

    flyer19

    Joined:
    Aug 26, 2016
    Posts:
    67
    with 2.2.0-exp.2 ,AlembicCurves seems incorrect vertex normal ,how to fixed?
     

    Attached Files:

  12. daviddebeule

    daviddebeule

    Joined:
    Oct 2, 2018
    Posts:
    13
    We have a big water simulation abc exported from Houdini, when we try to import a single frame of it in Unity with the alembic importer, it crashes, we already tried with multiple versions of the package, including 2.2.0.

    It crashes when trying to set the velocities into one of the UV channels of the mesh
    When I disable that line, the import is succesful.

    Is there something we can do to fix this? (the size of velocities is 100M+)

    Code (CSharp):
    1.                  
    2. if (split.velocities.Count > 0)
    3.                     {
    4.                         m_PostProcessJobs[s].Complete();
    5. #if UNITY_2019_2_OR_NEWER
    6.                         split.mesh.SetUVs(5, split.velocities.List);
    7. #else
    8.                         split.mesh.SetUVs(3, split.velocities.List);
    9. #endif
    10.                     }
    This is the stacktrace we get upon importing the asset:

    Code (CSharp):
    1.                  
    2. (Filename: Packages/com.unity.formats.alembic/Runtime/Scripts/Importer/AlembicMesh.cs Line: 325)
    3.  
    4. Stacktrace:
    5.  
    6.   at <unknown> <0xffffffff>
    7.   at (wrapper managed-to-native) UnityEngine.Mesh.SetArrayForChannelImpl (UnityEngine.Mesh,UnityEngine.Rendering.VertexAttribute,UnityEngine.Rendering.VertexAttributeFormat,int,System.Array,int,int,int,UnityEngine.Rendering.MeshUpdateFlags) [0x00020] in <734f0376e2f248eb86a40d3dd4ed8c0e>:0
    8.   at UnityEngine.Mesh.SetSizedArrayForChannel (UnityEngine.Rendering.VertexAttribute,UnityEngine.Rendering.VertexAttributeFormat,int,System.Array,int,int,int,UnityEngine.Rendering.MeshUpdateFlags) [0x000bd] in <734f0376e2f248eb86a40d3dd4ed8c0e>:0
    9.   at UnityEngine.Mesh.SetListForChannel<UnityEngine.Vector3> (UnityEngine.Rendering.VertexAttribute,UnityEngine.Rendering.VertexAttributeFormat,int,System.Collections.Generic.List`1<UnityEngine.Vector3>,int,int,UnityEngine.Rendering.MeshUpdateFlags) [0x00019] in <734f0376e2f248eb86a40d3dd4ed8c0e>:0
    10.   at UnityEngine.Mesh.SetUvsImpl<UnityEngine.Vector3> (int,int,System.Collections.Generic.List`1<UnityEngine.Vector3>,int,int,UnityEngine.Rendering.MeshUpdateFlags) [0x0002e] in <734f0376e2f248eb86a40d3dd4ed8c0e>:0
    11.   at UnityEngine.Mesh.SetUVs (int,System.Collections.Generic.List`1<UnityEngine.Vector3>,int,int,UnityEngine.Rendering.MeshUpdateFlags) [0x0000a] in <734f0376e2f248eb86a40d3dd4ed8c0e>:0
    12.   at UnityEngine.Mesh.SetUVs (int,System.Collections.Generic.List`1<UnityEngine.Vector3>,int,int) [0x00008] in <734f0376e2f248eb86a40d3dd4ed8c0e>:0
    13.   at UnityEngine.Mesh.SetUVs (int,System.Collections.Generic.List`1<UnityEngine.Vector3>) [0x0000b] in <734f0376e2f248eb86a40d3dd4ed8c0e>:0
    14.   at UnityEngine.Formats.Alembic.Importer.AlembicMesh.AbcSyncDataEnd () [0x003b6] in D:\_UNITY\hdrptest2020\Packages\com.unity.formats.alembic\Runtime\Scripts\Importer\AlembicMesh.cs:327
    15.   at UnityEngine.Formats.Alembic.Importer.AlembicStream.ImportCallback (UnityEngine.Formats.Alembic.Sdk.aiObject) [0x00240] in D:\_UNITY\hdrptest2020\Packages\com.unity.formats.alembic\Runtime\Scripts\Importer\AlembicStream.cs:260
    16.   at UnityEngine.Formats.Alembic.Sdk.aiObject.EachChild (System.Action`1<UnityEngine.Formats.Alembic.Sdk.aiObject>) [0x00017] in D:\_UNITY\hdrptest2020\Packages\com.unity.formats.alembic\Runtime\Scripts\Importer\AbcAPI.cs:390
    17.   at UnityEngine.Formats.Alembic.Importer.AlembicStream.UpdateAbcTree (UnityEngine.Formats.Alembic.Sdk.aiContext,UnityEngine.Formats.Alembic.Importer.AlembicTreeNode,double,bool,bool) [0x00041] in D:\_UNITY\hdrptest2020\Packages\com.unity.formats.alembic\Runtime\Scripts\Importer\AlembicStream.cs:188
    18.   at UnityEngine.Formats.Alembic.Importer.AlembicStream.AbcLoad (bool,bool) [0x00147] in D:\_UNITY\hdrptest2020\Packages\com.unity.formats.alembic\Runtime\Scripts\Importer\AlembicStream.cs:144
    19.   at UnityEditor.Formats.Alembic.Importer.AlembicImporter.OnImportAsset (UnityEditor.AssetImporters.AssetImportContext) [0x0008d] in D:\_UNITY\hdrptest2020\Packages\com.unity.formats.alembic\Editor\Importer\AlembicImporter.cs:172
    20.  

    Edit: We can provide the abc file that gives the issue if that would help
     
    Last edited: Feb 26, 2021
  13. daviddebeule

    daviddebeule

    Joined:
    Oct 2, 2018
    Posts:
    13
    Are there still Unity developers active on this forum?
    Could you please take a look at the above issue Alembic import? We can provide more details if needed.
    Would creating a bug ticket be better?
     
  14. vladala

    vladala

    Unity Technologies

    Joined:
    Mar 3, 2017
    Posts:
    97
    Hello,

    A bug ticket / crash report would be great. Would help maybe other users in the process.
    Sorry for the late reply. Seems I stopped getting notifications about activity on this thread.
     
    Last edited: Mar 4, 2021
  15. vladala

    vladala

    Unity Technologies

    Joined:
    Mar 3, 2017
    Posts:
    97
    Hello,

    The alembicCurveRenderer is mostly used for previewing curves (not a serious renderer).
    Since curves are renderer as lines, there is no well defined way to define normals. Those normals are tangents in fact.
    One way would be to make all normals face the camera (not sure about the quality of rendering though...)
     
  16. vladala

    vladala

    Unity Technologies

    Joined:
    Mar 3, 2017
    Posts:
    97
    Alembic 2.1.3 was released in February (compatible with 2019.4+)
     
  17. JarienSkywall

    JarienSkywall

    Joined:
    Jan 4, 2021
    Posts:
    1
    Does Unity's Alembic support include support for metaballs aka blob meshes? The most recent mention I could find was from 2018.
    https://blogs.unity3d.com/2017/12/04/adam-the-evolution-of-alembic-support-in-unity/

    Ca935says:
    January 5, 2018 at 10:02 pm
    Really great tool!
    I am importing alembic files to use in timeline for a 360 rendered movie. The reason for alembic is the mesh is changing poly count over the sequence. Think lava lamp / blob mesh. Some imports with a larger surface area are divided into smaller chunks on import. This works perfectly if the material is opaque but not if the material is transparent. lots of flashing faces etc. Is it posibble for somehow force the import to keep the mesh as one on import.

    Sean Lowsays:

    January 22, 2018 at 10:57 pm
    Hi Ca935,
    This ‘vertex-sharing’ Alembic Importer is meant for static/ constant vert count mesh, eg: face, cloth. We will keep your feedback in mind and hopefully to update more on that :)
     
  18. vladala

    vladala

    Unity Technologies

    Joined:
    Mar 3, 2017
    Posts:
    97
    Hey,
    I am not sure what blob meshes are :)
    The current mesh implementation supports both constant and variable topology meshes (fluid simulations). There is no post processing of meshes happening (splitting chunking or whatever).

    If you can share some asset I'd be more than happy to look at it.
     
  19. flyer19

    flyer19

    Joined:
    Aug 26, 2016
    Posts:
    67
    Can not save the vertex normal in ABC? In houdini can Debug the vertex normal vector in spline lines. If can export the vertex normal in ABC,can make correct curl hair card offest the vertex position along the cross( N,Tangent).
     
  20. vladala

    vladala

    Unity Technologies

    Joined:
    Mar 3, 2017
    Posts:
    97
    Hey,
    I meant that in case of lines, normals are arbitrary and the same rules can be used to recompute them. Either way, the current plugin does not import curve normals.

    PS: I suggest we make a new thread and tag it with alembic. I am interested to hear about your use case :)
     
  21. markvi

    markvi

    Unity Technologies

    Joined:
    Oct 31, 2016
    Posts:
    87
    This thread is nearly 4 years old, and it's getting a bit crowded in here :). To make it easier to find new information, we're closing this thread. From now on, we'll update the new Release announcement thread when new versions of Alembic come out. Please create new threads using the alembic tag for feature requests, bug reports or just general discussion. Thank you!
     
Thread Status:
Not open for further replies.
unityunity