Page MenuHome

Alembic targets for April 2017
Closed, ResolvedPublic

Description

In this task I'll lay out the targets for my work on Alembic. Everybody who uses Alembic, or is interested in its use, is invited to discuss and help with testing, importing, exporting, rendering, etc.

For this month, i.e. April 2017, I'll be working towards successfully exporting and importing a Blender Studio character with animation and hair. In short, I want to make this possible:

  • Export an animated Rinky from Rinky-scene.blend, both with and without hair.
  • Import those exports in other software, such as Maya, Houdini, or RenderMan.
  • Export an animated character from non-Blender software (Maya, Houdini, etc.) to an Alembic file, and import that successfully into Blender.
  • Apply shading and texturing to the imported character in Blender, and render in Cycles.
  • Fix "lagging hair" issue (on hold, after discussion with @Campbell Barton (campbellbarton) we found that this would likely require ugly hacks or a major update of the modifier stack, so better to do this properly in 2.8)
  • Make the import operator synchronous so that script and import, wait for the import to finish, and then do something with the imported objects.

This is a still of the Rinky scene:

Here is the test scene, which contains Rinky-scene.blend, linking the character file Rinky.blend into a scene and (crudely) animating it:

Reference video rendered with Blender/Cycles (so without any Alembic import/export):

Apart from functional changes, I also want to create a set of unit tests to improve future stability.

My question to you: help with testing, importing, exporting, rendering, using the latest master branch (either build yourself or take from the buildbot from the Buildbot. Also: provide us with test files that do or do not work, so that we can test and improve the Alembic-based character animation workflows.

Details

Type
Design

Event Timeline

should we use the daily build or a specific branch ?

Sybren A. Stüvel (sybren) updated the task description. (Show Details)

should we use the daily build or a specific branch ?

Good question, you can test using the master branch. You can either build it yourself, or take it from the buildbot. I've updated the ticket to reflect this.

Alex (asuter) added a subscriber: Alex (asuter).EditedApr 19 2017, 1:06 AM

Hi,

Here's a simple Alembic cache with some static user properties, some animated ones, and a user property on geometry. I made one of these for SideFX when they were upgrading their user property support and it proved useful. Let me know if you have any questions about it. In general, animated values are keyed on frames 1 and 10. Interpolation of these animated values is up to the package.

Hit me up if you have any questions about it.

  • Alex Suter

Thanks @Alex (asuter).

Interpolation of these animated values is up to the package.

How would a reader know whether those values should be interpolated at all, or just remain constant until the next value is keyed?

Two more features just landed in Master:

  • Exporting hair & particle systems is now optional. The export still takes more time with disabled hair than when there is no hair, as the particle systems themselves aren't disabled during the export. It's only the writing to the Alembic file that's skipped. (b148ac5cf77a869bc)
  • The Import and Export operators now take a new flag as_background_job, which is True by default. When set to False, the operator will block Blender during the import. This allows Blender scripts to perform tasks after the import/export has completed. (2dac8b3ee043)

Thanks @Alex (asuter).

Interpolation of these animated values is up to the package.

How would a reader know whether those values should be interpolated at all, or just remain constant until the next value is keyed?

Sorry, I didn't word that very well.

It was keyed on 1 and 10 in our 3D package, but Alembic has baked out samples in between. We typically have samples on each frame, as well as two other samples at -0.25 and 0.25 offset frames in the cache.

We do occasionally ask for values in between the samples, and those are, in general, all interpolated. Anything like a float or a V3f or alpha values. Not strings, obviously. If the time asked for is before the start of the cache, or after the end, the returned value is pegged at that start or end value respectively.

Hi All!

This is an example from our kids series we're working on (exported from maya 2014) that I can't import into blender (yesterdays nightly build). It's a character with several objects cached into one abc file. The error message from b3d console looks something like this:

Could not open as ogawa file from provided streams. Sorry if I'm noobing here, and doing this wrong, please correct me, if so.

My system info (if needed)
win10 64bit pro
64Gb Ram
intel i7 6800K

Hi Adam, thanks for joining the discussion and providing a test file. This file is written using the obsolete HDF5 format, which Blender doesn't support. You can convert it to the current Ogawa format using abcconvert (a tool included in Alembic).

Ogawa is 4x to 25x faster than HDF5, and was introduced almost four years ago.

I do understand the confusion, as the error message is quite unclear. I'll address this next week in T51292.

Ahaa! Wow that was a nice and clear explanation, thanks, I guess the conclusion is that maya 2014 has this oldschool alembic (HDF5) going on. No problem, cause I'll be leaving this workflow behind soon. Just would of loved to integrate blender into that pipeline and be more self reliant in shading/rendering. Thanks anyways.

Hey, I just started enjoying alembic export and import. It's really cool to cache some output of Animation Nodes.
I wanted to ask is this: Is possible to export (animated) curve objects (converted to a mesh possibly)?

I just tried it with a very simple spline with some bevel and it does not really work as expected. It exports something but when I reimport this file, most data seems to be lost. Also the imported object is only visible in edit mode for some reason.

Thanks in advance,
Jacques

Hey, I just started enjoying alembic export and import. It's really cool to cache some output of Animation Nodes.

Good!

I wanted to ask is this: Is possible to export (animated) curve objects (converted to a mesh possibly)?
I just tried it with a very simple spline with some bevel and it does not really work as expected. It exports something but when I reimport this file, most data seems to be lost. Also the imported object is only visible in edit mode for some reason.

Storing animated curves works for our hair export, so I don't see why it shouldn't work for other animated curves. Alembic supports curves natively, so it wouldn't even have to be converted to a mesh. Can you create a new issue for this? Don't forget to give it the tags "BF Blender" and "Alembic".

Hey there Sybren,

Some people are developing a small tool for VR drawn animation. I gave it a try and saw that they implemented the ability to export to alembic files:
http://nvrmind.io/#animvr

In generall it seems to work fine to import the files to blender, The Colordata is stored in Vertexcolors called "Cd" this even work automatically in blender internal.


Have a nice weekend
Alex

Hi everyone,

I'm one of the developers on AnimVR and happy to help!

Following is a little write up of my findings regarding vertex colors so far:

Vertex colors are stored as C(3/4)FGeomParam in the ".arbGeomParams" of a poly mesh. The Alembic hierarchy looks like this:

Blender (in the current release) expects the GeometryScope property to be set to kVertexScope" (that is, a color per vertex) while Maya respects whatever GeometryScope is set in the file. Note that as far as I can tell, Maya only exports kFacevaryingScope data (a color per face) which means that Alembic files written by Maya won't look right in Blender.

Maya also adds the "mayaColorSet" property to the vertex color geometry parameter. If this property is not present Maya will not create a color set and the colors won't get imported. (See this piece of code: https://github.com/alembic/alembic/blob/master/maya/AbcImport/util.cpp#L478)
You can force color set creation by calling "AbcImport" manually and passing the "-rcs" (recreate color set) option.
At the moment I am adding "mayaColorSet" when exporting from AnimVR. This way colored .abc files can be imported via the Maya GUI which makes the process a lot more user friendly.

Since we are naming the vertex color parameter "Cd" Houdini automatically uses the colors for its viewport material. (otherwise you can map the user property to Cd manually in Houdini)

I spent a fair amount of time staring at export results and figuring out differences between them, so if you have any questions feel free to ask!

Hey @Dario Seyb (daseyb), welcome to the discussion, and thanks for the useful information For the Maya compatibility, can you create a new Manifest Task for this, with some example files? That'll allow us to properly handle development of this feature.

Hi !

I think I found an issue with alembic export from blender.

I'm on Linux Mint 18.1
Blender 2.78c (official release)

When an object has several uv layers and more than one modifiers, the export prints 'Already have a property named: UVMap' and the export stops.
Same thing with vertex color layers but this time with a least one vcolor : 'Already have a property named: Col' and the export stops.
All is fine if the object has only one modifier or none.

Are you aware of that ? Am I doing something wrong ?

Thanks

Hey @Manuel Rais (g-lul)! Please test with a recent build from the buildbot (see the link above). If it still happens there, can you create a new Manifest Task for this, with some example files? That'll allow us to properly handle this issue. Next to the example files, please also describe what exactly is going wrong; showing a message "Already have a property named: UVMap" is not the same as only exporting one UV map, and knowing what exactly is wrong in the output helps us when debugging.

Hi Sybren,

Sorry for the noise. It looks like it's working pretty well with the last buildbot version...

Forget about this...
Thanks.

I have a single frame (#242) 100 MB Alembic abc exported from Houdini that crashes Blender 2.7.8c trying to import. Is anyone interested in getting this file and using it to debug this seemingly broken blender importer?
Where or how can I submit this bug report with file?
I don't really care about anything in the file.
Is there some guidelines for exporting alembic files from Houdini 16 that I'm missing? Like Dos & Don'ts. Thing is you really need some of the per vertex color stuff, because that can't be reconstructed from the poly-soup.
I've not used it much just testing at this point.
Should I try waiting for or the latest dev version?

Add Action? I must be in the wrong place for this.

Sybren A. Stüvel (sybren) closed this task as Resolved.Sep 4 2017, 2:16 PM

I'm closing this ticket as 2.79 is about to be released. Thanks everybody for your feedback & reports. We still welcome testing & detailed reports, of course.

Hey all! As part of the Code Quest I'll be working on Alembic support again, for Blender 2.8. Please join T54690 to see and discuss the changes in the design for 2.8!