Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

usdAbc: do not collapse Alembic geometries into their transform parent if the parent has multiple children #1940

Conversation

mattyjams
Copy link
Contributor

Description of Change(s)

This avoids erroneously collapsing multiple sibling geometries into a single USD prim, forcing one to clobber the others.

The Alembic file used by the unit test contains six (poorly hand/mouse-drawn) curves representing numerical digits. The structure of the file looks like this (as reported by abcinfo -o):

testUsdAbcXformPrimCollapsing.abc, version: 10705 (2 timings)
   TimeSample[0]      1 samples:  t0=0 (frame 0.0 @ 24fps)
   TimeSample[1]      1 samples:  t0=0.0416667 (frame 1.0 @ 24fps)

Objects:
/CurvesAsset (Xform)
/CurvesAsset/Geom (Xform)
/CurvesAsset/Geom/Curve1 (Xform)
/CurvesAsset/Geom/Curve1/CurveShape1 (Curves)
/CurvesAsset/Geom/Curve2 (Xform)
/CurvesAsset/Geom/Curve2/CurveShape2 (Curves)
/CurvesAsset/Geom/Curve3 (Xform)
/CurvesAsset/Geom/Curve3/CurveShape3 (Curves)
/CurvesAsset/Geom/Curves456 (Xform)
/CurvesAsset/Geom/Curves456/CurveShape4 (Curves)
/CurvesAsset/Geom/Curves456/CurveShape5 (Curves)
/CurvesAsset/Geom/Curves456/CurveShape6 (Curves)

12 Objects displayed

Prior to this change, the resulting Curve1, Curve2, and Curve3 BasisCurves prims are all correctly translated and collapsed from their respective Alembic Xform and Curve nodes through the file format plugin, but the Curves456 BasisCurves prim would only represent the CurveShape6 curve from Alembic and would have lost CurveShape4 and CurveShape5 from having attempted to merge all three curve nodes into a single transform parent.

With this change, a parent with multiple children like this is detected as a case where collapsing cannot be performed, and Curves456 ends up as an Xform prim instead with three BasisCurves children.

  • [ X ] I have submitted a signed Contributor License Agreement

…t if the parent has multiple children

This avoids erroneously collapsing multiple sibling geometries into a single
USD prim, forcing one to clobber the others.
@sunyab
Copy link
Contributor

sunyab commented Jul 11, 2022

Filed as internal issue #USD-7480

@tallytalwar
Copy link
Contributor

Hi @mattyjams

Just wanted to note that, while running usdAbc tests internally, the testUsdAbcInstancing* tests failed. But I believe these are more correct now and their baselines should be updated. I am going to include the updated baselines for testUsdAbcInstancing* tests with this change.

Thanks

@mattyjams
Copy link
Contributor Author

Yikes! Clearly I didn't run the full battery of tests...

Sorry about that, but thanks for catching it, @tallytalwar!

@pixar-oss pixar-oss merged commit 4fdb4d9 into PixarAnimationStudios:dev Sep 1, 2022
@mattyjams mattyjams deleted the patches/usdAbc_fix_overly_aggressive_node_collapsing branch September 1, 2022 01:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants