Comments and answers for "Is this a valid projection matrix and why?"
http://answers.unity.com/questions/1632232/is-this-a-valid-projection-matrix-and-why.html
The latest comments and answers for the question "Is this a valid projection matrix and why?"Comment by Bunny83 on Bunny83's comment
http://answers.unity.com/comments/1634429/view.html
Well who knows. It could be a fragment of a more complex calculation / calibration routine. The same way when you calculate the inverse of a certain matrix and multiply the original with its own inverse the result is essentially the identity matrix with some close to zero values off the main diagonal.Thu, 23 May 2019 19:57:48 GMTBunny83Comment by seb_krueger on seb_krueger's answer
http://answers.unity.com/comments/1634424/view.html
Thanks for the link! I already know about matrix math and how to construct a projection matrix. But that is why I wonder where the second column, first rows value is coming from. Though the shear is negligible, someone has an idea why some of the mixed reality headsets are setting it.Thu, 23 May 2019 19:25:13 GMTseb_kruegerAnswer by Bunny83
http://answers.unity.com/answers/1633682/view.html
Well, first of all I recommend to read through [my Matrix crash course][1] (If you have trouble reading due to UnityAnswers broken Markdown rendering, I have a [clone on github][2]).
<br>
Next thing to realise is that matrices can only do [affine transformations][3]. Thanks to [homogeneous coordinates][4] we can actually do a perspective projection as well as translation with a matrix. Any other non linear operation is not possible using a matrix since matrix multiplication only uses multiplication and addition. So lens distortion can not be fixed with a matrix. Only linear factors can be used (offsets, rotations or shear operation. Even [trapezoid transformations][5] are not possible since they are not affine)
<br>
To describe what the "3 unusual" values do I start with the 2 values in the 3rd column. Like i explained in my crash course they essentially shift the center of perspective left / right and up / down. However if you look closely on the values you will realise they are quite small. So they are just calibration values for the camera. You have a shift of about 9% on the vertical axis and about 0.09% on the horizontal axis.
<br>
The other unusual value (second column, first row) is really unusual for a projection matrix. It will cause a [shear operation][6]. However again if you look at the value (0.0012) it's very close to 0. It would cause a slight shear angle of about 0.08 degree. So the vertical lines are tilted by about 0.08°. At a vertical resolution of 1080p that would be about 1.5 pixels off. (So a vertical line from top to bottom would end 1.5 pixels to the left / right from the starting point). Using 0 for this value wouldn't cause almost no change at all.
<br>
ps:
I did already write a similar answer 4 days ago but I wasn't home and only had access to a "rudimentary PC". When I submitted the answer, UA decided to give my a 504 Gateway timeout and it was gone for good. So this is a complete rewrite ^^.
[1]: http://answers.unity.com/answers/1359877/view.html
[2]: https://github.com/Bunny83/Unity-Articles/blob/master/Matrix%20crash%20course.md
[3]: https://en.wikipedia.org/wiki/Affine_transformation
[4]: https://en.wikipedia.org/wiki/Homogeneous_coordinates
[5]: https://en.wikipedia.org/wiki/Keystone_effect
[6]: https://en.wikipedia.org/wiki/Shear_mappingTue, 21 May 2019 17:17:50 GMTBunny83Comment by seb_krueger on seb_krueger's comment
http://answers.unity.com/comments/1633487/view.html
please see my editTue, 21 May 2019 07:18:03 GMTseb_kruegerComment by elenzil
http://answers.unity.com/comments/1632299/view.html
are you sure it's the projection matrix and not a world/view matrix ?Thu, 16 May 2019 18:40:06 GMTelenzilComment by elenzil
http://answers.unity.com/comments/1632298/view.html
could you include a specific example.Thu, 16 May 2019 18:36:11 GMTelenzil