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

HYDRA-955 : Pass normals and tangents to Hydra from render item and mesh adapters #116

Merged
merged 7 commits into from
Apr 19, 2024

Conversation

lanierd-adsk
Copy link
Collaborator

No description provided.

@lanierd-adsk lanierd-adsk requested a review from lilike-adsk April 8, 2024 14:33
@lanierd-adsk lanierd-adsk self-assigned this Apr 8, 2024
@lanierd-adsk
Copy link
Collaborator Author

}

if (key == HdTokens->normals) {
MStatus status;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I am doing a change in this file to standardize the methods and avoid passing sometimes a MfnMesh and sometimes not.

return uma;
}

TF_DEFINE_ENV_SETTING(MAYA_HYDRA_PASS_NORMALS_TO_HYDRA, true,
Copy link
Collaborator

Choose a reason for hiding this comment

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

With passing normal as true by default, is there any test case to be rebaselined?
also, it's better to have a test case for normal if there's no one.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

With the new normals, all the tests should pass without being rebaselined. I haven't added any tests since I think it will be difficult to differentiate between the generated normals and the passed normals, there are only a few details which are different.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there no way to generate a small synthetic scene (e.g. a mesh cube maybe?) with passed normals that would be completely different from generated normals (e.g. the opposite sign), and look at the normal values in the Hydra scene index scene, i.e. without image comparison? Don't know if this is valid / realistic, just thinking out loud.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

You're right, I can use some scene from the bugs we have when not using the normals from OGS.
I'll add this as a test. Thanks.

mvb->unmap();
}
break;
case MHWRender::MGeometry::kTangent:{
Copy link
Collaborator

Choose a reason for hiding this comment

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

Didn't see notion for tangent type in Hydra, is mikkt tangent not supported in Hydra, right?
Also, it's good to have a test case to cover tangent.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes only Mikkt is supported for tangents, but it's not explicitly mentioned in Hydra.
I left the code for tangents for a later PR but we need to modify the translation of materials to support tangents. At this time the tangents won't be used so I cannot add a test for them.

ppt-adsk
ppt-adsk previously approved these changes Apr 11, 2024
@lilike-adsk lilike-adsk added the ready-for-merge Development process is finished, PR is ready for merge label Apr 19, 2024
@lilike-adsk lilike-adsk merged commit 9954a48 into dev Apr 19, 2024
11 checks passed
@lilike-adsk lilike-adsk deleted the lanierd/HYDRA-955 branch April 19, 2024 15:02
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants