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

Don't write camera aperture parameters if they're already set #1952

Merged
merged 3 commits into from
Jun 26, 2024

Conversation

sebastienblor
Copy link
Collaborator

@sebastienblor sebastienblor commented Jun 26, 2024

Changes proposed in this pull request
In Maya USD exports, arnold is overwriting the aperture parameters to wrong values (internal ticket MTOA-1951).
Reason is that the arnold usd writer cannot set a correct aperture value since arnold cameras don't have this attribute, nor the focal length which would be needed to calculate it based on the fov.

Note that we had decided to author those values, even with an approximate value, because otherwise the exported cameras cannot be used in other usd tools.

@sebastienblor sebastienblor changed the title Don't author camera aperture parameters if they're already set Don't write camera aperture parameters if they're already set Jun 26, 2024
!cam.GetVerticalApertureAttr().HasAuthoredValue()) {

float fov = AiNodeGetFlt(node, AtString("fov"));
float horizontalAperature = tan(fov * AI_DTOR * 0.5f);
Copy link
Collaborator

Choose a reason for hiding this comment

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

could be a good time to fix the typo horizontalAperature -> horizontalAperture

@sebastienblor sebastienblor merged commit 5e2e35c into Autodesk:master Jun 26, 2024
9 checks passed
@sebastienblor sebastienblor deleted the MTOA-1951 branch June 26, 2024 15:54
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

Successfully merging this pull request may close these issues.

2 participants