Conversation
… shader. Looks pretty good on my vive
|
The values are still quite blobby, we need either a new unwrap through hugin or convert the coefficient values in the vive json. |
|
Any news on that? |
|
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. |
|
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? Example: https://gist.github.com/cnlohr/7cd6bf515ed213a4cd642de4cc195d79#file-hmd_config-json-L417 |
|
OSVR seems to get the distortion information per device with https://github.com/OSVR/OSVR-Vive/blob/master/DisplayExtractor.cpp |
|
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. |
|
The coefficients are just 1/(1 + ar² + br⁴ + cr⁶), per channel, but the pre/postscaling is a bit nonstandard: |
add measured distortion coefficients and calculated asymmetric frustums for Vive