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-113944 If USD reports that the topology is dirty compare the #2143

Merged

Conversation

williamkrick
Copy link
Contributor

new topology to the old. Only do the topology updates if the old and new typologies are different. Save the adjacency calculation used to compute normals.

krickw added 2 commits February 25, 2022 10:26
… the old. Only do the topology updates if the old and new topologies are different. Save the adjacency calculation used to compute normals.
_rprimId.asChar(),
"HdVP2Mesh::computeAdjacency");

adjacencyComputation->Resolve();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This call to resolve is slow, so save the result and only re-do it if the topology actually changes.


// Test to see if the topology actually changed. If not, we don't have to do anything!
// Don't test IsTopologyDirty anywhere below this because it is not accurate. Instead
// using the _indexBufferValid flag on render item data.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I need the separate flag because we've already lost dirty information by the time sync is called. In propagate dirty bits the old topology dirty flag saved the the render item was overwritten. If that item hasn't been getting updated (because it's in a repr that is not currently displayed) then we don't know if there was a ligitimate topology change before this frame that still needs to be handled for that item.

For that reason I need the separate _indexBufferValid flag per render item.

}

template <typename Func>
void HdVP2Mesh::_ForEachRenderItemInRepr(const TfToken& reprToken, Func func)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this could more to the parent class once the clean up gets merged.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah. I moved this function to the parent class so this will have to be propely merged.

@williamkrick williamkrick requested a review from vlasovi February 25, 2022 15:33
Copy link
Collaborator

@vlasovi vlasovi left a comment

Choose a reason for hiding this comment

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

Looks good

@seando-adsk seando-adsk added the vp2renderdelegate Related to VP2RenderDelegate label Feb 28, 2022
@williamkrick williamkrick added the ready-for-merge Development process is finished, PR is ready for merge label Feb 28, 2022
@seando-adsk seando-adsk merged commit 09310e7 into dev Feb 28, 2022
@seando-adsk seando-adsk deleted the krickw/MAYA-113944/animation_performance_improvements branch February 28, 2022 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-merge Development process is finished, PR is ready for merge vp2renderdelegate Related to VP2RenderDelegate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants