Question: I have projection matrix given below. I want you to completely setup the main camera in unity according to projection matrix ( rotation , orientation

I have projection matrix given below. I want you to completely setup the main camera in unity according to projection matrix (rotation, orientation etc., too. Do not miss them). Do the full setup in unity script but If I need to do something manually, describe and explain it clearly. After that, I want you to convert 3D world point (132.65,34.76,1.2) to 2D pixel coordinate. Then convert the 2D pixel you just found to 3D world point coordinate again and check if the initial 3D world point and your reconstructed 3D world point are matched. If they are matched, the conversions correct.
The key part of the task is that you will lose depth information while converting 3D world point to 2D pixel point. You must be able to obtain correct depth information again while converting 2D pixel point to 3D world point.
Key words: world space, camera space, clip space, NDC(Normalized Device Coordinates), Screen Space, pixel coordinates, projection matrix, view matrix (from world space to camera space)
projectionMatrix = new Matrix4x4(
new Vector4(2.69568618e+03f,2.74645799e+02f,-7.56550620e+02f,2.37548448e+02f),
new Vector4(-4.33788713e+02f,2.72324315e+03f,-5.57043156e+02f,-1.60581529e+03f),
new Vector4(2.40985090e-01f,2.31194796e-01f,9.42589653e-01f,-3.64592433e-01f),
new Vector4(0f,0f,0f,1f)// Padding row to make it a 4x4 matrix
);

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!