Reputation: 444
I am trying to solve a question related to transformation of coordinates in 3-D space but not sure how to approach it.
Lets a vertex point named P is drawn at the origin with a 4x4 transformation matrix. It's then views through a camera that's positioned with a model view matrix and then through a simple projective transform matrix.
How do I calculate the new screen coordinates of P' (x,y,z)?
Upvotes: 2
Views: 2314
Reputation: 753
Before explain of pipeline, you need to know is how pipeline do process to draw on screen. Everything between process is just matrix multiplication with vector
Thrid, need to render on camrea space because what we see is through the camera. in world, camera also has position, viewport size and rotation.. It needs to project from the camera. see
After this job done, you will get nomalized coordinate which is Techinically 0-1 coordinates.
Finaly, Screen space. suppose that we are gonna make vido game for mobile. mobile has a lot of screen resolution. so how to get it done? Simple, scale and translate to get result in screen space coordinate. Because of origin and screen size is different.
So what you are tring to do is 'step 4'.
There are useful links to understand matrix and calculation so see above links.
Upvotes: 1