-
Notifications
You must be signed in to change notification settings - Fork 203
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
MAYA-105120 Hide MRenderItems created for instancers with zero instances. #570
Conversation
Please add the same fix to basisCurves. |
There was a problem hiding this 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.
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. |
There was a problem hiding this 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.
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