Referenced Alembic cache collapsing transforms

   2685   11   2
User Avatar
Member
9 posts
Joined: Dec. 2020
Offline
Hello! We're referencing Alembic files into our Solaris scenes that have objects such as /body/bodyShape.

For many of these caches they're working exactly as expected -- in USD we end up with:

/body (Xform)
/bodyShape (Mesh)

But with other caches, even though in the Alembic it's still /body/bodyShape, in Solaris it's collapsing into:

/body (Mesh)

The geometry looks correct, but we need the namespace to stay the same. As far as I can tell, it's because the Xform objects in the Alembic cache have attributes:

/body (Xform)
Constant-Identity
Constant string ABC_model_file
Constant string ABC_object_path

Are these standard attributes, and expected behaviour within Solaris? Is there some way to modify this behaviour without recachine the Alembic files?
--
Brian Silva
Lead Pipeline TD
Axis Studios
axisstudiosgroup.com
User Avatar
Staff
4521 posts
Joined: July 2005
Offline
Solaris just uses the standard Alembic file format plugin that is part of the standard USD distribution. I'd suggest creating a couple of simple abc files that demonstrate a "working" hierarchy and a "broken" hierarchy, and post them to usd-interest or as a github issue (and also here if you'd like if you don't get any traction over there). I did a quick search and didn't see any other complaints like this on github or usd-interest, so it might be something unusual about how you are authoring your abc files?
User Avatar
Member
39 posts
Joined: Nov. 2018
Offline
I have the same problem
What is "usd-interest"?
I have attached the scene with the "broken" hierarchy and how I'm authoring my abc file
Edited by RiccardoT - June 1, 2021 04:11:39

Attachments:
USD_AlembicImport.PNG (640.5 KB)
Alembic_import.zip (3.6 MB)

User Avatar
Member
39 posts
Joined: Nov. 2018
Offline
This is the same scene but with a simple export from Maya, same issue


Edited by RiccardoT - June 1, 2021 05:12:33

Attachments:
USD_AlembicImport_Torus.PNG (613.2 KB)
Import_Alembic2.zip (3.6 MB)

User Avatar
Member
9 posts
Joined: Dec. 2020
Offline
Hey Mark, thanks for that!

I went through usd-interest and did manage to dig up a link to this PR:
https://github.com/PixarAnimationStudios/USD/pull/527 [github.com]

So the transform collapse is a default feature of the usdAbc plug-in. Fortunately it can be disabled by setting the USD_ABC_XFORM_PRIM_COLLAPSE environment variable to 0. I just did a simple test of that, and it appears to be working.

I'm still not clear why it's happening on one set of caches, but not another. But this is the behaviour I'm looking for so all good now!

@RiccardoT -- usd-interest is Pixar's Google group for discussing USD. You'll need to request access, but you can find it here:
https://groups.google.com/g/usd-interest/ [groups.google.com]
--
Brian Silva
Lead Pipeline TD
Axis Studios
axisstudiosgroup.com
User Avatar
Member
39 posts
Joined: Nov. 2018
Offline
@bsilvaAX
Thank you for looking into it and posting the Solution, I also took a quick look into the google group and it's amazing
User Avatar
Member
9 posts
Joined: Dec. 2020
Offline
No problem at all! Indeed, usd-interest is a gold-mine of useful info about USD.
Edited by bsilvaAX - June 1, 2021 07:47:18
--
Brian Silva
Lead Pipeline TD
Axis Studios
axisstudiosgroup.com
User Avatar
Staff
4521 posts
Joined: July 2005
Offline
bsilvaAX
So the transform collapse is a default feature of the usdAbc plug-in. Fortunately it can be disabled by setting the USD_ABC_XFORM_PRIM_COLLAPSE environment variable to 0. I just did a simple test of that, and it appears to be working.

Nice!
User Avatar
Member
26 posts
Joined: July 2020
Offline
Help!

Where can I set environment variables specific to this usd?
Edited by Suu-jp - June 5, 2024 09:40:16
I use machine translation often as I’m not confident in English. Apologies for any awkward phrasing.
User Avatar
Member
199 posts
Joined: Nov. 2013
Offline
The USD alembic interpreter has a few issues like this, such as only taking the first uv set and ignoring the rest (https://www.sidefx.com/forum/topic/87928/)

Seems you have a fix, but another workaround for some .abc import issues is to use a sopCreate with an Alembic sop inside to bring in your .abc files. IIRC this uses SideFX's interpreter whereas dropping an .abc straight into LOPs with a reference lop/sublayer etc uses the Pixar interpreter.
User Avatar
Member
26 posts
Joined: July 2020
Offline
Is it possible to output as "reference" using that method?

When rendering in Deadline, you need to bring it as a "reference" to save weight.
Edited by Suu-jp - June 10, 2024 07:38:21
I use machine translation often as I’m not confident in English. Apologies for any awkward phrasing.
User Avatar
Member
36 posts
Joined: Sept. 2014
Offline
Some thoughts to add to this thread, in case it helps .

If you don't mind bringing the alembic in via a sop context like a sop create, you can specify on the alembic sop to keep transform/shape hierarchy.

AD products are notorious for saving attributes out side of the abc spec locations.
We found that using the python module _alembic_hom_extensions that comes with houdini we could get these attributes and put them in the correct locations.

If you have some ownership or control of what is getting exported, ie a pipeline of sorts. On the exporter,, they usually have a way to promote attributes from your mesh to the top alembic primitive. I would highly recommend writing any of these attributes to json and reading them back in on the hou side.


Hope this helps.
  • Quick Links