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

Vive updates #90

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Vive updates #90

wants to merge 2 commits into from

Conversation

jsarrett
Copy link
Contributor

add measured distortion coefficients and calculated asymmetric frustums for Vive

@TheOnlyJoey
Copy link
Member

The values are still quite blobby, we need either a new unwrap through hugin or convert the coefficient values in the vive json.

@jbkempf
Copy link

jbkempf commented Jul 11, 2018

Any news on that?

@TheOnlyJoey
Copy link
Member

There has been some extensive research regarding correct lens variables and new methods of calculating distortion coefficients, no new readings have been made for the Vive yet, and the ones in this pull request are not good enough to merge.

@ChristophHaag
Copy link
Contributor

There are also distortion values in the Vive json config that someone could try to convert to OpenHMD/panotools/hugin values. Maybe they use those internally in SteamVR to create their distortion mesh?
Apparently they use a model they name DPOLY3, and apparently there is documentation in the SteamVR HDK on what exactly it is, but maybe it also isn't hard to find out what it is without the documentation.

Example: https://gist.github.com/cnlohr/7cd6bf515ed213a4cd642de4cc195d79#file-hmd_config-json-L417

@Szalacinski
Copy link

OSVR seems to get the distortion information per device with https://github.com/OSVR/OSVR-Vive/blob/master/DisplayExtractor.cpp
It may be different per device. Should this be ported over to get the distortion information from the Vive?

@jsarrett
Copy link
Contributor Author

If you have the time to figure out the conversion from Vive coefficients to the generic panotools model it would be very helpful. Last time I was working on this, I was looking through https://gitlab.com/beVR_nz/distortiontools/blob/master/distortiontoolswindow.cpp where I wasstarting to understand how the coefficients were used. I never quite completed an algebraic model though. IIRC i had confirmed it was only 2nd order, but the coeffs were written in a wacky way.

@pH5
Copy link
Contributor

pH5 commented Jun 21, 2019

The coefficients are just 1/(1 + ar² + br⁴ + cr⁶), per channel, but the pre/postscaling is a bit nonstandard:
https://gitlab.freedesktop.org/monado/monado/blob/master/src/xrt/compositor/shaders/vive.frag#L39

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants