Skip to content

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

Merged
sebastienblor merged 3 commits intoAutodesk:masterfrom
sebastienblor:MTOA-1951
Jun 26, 2024
Merged

Don't write camera aperture parameters if they're already set#1952
sebastienblor merged 3 commits intoAutodesk:masterfrom
sebastienblor:MTOA-1951

Conversation

@sebastienblor
Copy link
Copy Markdown
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
@sebastienblor sebastienblor requested a review from cpichard June 26, 2024 15:15
!cam.GetVerticalApertureAttr().HasAuthoredValue()) {

float fov = AiNodeGetFlt(node, AtString("fov"));
float horizontalAperature = tan(fov * AI_DTOR * 0.5f);
Copy link
Copy Markdown
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
@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