Exporting Instances to Alembic from Maya

1,215 views
Skip to first unread message

Sachin Shrestha

unread,
Nov 11, 2017, 10:42:33 PM11/11/17
to alembic-d...@googlegroups.com
Hi list,

For some of our scenes with 1000s and more maya instances, it ends up taking a long time (upwards of 30 minutes to even an hour) to export the alembic file using Maya's AbcExport. This is with Maya 2017 Update 4 on CentOS 6.4.

abc_root.isChildInstance('myInstanceTransformName') in the python api returns False to me and other instance related methods also return empty so not sure if instancing is even taken into account in the Maya alembic plugin's export. It still seems to be taking a long time in case of instances (regular objects or duplicates export quickly).

Has anybody else here experienced similar issues exporting large number of instances or can throw more light on maya's alembic exporter's support for instances ?

Thanks,
Sachin

Lucas Miller

unread,
Nov 11, 2017, 10:59:07 PM11/11/17
to alembic-d...@googlegroups.com
AbcExport currently doesn't try to take advantage of instancing.  We would gladly accept a pull request for this.

--
You received this message because you are subscribed to the Google Groups "alembic-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to alembic-discussion+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sachin Shrestha

unread,
Nov 12, 2017, 9:31:54 PM11/12/17
to alembic-d...@googlegroups.com
Thanks for the clarification Lucas. There seems to be a PR from last year in this post but not sure if it was ever accepted or not.

To unsubscribe from this group and stop receiving emails from it, send an email to alembic-discuss...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "alembic-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to alembic-discuss...@googlegroups.com.

Lucas Miller

unread,
Nov 14, 2017, 12:27:07 PM11/14/17
to alembic-d...@googlegroups.com
There wasn't ever a PR submitted from that post as the user wasn't
happy with the implementation.

Lucas

Sachin Shrestha

unread,
Nov 15, 2017, 6:31:45 AM11/15/17
to alembic-d...@googlegroups.com
Hi Lucas,

I tried the maya alembic exporter again and it seems like the AbcExport that ships with maya does support instancing. I converted a heavy paint effects geometry and exported its alembic file which turned out to be 81.6 MB. I instanced it using Maya's duplicate instance options a few times and exported the alembic again and it was 81.7 MB. So I guess the shape data is common and only transforms are written for the instances?

I checked with the python api and getChildrenHash() method for each xform in the abc, I see this:

/oakHeavy_inst_1 --> fdae8a6e48c8231267dbbda2c6cfa9ab
/oakHeavy_inst_2 --> fdae8a6e48c8231267dbbda2c6cfa9ab
/oakHeavy_inst_3 --> fdae8a6e48c8231267dbbda2c6cfa9ab
/oakHeavy_inst_4 --> fdae8a6e48c8231267dbbda2c6cfa9ab
/oakHeavy_inst_5 --> fdae8a6e48c8231267dbbda2c6cfa9ab
/oakHeavy_srcMeshGroup --> fdae8a6e48c8231267dbbda2c6cfa9ab
/pSphere1 --> 3f4cc32f68f6aa74c0541c50f888d85c

I threw in a sphere in the same alembic file for test. Is this what I should expect to see for instances in alembic? All instances should point to the same child hash? I'm not able to understand in what context should I use the isChildInstance() or isInstanceRoot() or other instance related method.

Thanks again,
Sachin

Lucas Miller

unread,
Nov 15, 2017, 12:38:00 PM11/15/17
to alembic-d...@googlegroups.com
You use isInstanceRoot to determine if your IObject actually points at
another IObject.

instanceSourcePath returns the path to the "real" IObject.

https://github.com/alembic/alembic/blob/master/lib/Alembic/Abc/IObject.h#L226

All those hashes could be the same because the hierarchy and
properties beneath them is the exact same, they may or may not be
instanced. (could just be data deduplicated instead)

Sachin Shrestha

unread,
Nov 15, 2017, 7:42:03 PM11/15/17
to alembic-d...@googlegroups.com
Thanks Lucas, that makes sense. In this case since the data is actually de-duplicated (and not really instanced) I see the same hash.

Thanks,
Sachin

Alex Suter

unread,
Nov 15, 2017, 7:47:01 PM11/15/17
to alembic-d...@googlegroups.com
The hierarchical instancing code was used by us for very large instances with a large number of xform objects. We were finding that the number of transforms was dominating the time spent. If your hierarchies aren't too deep and you're not making use of the instancing on the render side, relying on deduplication should be fine.


>> >>> For more options, visit https://groups.google.com/d/optout.
>> >>
>> >> --
>> >> You received this message because you are subscribed to the Google
>> >> Groups
>> >> "alembic-discussion" group.
>> >> To unsubscribe from this group and stop receiving emails from it, send
>> >> an

>> >> For more options, visit https://groups.google.com/d/optout.
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups
>> > "alembic-discussion" group.
>> > To unsubscribe from this group and stop receiving emails from it, send
>> > an

>> > For more options, visit https://groups.google.com/d/optout.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "alembic-discussion" group.
>> To unsubscribe from this group and stop receiving emails from it, send an

>> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
> "alembic-discussion" group.
> To unsubscribe from this group and stop receiving emails from it, send an

> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "alembic-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to alembic-discussion+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "alembic-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to alembic-discussion+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages