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

UsdMaya Playback drawing broken in 18.11 #675

Closed
bfloch opened this issue Oct 23, 2018 · 2 comments
Closed

UsdMaya Playback drawing broken in 18.11 #675

bfloch opened this issue Oct 23, 2018 · 2 comments

Comments

@bfloch
Copy link

bfloch commented Oct 23, 2018

Description of Issue

Playback mode in the PxrReferenceAssembly is broken with the recent release.

Steps to Reproduce

  1. Create a PxrReferenceAssembly.
  2. Set a valid .usd filePath.
  3. Set the mode to Playback.

Expected drawing as with 18.09, getting nothing.
Please note that the Expanded mode works.

Cause

In proxyShape.cpp isBounded is dependent on various states, including _useFastPlayback and PIXMAYA_ENABLE_BOUNDING_BOX_MODE:
https://github.com/PixarAnimationStudios/USD/blob/master/third_party/maya/lib/usdMaya/proxyShape.cpp#L644

The ProxyShape simply returns a default constructed MBoundingBox if _useFastPlayback is set (a few lines below).

In the proxyDrawOverride.cpp isBounded was replaced with simply returning true in order to break free from the dependency of PIXMAYA_ENABLE_BOUNDING_BOX_MODE, as explained in the comments:
https://github.com/PixarAnimationStudios/USD/blob/master/third_party/maya/lib/pxrUsdMayaGL/proxyDrawOverride.cpp#L160

However the _useFastPlayback state was forgotten as the boundingBox(...) implementation relies on the pShape->boundingBox().

We end up in a situation where the ProxyDrawOverride is always bounded, but in playback mode the bounding box returns a default constructed (invalid) bounding box which fails to render.

Suggested fixes

Either undo the ProxyDrawOverride->isBounded implementation, which might not be great considering the explanation in the comment.

Alternatively in the proxyShape.cpp instead of returning MBoundingBox() return a similar MBoundingBox as the MPxDrawOverride default implementation which claims:

Default implementation returns a huge bounding box which will never cull the object.

https://help.autodesk.com/view/MAYAUL/2018/ENU/?guid=__cpp_ref_class_m_h_w_render_1_1_m_px_draw_override_html

In my testing any non-zero bounding box may work but to be sure I constructed a -inf to inf bounding box to fix the issue.

This case could also be handled in the boundingBox() of the DrawOverride itself, but then we would need access to the _useFastPlayback state.

System Information (OS, Hardware)

Centos7 x64, Maya 2018 Update 4 / Maya 2017 Update 3

Package Versions

Usd 18.11

Build Flags

Nothing relevant

@jtran56
Copy link

jtran56 commented Oct 24, 2018

Filed as internal issue #USD-4862.

@bfloch
Copy link
Author

bfloch commented Oct 24, 2018

For reference:
This has been reproduced by @sdao after the report here:
https://groups.google.com/forum/#!topic/usd-interest/HKwzvhf3QCY

AdamFelt pushed a commit to autodesk-forks/USD that referenced this issue Apr 16, 2024
…lve/dev

conflict resolve sync origin/dev 8178871 to adsk/dev
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

3 participants