Alembic Import/Export
AbandonedPublic

Authored by Kévin Dietrich (kevindietrich) on Feb 9 2016, 2:26 PM.
Tags
None
Tokens
"Love" token, awarded by Taiwofolu."Yellow Medal" token, awarded by juang3d."Like" token, awarded by Saiman."Yellow Medal" token, awarded by italic_."Love" token, awarded by lordodin.

Details

Summary

This patch allows you to export/import scenes in Alembic format. We're, at DwarfLabs, using it every days to share data between applications.
Nurbs is not fully implemented yet.
You can actually export :

  • Mesh data
  • Cameras
  • Empties
  • Hairs (export only)

Diff Detail

Branch
alembic_basic_io
There are a very large number of changes, so older changes are hidden. Show Older Changes
This revision now requires changes to proceed.Feb 10 2016, 10:43 AM

Hi,

Thanks for the feedback, we unfortunately don't have time and resources to make a "clean" patch for a release version. This is based on patch made by Esteban Tovagliari some years ago.
We provide it "as-is", we can provide support to help understanding the code, hoping that somebody can finish/polish it. Actually the current implementation fits our Studio needs and we're able to export full scenes to/from Maya (with almost the same behavior).
Geometry cache (stream) is supported by the "alembic" modifier. We can merge it with the mesh cache, I guess.

Don't hesitate to ask me if you need further information.
Best regards

Hello there,

@Campbell Barton (campbellbarton), I could give you more insight on how we do use it at Dwarf.

We are working with several DCCs in our studio (Blender, Mari, Maya, Houdini, Nuke, in-house lighting/rendering software,...).
We have a full Alembic pipeline use for Cache and/or IO across DCCs and department. We did implement Alembic in Blender so it could fit into exchanging datas with others but also being able to stream animation cache via the modifier (I don't know if @Cédric PAILLE (cedricp) did include it in this patch).
So we made sure Alembic integrated well especially with the Yup and Zup issues but also all type of datas as meshes, cameras, curves,... @Ton Roosendaal (ton) asked us to share this integration with the community so perhaps it could help you having an idea of how it is used in studios like us (not blender only).
Alembic is way more that just cache for us but also a format for I/O.

As for today, Blender is used for Modeling, UVs, sculpting ; Mari for texturing ; Maya for rigging, layout, animation ; Houdini for fx, hair ; Yeti (in maya) for groom and hair as well) ; Nuke for 3D compositing (using alembic from blender and/or maya as well) ; Lumiere for shading, lighting, rendering ;
It happens often that datas comes from blender, get into maya, come back to blender and goes to back to maya or lumiere. Our actual projects and past production for the last 2 years has been using this integration.

Like we said to @Ton Roosendaal (ton) and @Martijn Berger (juicyfruit) we could provide the patch, but we are in production at the time (2 at the same time) so we really have no time to rethink the design entirely for now. But we can give you as much information as you need on how we use it. So if you have any questions we will be happy to answer.

cheers,

F.

@Martijn Berger (juicyfruit) no. Only @Cédric PAILLE (cedricp) did the implementation at dwarf using @Esteban Tovagliari (est) implementation (which we found on his blog) as a starting point. Another developer at dwarf (maxime robinot, not sure he has an account here) did finalize and clean the code those past few weeks so we could share it with you.

I know this is usually a developer only discussion but I think this is relevant:

At our studio we use a script that Blur created for 3DSMax. In Max, the only way to point cache a character's mesh is to use the point cache modifier. Like Campbell already pointed out, this can get tedious with large amounts of characters or even if you have only one or two characters but lots of parts to them. But, this script makes this simple:

It takes the selected meshes and a cache directory and automatically adds a point cache modifier to each one, and caches them. It simply uses the name of the mesh as the cache file name and spits them all out into the same directory.

And the inverse can be applied too: given a selection and cache directory, it will add point cache modifiers to each, look in the directory for the file named the same as the current object and load it automatically. You can even have it look for Subsurface modifiers and place the cache mod underneath.

This tool in indispensable in our studio. We use it to move character animation from Maya to Max and back if we need to. I looked at the code and it's incredibly simple. So, given that someone could easily write this script for Blender as an addon that ran from the tool panel, I think incorporating Alembic into the point cache modifier would be the best solution for now.

Thanks for listening.

Galen: thanks for sharing, very useful this kind of info. The more detail studios share the better.

Here is a (google doc) diagram. I tried to visualize the simplest (2.7x compatible) I/O pipeline.

https://docs.google.com/drawings/d/1mxezo_umafLv70B1hcF3YEfPqKLSm_me7QUBG34RxA8/edit

Basically there would be three use cases:

  1. Model IO
  2. Deform stream IO (characters)
  3. Deform + hair stream IO (characters)

Obviously the model topology should match the stream. That's the user's concern to set right.

Examples:
You can pipe a model from Max into Blender, animate it, export animation, and further process it in Houdini.
Or: model and animate in Maya, import in Blender, there you texture/render it in Cycles.
Or: model and animate in Blender, add fur, export it to own render engine.

Galen: thanks for sharing, very useful this kind of info. The more detail studios share the better.

My studio recently completed a short film using Maya for animation and pc2 importing the meshes into blender for rendering and vfx in cycles. We made use of the mesh cache modifier on many objects per shot and this process was easily manageable by using a python script provided by a blender community member. It worked very similar to the workflow described above by Galen and the authors of this patch. So using this same workflow for alembic would be an excellent initial implementation in my opinion.

@Ton Roosendaal (ton) I believe you do illustrate exactly the way we are using it !

I tried compiling the patch and there are some issues, first it doesn't compile when WITH_ALEMBIC is OFF, so had to apply this patch:

And when compiling WITH_ALEMBIC, I have some linking issues:

