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

Loading Alembic in StageView widget in custom Qt interface fails to display Alembic geometry #1022

Closed
BigRoy opened this issue Nov 4, 2019 · 3 comments

Comments

@BigRoy
Copy link

BigRoy commented Nov 4, 2019

Description of Issue

I'm trying to embed USD view widgets into a custom Qt interface, for which a code example can be found here.

This works fine when displaying the example Kitchen_set.usd scene however when loading an Alembic file this solely displays the bounding box. Nevertheless when using usdview the exact same Alembic file works fine.

Example sphere.abc (zipped): sphere.zip

What am I missing to correctly load the Alembic file? Or am I misinterpreting how to reuse these widgets in a custom interface? What I'm trying to do is have a very simple Hydra viewer to display USD/Alembic assets in our pipeline asset manager. As such a simple Viewport with a timeline (with optionally allowing to enable a hierarchy editor) would be perfect.

Steps to Reproduce

  1. Use UI code from my example
  2. Set path to the attached sphere.abc
  3. Run.

Note how just the bounding box is displayed but no geometry is visible. The following warning can be observed in the Python log:

Warning: in GetPoints at line 552 of D:\dev\usd\USD\pxr\usdImaging\lib\usdImaging\gprimAdapter.cpp -- Points could not be read from prim: </pSphere1>

However, the same file works fine with usdview.

Package Versions

USD tag v19.11

2019-10-30 15:29
curl -s -L -o v1.2.11.zip.tmp https://github.com/madler/zlib/archive/v1.2.11.zip
2019-10-30 15:29
curl -s -L -o boost_1_65_1.tar.gz.tmp https://downloads.sourceforge.net/project/boost/boost/1.65.1/boost_1_65_1.tar.gz
2019-10-30 15:35
curl -s -L -o tbb2017_20170226oss_win.zip.tmp https://github.com/01org/tbb/releases/download/2017_U5/tbb2017_20170226oss_win.zip
2019-10-30 15:35
curl -s -L -o v2.2.0.zip.tmp https://github.com/openexr/openexr/archive/v2.2.0.zip
2019-10-30 15:38
curl -s -L -o glew-2.0.0-win32.zip.tmp https://downloads.sourceforge.net/project/glew/glew/2.0.0/glew-2.0.0-win32.zip
2019-10-30 15:38
curl -s -L -o v3_1_1.zip.tmp https://github.com/PixarAnimationStudios/OpenSubdiv/archive/v3_1_1.zip
2019-11-04 13:07
curl -s -L -o hdf5-1.10.0-patch1.zip.tmp https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.0-patch1/src/hdf5-1.10.0-patch1.zip
2019-11-04 13:11
curl -s -L -o 1.7.1.zip.tmp https://github.com/alembic/alembic/archive/1.7.1.zip

Build Flags

%PYTHON% build_scripts/build_usd.py --build-args boost,"--with-date_time --with-thread --with-system --with-filesystem" --alembic --hdf5 --no-maya %USD_BUILD_DIR%
@BigRoy BigRoy changed the title Loading Alembic in StageView widget in custom Qt interface Loading Alembic in StageView widget in custom Qt interface fails to display Alembic geometry Nov 4, 2019
@BigRoy
Copy link
Author

BigRoy commented Nov 4, 2019

Note that upon loading the stage from the Alembic file and doing stage.ExportToString I'm getting this output which seems like it does actually load the mesh correctly. Nevertheless, saving that as sphere.usd and then loading results in the same behavior of only showing a bounding box and not showing any geometry whatsoever.

As such, it is reproducable with solely that output saved as .usd too.

@spiffmon
Copy link
Member

spiffmon commented Nov 4, 2019 via email

@BigRoy
Copy link
Author

BigRoy commented Nov 4, 2019

@spiffmon I just figured that out, ha! Since I got the exported Sphere working when I refactored the .usda file manually to not set the points based on time samples but as a single value. But thanks a lot, that was definitely the pointer I needed if I hadn't gone this deep investigating it.

As soon as I added this:

earliest = Usd.TimeCode.EarliestTime()
window.model.currentFrame = Usd.TimeCode(earliest)

The model displayed fine.
As such this issue is resolved.

@BigRoy BigRoy closed this as completed Nov 4, 2019
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

No branches or pull requests

2 participants