Skip to content

Conversation

@myla
Copy link
Contributor

@myla myla commented Dec 10, 2022

In the file rasterizer.py there are duplicate lines before the check if the projection_transform exists. These cause an exception in the case that a projection transform matrix is already provided. The corresponding lines should be (and are already) in the else case of the if-statement.

Removing these lines fixes the bug and produces the desired behaviour.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Dec 10, 2022
# Call transform_points instead of explicitly composing transforms to handle
# the case, where camera class does not have a projection matrix form.
verts_proj = cameras.transform_points(verts_world, eps=eps)
to_ndc_transform = cameras.get_ndc_camera_transform(**kwargs)
Copy link
Contributor

Choose a reason for hiding this comment

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

Did you mean to leave this line in and only remove the previous line? If so, then I think the fix is right.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, sorry for that. I only meant to remove the line containing the camera.transform_points() and the comment, as it makes more sense in the else part.

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 created a second commit in the branch to resolve the issue. Let me know if you want a new pull request.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Created a new pull request where the issue is fixed.

@myla
Copy link
Contributor Author

myla commented Jan 11, 2023

Created an updated pull request, closing this.

@myla myla closed this Jan 11, 2023
@myla myla deleted the project-transform-patch branch January 11, 2023 11:49
@bottler
Copy link
Contributor

bottler commented Jan 11, 2023

Created an updated pull request, closing this.

Thanks. It's #1421 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants