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

MAYA-105120 Hide MRenderItems created for instancers with zero instances. #570

Merged

Conversation

williamkrick
Copy link
Contributor

@williamkrick williamkrick commented Jun 8, 2020

As a part of setting up an instanced MRenderItem in Vp2RenderDelegate we'd set the prototype geometry on the item. At this point the MRenderItem looks to Maya like any other drawable item (with an identity transform matrix). Then we set the instance transforms and the MRenderItem changes to an instanced item and we handle the drawing differently.

The problem is when there is a USD instances with no instances we never do that second step, so the item stays a regular Maya item and we draw it normally, which is not what we want to happen.

The solution is detect that there is an instancer with zero instance transforms and hide the MRenderItem in those cases.

#404 #522

@williamkrick williamkrick added the vp2renderdelegate Related to VP2RenderDelegate label Jun 8, 2020
@huidong-chen
Copy link

Please add the same fix to basisCurves.

Copy link

@huidong-chen huidong-chen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

basisCurves will need the same fix.

@williamkrick
Copy link
Contributor Author

basisCurves will need the same fix.

We need a way to share code between basisCurves & mesh. There is a lot of duplicate stuff between the two of them.

@huidong-chen
Copy link

basisCurves will need the same fix.

We need a way to share code between basisCurves & mesh. There is a lot of duplicate stuff between the two of them.

Extractly. I think this can be done when we start to implement the third Rprim class.

@williamkrick williamkrick requested a review from huidong-chen June 8, 2020 17:24
Copy link
Contributor

@robthebloke robthebloke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested, and can confirm working.

@kxl-adsk kxl-adsk merged commit 82507a8 into dev Jun 9, 2020
@kxl-adsk kxl-adsk deleted the krickw/MAYA-105120/hide_instanced_meshes_with_zero_instances branch June 9, 2020 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
vp2renderdelegate Related to VP2RenderDelegate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants