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

Implement FOV adjustment for Surround mode #36

Closed
wants to merge 7 commits into from

Conversation

ArsenicBismuth
Copy link

New feature to resolve #35 , allowing adjustment of the camera/viewport's FOV during surround mode.

Everything is controllable via mouse wheel with modifiers:

  • Wheel: Zoom in/out
  • Shift + Wheel: Adjust horizontal FOV
  • Ctrl + Wheel: Adjust vertical FOV

Note: Due to how the screen size is calculated internally, the vertical FOV adjustment will also affect the horizontal FOV.

Sample data is 3D 180 SBS: https://drive.google.com/drive/folders/1c0iI1wGNPUJkq3qnj7LRwjLv3a46NR-g

Default:

image

Wider horizontal FOV:

image

Narrower horizontal FOV:

image

Wider vertical FOV:

image

- The CMake says 6.4, but using that version causes "Cannot get meta data from file".
- Remove the extra bug handling that appears only at later version of Qt.
- Allow for control of the view's aspect ratio, independent of the actual content aspect ratio.
- Capture the content to fit the camera's horizontal & vertical FOV, then stretch it to fit the screen's aspect ratio.
- Without modifier to zoom in (both horizontal & vertical).
- With shift/ctrl to adjust them independently.
- Since it won't show up on any GUI, and can be quite elusive.
- Previously the vertical FOV adjustment would affect the horizontal FOV.
- Also update the FOV limits.
@marlam
Copy link
Owner

marlam commented Dec 26, 2024

I'm not sure about this.

For glasses such as the one mentioned in #35, there are actually correct HVOF and VFOV settings that should be used. If the glasses are supported by OpenVR/SteamVR, you can just build Bino with QVR and get the correct settings automatically (and get head tracking too if the glasses support it).

The default VFOV of 50 is something that works well on typical displays, and it's used by VLC too. The HFOV derived from it ensures a distortion-free view. So when you adjust one or the other, you basically only introduce distortions.

@ArsenicBismuth
Copy link
Author

ArsenicBismuth commented Dec 26, 2024

VFOV of 50 is something that works well on typical displays

I mean this is why it's just the extra knob to adjust. For example Xreal Air DIAGONAL FOV is 46, so lower for the horizontal, and definitely even much lower for vertical. Point is, it's not 50.

For a speciality software, why not? I'm using your app instead of VLC specifically because VLC gives no control to the user. If people want VLC experience they can use VLC.

And even if you're not a fan of the horizontal adjustment, the "zoom" is very nice to have.


Again the default is still 50, the rest is user preference. If they prefer certain FOV despite the distortion you talk about (I don't see any as long as it's not extreme), then let them be.

@ArsenicBismuth
Copy link
Author

Also I think reducing the FOV (which is the main poin) won't cause any distortion, if that's your problem. Because you're seeing the "sphere" with smaller window.

Unlike increasing FOV where you're trying to cram higher FOV content into smaller device FOV.

marlam added a commit that referenced this pull request Dec 26, 2024
Based on ideas by Github user ArsenicBismuth in Github pull request #36.

Adjust VFOV with the mouse wheel to zoom in and out, and reset the view with 'Z'.

This also fixes the bug that the aspect ratio for surround mode depended on the view port; it should always be 2:1.
@marlam
Copy link
Owner

marlam commented Dec 26, 2024

OK, I can see the usefulness of zooming.

So in a first step, let's introduce zooming by adjusting the vertical field of view. This should not introduce any distortions as long as the horizontal FOV is computed from the vertical correctly (i.e. without depending on the viewport size).

This is implemented in commit 1e59d93 in a way that also allows adjustment via command line and via scripting, and a reset by hitting Z.

Are you ok with that first part?

marlam added a commit that referenced this pull request Dec 26, 2024
Based on ideas by Github user ArsenicBismuth in Github pull request #36.

Adjust HFOV with Shift plus the mouse wheel. This actually adjusts the aspect
ratio, so it's independent of the view port.
@marlam
Copy link
Owner

marlam commented Dec 26, 2024

OK, some people want to tinker with horizontal field of view even though this will almost certainly not give physically plausible results ;)

In commit 30e7eb4, this is implemented by adjusting the assumed aspect ratio of the material - the value 2:1 is always the correct one, but adjusting it might help with some glasses as in issue #35.

This should now cover all the uses cases, right?

@ArsenicBismuth
Copy link
Author

What's the point of this discussion if you didn't even plan to accept the PR :)

@marlam
Copy link
Owner

marlam commented Dec 26, 2024

I did not plan to not accept the PR, and all this is still open to discussion. I'm not sure if the current state does what you intended to do. Is there something missing? Could something be improved?

@ArsenicBismuth
Copy link
Author

You do you man, idc anymore.

@marlam marlam closed this Dec 27, 2024
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.

Option to adjust Horizontal FOV
2 participants