../../lib/libbf_abc.a(alembic_api.cpp.o):alembic_api.cpp:function visitObjectString(Alembic::Abc::v7::IObject, std::vector<std::string, std::allocator<std::string> >&, int) [clone .constprop.540]: error: undefined reference to 'Alembic::Abc::v7::IObject::init(std::shared_ptr<Alembic::AbcCoreAbstract::v7::ObjectReader>, std::string const&, Alembic::Abc::v7::ErrorHandler::Policy)'
../../lib/libbf_abc.a(alembic_api.cpp.o):alembic_api.cpp:function getCamera(Alembic::Abc::v7::IObject, Alembic::AbcGeom::v7::ICameraSchema&, std::string, bool&) [clone .constprop.541]: error: undefined reference to 'Alembic::Abc::v7::IObject::init(std::shared_ptr<Alembic::AbcCoreAbstract::v7::ObjectReader>, std::string const&, Alembic::Abc::v7::ErrorHandler::Policy)'
../../lib/libbf_abc.a(alembic_api.cpp.o):alembic_api.cpp:function abcGetMesh: error: undefined reference to 'Alembic::Abc::v7::IArrayProperty::get(std::shared_ptr<Alembic::AbcCoreAbstract::v7::ArraySample>&, Alembic::Abc::v7::ISampleSelector const&) const'
../../lib/libbf_abc.a(alembic_api.cpp.o):alembic_api.cpp:function abcGetMesh: error: undefined reference to 'Alembic::Abc::v7::IArrayProperty::get(std::shared_ptr<Alembic::AbcCoreAbstract::v7::ArraySample>&, Alembic::Abc::v7::ISampleSelector const&) const'
../../lib/libbf_abc.a(alembic_api.cpp.o):alembic_api.cpp:function abcGetMesh: error: undefined reference to 'Alembic::Abc::v7::IArrayProperty::get(std::shared_ptr<Alembic::AbcCoreAbstract::v7::ArraySample>&, Alembic::Abc::v7::ISampleSelector const&) const'
../../lib/libbf_abc.a(alembic_api.cpp.o):alembic_api.cpp:function abcGetMesh: error: undefined reference to 'Alembic::Abc::v7::IArrayProperty::get(std::shared_ptr<Alembic::AbcCoreAbstract::v7::ArraySample>&, Alembic::Abc::v7::ISampleSelector const&) const'
../../lib/libbf_abc.a(alembic_api.cpp.o):alembic_api.cpp:function visitNurbsObject(Alembic::Abc::v7::IObject, std::vector<std::pair<Alembic::AbcGeom::v7::INuPatchSchema, Alembic::Abc::v7::IObject>, std::allocator<std::pair<Alembic::AbcGeom::v7::INuPatchSchema, Alembic::Abc::v7::IObject> > >&, std::string): error: undefined reference to 'Alembic::Abc::v7::IObject::init(std::shared_ptr<Alembic::AbcCoreAbstract::v7::ObjectReader>, std::string const&, Alembic::Abc::v7::ErrorHandler::Policy)'
../../lib/libbf_abc.a(alembic_api.cpp.o):alembic_api.cpp:function Alembic::Abc::v7::IArchive::IArchive<Alembic::AbcCoreHDF5::v7::ReadArchive>(Alembic::AbcCoreHDF5::v7::ReadArchive, std::string const&, Alembic::Abc::v7::ErrorHandler::Policy, std::shared_ptr<Alembic::AbcCoreAbstract::v7::ReadArraySampleCache>): error: undefined reference to 'Alembic::AbcCoreHDF5::v7::ReadArchive::operator()(std::string const&, std::shared_ptr<Alembic::AbcCoreAbstract::v7::ReadArraySampleCache>) const'
../../lib/libbf_abc.a(alembic_api.cpp.o):alembic_api.cpp:function Alembic::Abc::v7::IArchive::IArchive<Alembic::AbcCoreOgawa::v7::ReadArchive>(Alembic::AbcCoreOgawa::v7::ReadArchive, std::string const&, Alembic::Abc::v7::ErrorHandler::Policy, std::shared_ptr<Alembic::AbcCoreAbstract::v7::ReadArraySampleCache>): error: undefined reference to 'Alembic::AbcCoreOgawa::v7::ReadArchive::operator()(std::string const&, std::shared_ptr<Alembic::AbcCoreAbstract::v7::ReadArraySampleCache>) const'
../../lib/libbf_abc.a(alembic_api.cpp.o):alembic_api.cpp:function Alembic::Abc::v7::ICompoundProperty::ICompoundProperty<std::shared_ptr<Alembic::AbcCoreAbstract::v7::CompoundPropertyReader> >(std::shared_ptr<Alembic::AbcCoreAbstract::v7::CompoundPropertyReader>, std::string const&, Alembic::Abc::v7::Argument const&): error: undefined reference to 'Alembic::Abc::v7::ICompoundProperty::init(std::shared_ptr<Alembic::AbcCoreAbstract::v7::CompoundPropertyReader>, std::string const&, Alembic::Abc::v7::ErrorHandler::Policy, Alembic::Abc::v7::Argument const&)'
../../lib/libbf_abc.a(AlembicMeshWriter.cpp.o):AlembicMeshWriter.cpp:function Alembic::Abc::v7::OCompoundProperty::OCompoundProperty<Alembic::Abc::v7::OCompoundProperty>(Alembic::Abc::v7::OCompoundProperty, std::string const&, Alembic::Abc::v7::Argument const&, Alembic::Abc::v7::Argument const&): error: undefined reference to 'Alembic::Abc::v7::OCompoundProperty::init(std::shared_ptr<Alembic::AbcCoreAbstract::v7::CompoundPropertyWriter>, std::string const&, Alembic::Abc::v7::ErrorHandler::Policy, Alembic::Abc::v7::Argument const&, Alembic::Abc::v7::Argument const&)'
../../lib/libbf_abc.a(AlembicMeshWriter.cpp.o):AlembicMeshWriter.cpp:function Alembic::Abc::v7::OCompoundProperty::OCompoundProperty<std::shared_ptr<Alembic::AbcCoreAbstract::v7::CompoundPropertyWriter> >(std::shared_ptr<Alembic::AbcCoreAbstract::v7::CompoundPropertyWriter>, std::string const&, Alembic::Abc::v7::Argument const&, Alembic::Abc::v7::Argument const&): error: undefined reference to 'Alembic::Abc::v7::OCompoundProperty::init(std::shared_ptr<Alembic::AbcCoreAbstract::v7::CompoundPropertyWriter>, std::string const&, Alembic::Abc::v7::ErrorHandler::Policy, Alembic::Abc::v7::Argument const&, Alembic::Abc::v7::Argument const&)'
../../lib/libbf_abc.a(AlembicHairWriter.cpp.o):AlembicHairWriter.cpp:function AlembicHairWriter::assignShadingGroups(): error: undefined reference to 'Alembic::Abc::v7::OCompoundProperty::init(std::shared_ptr<Alembic::AbcCoreAbstract::v7::CompoundPropertyWriter>, std::string const&, Alembic::Abc::v7::ErrorHandler::Policy, Alembic::Abc::v7::Argument const&, Alembic::Abc::v7::Argument const&)'
../../lib/libbf_abc.a(AlembicTransformWriter.cpp.o):AlembicTransformWriter.cpp:function AlembicTransformWriter::do_write(): error: undefined reference to 'Alembic::AbcGeom::v7::CreateVisibilityProperty(Alembic::Abc::v7::OObject&, std::shared_ptr<Alembic::AbcCoreAbstract::v7::TimeSampling>)'
../../lib/libbf_abc.a(AlembicNurbsWriter.cpp.o):AlembicNurbsWriter.cpp:function AlembicNurbsWriter::do_write(): error: undefined reference to 'Alembic::Abc::v7::OCompoundProperty::init(std::shared_ptr<Alembic::AbcCoreAbstract::v7::CompoundPropertyWriter>, std::string const&, Alembic::Abc::v7::ErrorHandler::Policy, Alembic::Abc::v7::Argument const&, Alembic::Abc::v7::Argument const&)'

(Not sure where this fails at the moment.)

Here at bouldermedia we use an alembic implementation called "Crate" by exocortex (we're a 3dsmax / maya house). Crate uses a similar approach to your mesh cache modifier idea.
When I import an alembic with crate it creates the meshes from the cache and assigns an alembic geometry modifier to them which contains the animated data.

As you can see there is a path and identifier which links the mesh data to the correct cache file / relavent cache data for that mesh. If you look to the base of the stack its a "Polymesh" this is a non editable empty mesh object that acts as a foundation for the incoming data.

If you want to retarget to another alembic file you need to go into the max asset tracker and replace the path there.. the asset tracker lists all used assets in a scene and lets you retarget all their dependencies in 1 go.

The modifier workflow works really well in max as you can put modifiers on just about anything. (cameras for instance)

Perhaps objects using alembic transform caches (like cameras and other objects animated in object space) could use an alembic constraint.

Id personally like to see this cleaned up a little, Ideally when I import an abc file i'd like it to work like this

1: A Helper / Empty is created, which represents the cache in the scene.
2: All the meshes contained in the cache are created, and have a modifier in their stack which points to the Empty for its data.

Some ideas on the UI for the cache modifier:

Ideally it would be possible to see a list of all the data channels being read,
Being able to toggle the channels would be a major bonus. say if you need to disable some baked in uv animation.

Some Ideas on UI for the Cache Empty

-A file chooser / refresh button
-A "Select depenencies button

Hopefully thats usefull info, if I can help in any way, like supplying alembic caches for testing please give me a shout. I'd love to be able to work blender into our pipeline.

On which platform are you compiling ? It seems that alembic libraries aren't linked against blender. Check with the Alembic's CMake module if all is right on your side.

I'm compiling on Linux 64-bit. Some more notes on the setup: the libraries are located in /opt/lib/alembic (like the other libs used by Blender), using static libs and all the paths in CMakeCache.txt & co. were apparently set.

Also building with both Alembic and OpenVDB fails here (at least TBB fails to link).


On another note, would it be possible to have a design task for this, so people telling about their workflow can use that and do not "interfere" with the development related stuff (i.e. code review) here? Makes things a bit cleaner.

@Kévin Dietrich (kevindietrich) : Have you set paths to HDF5 includes/lib too ? It's important for Alembic linking

@Cédric PAILLE (cedricp) I have HDF5_LIBRARY, HDF5_HL_LIBRARY and HDF5_INCLUDE_DIRS set, but I doubt it's related to HDF5 here. The undefined references are all in the Alembic namespace.
One thing I noticed is that the symbols that the linker cannot find are all C++ names, but they are not mangled (might be a hint), so maybe there is some shenanigan going on with the mixing of C/C++ code.

@Kévin Dietrich (kevindietrich): Try to switch CMake in verbose mode to see if the linker uses the alembic libs files first... I had no name mangling issue on my side.

OK, found it! Sort of... It fails to link when compiling using C++11 (I am using it in another branch). I don't know why, but I'll investigate that.

Hey ! I read all your comments with a lot of interest, because I just release my "Animation Joiner" Addon, who can merge mulitple animated objects into only one mesh drove by a PC2 file :

http://www.coyhot.com/blender-addon-amination-joiner/

Hope you'll find it useful. :)

Since DwarfLabs doesn't have time and resources to deal with the code review as mentioned above (and still hasn't I guess) and no one stepped forward to take care of it, I'll commandeer this revision for the time being and will quickly update it with some cleanups and little refactors.

@Cédric PAILLE (cedricp), by going through the patch I noticed there were some code internal to DwarfLabs, would you mind pointing out all those areas? We cannot satisify every studio's needs, especially if it is to make the code work with their internal software (Lumière here). In those cases, I think it'd be better to have tools to export custom information in the Alembic archives.

Kévin Dietrich (kevindietrich) updated this object.

This is mostly a cleanup of the patch to adhere to Blender's conventions done in order to get familiar with it.

Changes:

  • a few unused functions were removed, some de-duplicated
  • quiet compile warnings, fix compile errors
  • files and classes were renamed

Also parts of the changes were made to get closer to Lukas' work made during Gooseberry. Maybe we could merge some of the code from there too.

Since DwarfLabs doesn't have time and resources to deal with the code review as mentioned above (and still hasn't I guess) and no one stepped forward to take care of it, I'll commandeer this revision for the time being and will quickly update it with some cleanups and little refactors.

@Cédric PAILLE (cedricp), by going through the patch I noticed there were some code internal to DwarfLabs, would you mind pointing out all those areas? We cannot satisify every studio's needs, especially if it is to make the code work with their internal software (Lumière here). In those cases, I think it'd be better to have tools to export custom information in the Alembic archives.

There's only few things for proprietary use remaining right now (I've done a lot of work to remove them), the only thing I see are the "BkEdgeSharpness" and "BkEdgeIndices" handling in alembic_api.cpp that can be safely removed.
Best regards.

May I ask someone to post a build with this somewhere? (for Windows 64 I mean) I can't build Blender in my system right now but I would like to test this and see how it compares with our current Alembic workflow with other packages.

If it's not possible I understand it, no worries, I'll wait until there is some build with it :)

I'm eager to have Alembic working in Blender, this + Open Subdiv + OpenVDB makes Blender a complete powerful tool inside any pipeline IMO!

:D

Cheers!

I just managed to build it on Fedora 22 and took a quick look.
Works exactly how I would want it to work! Thanks for sharing this awesome patch DwarfLabs!!!
I really hope this get's implemented soon, as I am sure it will bring a lot of attention to Blender from people/Studios who were scared away, because they couldn't easily get their existing assets in (or stuff made in Blender out)....

I just managed to build it on Fedora 22 and took a quick look.
Works exactly how I would want it to work! Thanks for sharing this awesome patch DwarfLabs!!!
I really hope this get's implemented soon, as I am sure it will bring a lot of attention to Blender from people/Studios who were scared away, because they couldn't easily get their existing assets in (or stuff made in Blender out)....

Is there a little chance you could make a Win64 build of this? :)

Is there a little chance you could make a Win64 build of this? :)

Sorry, I don't have windows at home.
But I am highly interested in a windows-build, too, so I can show it around at work..... Anyone care to put it up on graphicall?

Using it in production right now... just because I can. Wouldn't have happened without that patch.
Too bad I can't render on the farm because there is no windows build.....

Using it in production right now... just because I can. Wouldn't have happened without that patch.
Too bad I can't render on the farm because there is no windows build.....

Glad to hear it's useful for you !

Using it in production right now... just because I can. Wouldn't have happened without that patch.
Too bad I can't render on the farm because there is no windows build.....

Too bad indeed, I can't try it either without a windows build :P
Congrats on using it in production! :) I'm eager to try it :D

Juan Gea (juang3d) added a comment.EditedMar 9 2016, 6:20 PM

Is there a way to compile this as an addon that does not require a complete Blender compile?

Cheers.

P.S.: Please bear in mind I'm not an expert developer or similar, so this can be a really nonsense question, but I have to ask...

Hey guys, please keep the discussion on topic. That is, review of the code and it's design. Having patches with walls of comments is really an issue since it makes the reviewing progress hard to follow. For testbuilds, better visit our #blendercoders IRC channel on freenode and ask there, it's also better to ask about compiling errors there.

@Kévin Dietrich (kevindietrich), think this topic should definitely have a design task, feel free to set one up. A branch to follow progress might also be helpful.

@Julian S (julian)
Sorry Julian, you are right.
Where can we see the design task? I'm new to all this :)
Cheers.

Alright gang, I've ported the patch to a state that is more suitable for Blender. There are still a few issues and bugs caused by the refactor, but I think it's about time to get some user feedback on it so I just opened a design task for that matter: T48075.

If people around here also have .abc test files to share that would be lovely (since I couldn't find any "real world" examples).

Also to avoid any sort of confusion, I will update this here patch with the current state of the branch. (Not asking for review just yet ;) )

  • Apply patch in a new branch.
  • Merge the 'Alembic' modifier in the 'Mesh Cache' modifier.
  • Start implementing the importer in C.
  • Remove unused function.
  • Cleanup: function names.
  • Partial port of the Python importer to C++.
  • Set object name properly on import.
  • Add support to import cameras.
  • Fix crash during export.
  • Cleanup.
  • Remove Alembic properties from ID-blocks, as well as the associated
  • Remove Python importer.
  • Cleanup, try to address alembicManager memory leak.
  • Import: add UI params to setup forward and up axises.
  • Remove left over (proprietary) code from DwarfLabs.
  • Cleanup: pass the archive as a function parameter instead of the
  • Added an AbcObjectReader class to abstract away object reading and
  • Pass the Alembic IObject to the reader in their constructor instead of
  • Rewrite the import function to avoid traversing the archive for each
  • Cleanup: remove some unused functions.
  • Merge branch 'master' into alembic_basic_io
  • Cleanup: unnecessary (left over) changes
  • First attempt at restoring object hierarchy when importing a file.
  • Merge branch 'master' into alembic_basic_io
  • Object hierarchy is now restored upon import.
  • Set up objects' position, rotation and scale upon import.
  • Cleanup: remove some unused/outdated code.
  • Replace hard coded axis conversion with UI parrameters.
  • Cleanup: style.
  • Cleanup: namespace usage.
  • Remove 'rotate_matrix' property from AbcObjectWriter.
  • AbcHairWriter: split write function in smaller ones.
  • Cleanup.
  • De-duplicate object name creation logic.
  • Remove unused functions.
  • Simplify 'vertex cache' lookup logic.
  • Remove alembicManager, and other unused functions.
  • Cleanup.
  • Remove some hard-coded transform.
  • Convert rotation angles from degrees to radians.
  • Cleanup: de-duplicate 'get_id_name'.

Hi,

Can I ask if someone can build x64 windows version with this patch? I was trying yesterday, but I'm not a person who knows that stuff.

It will be very nice to test. What about vary in polygon count simulations like fluids (Houdini, RealFlow) ??

Regards

Hi,

Ok, I have followed your advices and I got Blender built in Linux x64 (Linux Arch) with Alembic 1.5.8.

But I have a problem testing Blender, please, could you tell me if you have experienced this problem?

Steps:

  1. Open a new blender.
  1. Select the cube that is in the center of coordinates by default.
  1. File --> Export --> Alembic (Default) (.abc)

    In the exporter options, I have enabled these (all the others not listed here are disabled):
    • Export Ogawa.
    • Selected objects only.
    • Renderable objects only.
    • UVs.
    • Pack UV Islands.
    • Normals.

      Filename field: "exported_cube.abc".
  1. Close Blender, open Blender again, delete the default cube.
  1. File --> Import --> Alembic (Default) (.abc)

    I choose the file "exported_cube.abc" and press "Import Alembic Archive"

    It is expected to have the cube I exported previously in the center of the scene again, but nothing happens, the only thing I get is an empty mesh in the center of the scene, the point is called "cube".

Please, could you help me? Is this right? is this wrong? I do not if I have done a correct build and I am very confused ;-(

Please help.

Note: I am a newbie building Blender, I am building blender from the git branch "alembic_basic_io" (from today), I have not applied any patch and I have not done anything unusual.

This is very confusing, could you help me?

Thanks a lot in advance.

I choose the file "exported_cube.abc" and press "Import Alembic Archive"

It is expected to have the cube I exported previously in the center of the scene again, but nothing happens,
the only thing I get is an empty mesh in the center of the scene, the point is called "cube".
Please, could you help me? Is this right? is this wrong? I do not if I have done a correct build and I am very confused ;-(

I can reproduce this issue with newly exported abc archives but older archives are just fine, so I would say there is a new bug in the code :/ I'll try to investigate this in the coming days.

Hi Kevin,

Thank you very much for your answer, now I realize that is not my fault trying to build blender :-)

Could you give us a hint about the bug? I have not very much experience in the Blender code but I have been coding in C/C++ the last 9+ years, so I would like to start to investigate about how to fix it.

Which code files should I start to read in order to detect where the bug happens? Obviously I can look for the bug on my own, but a little hint could help me to start getting involved :-)

(Unfortunately I cannot guarantee that I can fix this bug, but I would like to have a try)

The bug is now fixed, it was due to missing copy of the mesh's vertices when exporting to a different coordinate system than Blender (up/forward axis in the export setting).

@Jorge Gascon Perez (jgascon), if you'd like to hack the code a bit, maybe bring some improvements/bug fixes, the code to convert between the Alembic and Blender is found in the abc_*.h/cc files in source/blender/alembic/intern. (The bug itself was in abc_mesh.cc)

Hi, me and @Sergey Sharybin (sergey) did initial review of the patch, and discussed some of the issues here.

Firstly, to give us some context, it would be good if you would explain how you use this, are you mainly importing, exporting... what applications do you integrate with? how does this fit into your pipeline?


As for the patch its self, while it obviously works to inserting file-paths in ID blocks, this isn't great design, or really very manageable from user perspective (having potentially 100's of objects).
Ideally we want to have a scene-level integration since alembic is often used with many objects at once.

So for longer term this is quite a tricky integration project - managing alembic baking, reading... overrides ... etc.

Short term however we could have basic integration which is using existing design and not causing us to make design choices that cause backwards incompatibility later on.
Though we realize this may not be so useful in your studios pipeline.

Support as import/export


This would export the scene (or individual objects) as an alembic file and would put this on the level of other exporters (FBX/Collada for eg).

Import would be limited since geometry streaming would not be supported, however export could be quite useful (load a frame for rendering for eg), and may be even help with tools that need to write out complex geometry - bypassing Python which can be a bottleneck.

Support as an extra format for "Mesh Cache" modifier


Currently we support MDD and PC2, we could have Alembic added here for reading. (and support single mesh export too).
This is of course very limited, but at least fits current design.
Of course this is also limiting for 100's of objects too (as mentioned before), but at least fits into design of existing modifier and isnt hard coding in alembic support for many object types.


Note that if you're interested to have a branch in our git repo to develop improvements to alembic (working on this patch. or an alternate implementation), we can arrange this.

Is this available as a beta/test plugin? I've seen people use Alembic on Vimeo but so far this is the only thing I've found as per availability. I was hoping to try it out as a BlackMagic Fusion import from Blender animations.

It's great that there is a lot of enthusiasm about this patch, however replies here have become more of a forum, and get in the way of code-review and design discussions.

The initial discussion for the initial patch is also not so much related to @Kévin Dietrich (kevindietrich) 's work.

Suggest to abandon this differential, and create a new one which includes the design for the alembic integration,
(with a link to http://blenderartists.org/forum/showthread.php?399763 for people who like to chat and ask questions).
Edit, theres also:T48075 discussion could be moved there too (though this is full of support issues too.)

Created a new differential D2060, so closing this one.

Hi all,
I am just trying to know whether the Alembic files exported from Blender have Materials written.
Surely a very basic question.
Does anybody know that?
Thank you