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

Different fov along different axis #175

Open
alakhag opened this issue May 7, 2023 · 1 comment
Open

Different fov along different axis #175

alakhag opened this issue May 7, 2023 · 1 comment

Comments

@alakhag
Copy link

alakhag commented May 7, 2023

I have intrinsic and extrinsic parameters, using which I can get origin, target and up direction for look_at matrix, and field of view angles and offsets.

However, my image is 480x640 size, and the fov along x-axis and y-axis are different.

I want to use perspective camera, but it only allows one value for fov.

@njroussel
Copy link
Member

Hi @alakhag

I'm a bit confused by your problem.
Given the field of view of a single axis and the aspect ratio of the film, you can compute the other axis's field of view. Here's the source code of how we do this: https://github.com/mitsuba-renderer/mitsuba3/blob/master/src/render/sensor.cpp#L149-L203

The perspective plugin also takes a fov_axis where you can specify diagonal if that's easier for you.

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

No branches or pull requests

2 participants