- Home /
Camera projection matrix parameters unit
I am currently working with unity camera and getting the camera projection matrix parameters. But I don't know what those numbers mean. Or more precisely what is the unit of those numbers e.g. cm, m ...(pixels if it makes sense?). Could someone please explain?
Answer by AtGfx · Jun 07, 2017 at 12:22 PM
The projection matrix is a combination of translation, rotation and non-linear projection on screen... for the perspective projection. For orthographic projection it is much simpler.
Your projection matrix can be anything you want, depending on what you want to achieve. This matrix is used to map a vertex position on a position on the screen, so your question seem a bit wide ^^
Maybe you can provide more detail on what you want to do, and if you need a little help on math, feel free to ask ;)
Well actually I am not setting any thing there. All I do is writing the parameters to a file as scene info. like m00 = x , m01 = y and so on. But then I was asked about the unit of these parameters and I didn't know.
These paramaters does not represent something simple like the width and height of your image or the distance to the far plane, etc. As I said this matrix is a combination of several matrices. To go a little a bit in details it is a combination of 3 matrices :
The first one will put your object from a reference space to the world space.
The second one will rotate your object to be aligned with a conventionnal view (for example looking in -z direction).
The third one will project your vertex to the screen, according to perspective or not.
Then you understand that when you multiply these different matrices, it is not really possible to give a meaning to m00 for example.
If you want more details you can browse the web (google "viewport projection") and try to find a video or webpage that describes it. If you can get it, the book "Fundamentals of Computer Graphics" (the one with the tiger head on cover page) contains a chapter dedicated to the viewport projection and is really well explained !
Hope it helps !
Thanks for the help. This sounds very similar to $$anonymous$$VP (model-view projection) matrix in OpenGL. Are they the same?
Your answer
Follow this Question
Related Questions
Enabeling components 1 Answer
Unity 5.2 camera not recognised 1 Answer
Switching camera to follow object 0 Answers