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

Support dataWindowNDC #1173

Merged
merged 5 commits into from
Jun 14, 2022
Merged

Conversation

sebastienblor
Copy link
Collaborator

Changes proposed in this pull request
This PR adds support for dataWindowNDC. When set to a non-default value, we use the options region min/max x/y.
Something special as compared to arnold though, is that we don't want the output resolution to change. In other words, the desired resolution must match the window.
This means we need to have region_max_x - region_min_x = xres - 1 and region_max_y - region_min_y = yres - 1 .
In order to make this work properly, we must then adjust options.xres options.yres accordingly.

For example, in the case of overscan, we'll set the options xres, yres, to a resolution that is lower than the expected one, but since the window will go beyond [0,0,1,1] the actual amount of pixels will be equal to the desired res.

This also means that if someone sets a very small window, e.g. [0.5, 0.5, 0.6, 0.6], then we might need to increase dramatically xres, yres (x10 in this example).

Issues fixed in this pull request
Fixes #1161

@sebastienblor sebastienblor self-assigned this May 31, 2022
@sebastienblor sebastienblor changed the title Support dataWindowNDC in the delegate #1161 Support dataWindowNDC May 31, 2022
@sebastienblor
Copy link
Collaborator Author

In order to match correctly the exact window required by the user, I'm now setting the pixel_aspect_ratio accordingly, so that the full frustum matches the expected window. This way, the image can be "strecthed" if the requested window is higher in one dimension

Copy link
Contributor

@jhodgson jhodgson 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 to me, it's now working in the non-isotropic case.

@sebastienblor sebastienblor merged commit 05fce4b into Autodesk:master Jun 14, 2022
@sebastienblor sebastienblor deleted the blaines/pr/1161 branch June 14, 2022 10:38
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.

Support overscan with dataWindowNDC
2 participants